2 replies [Last post]
zak
Offline
newbie
Last seen: 17 years 23 weeks ago
Joined: 2003-12-01
Posts: 6
Points: 0

I have an embedded table with 5 columns. On the middle and outer columns I would like to have a border. I can not understand why the border views in IE but not in netscape or Mozilla. I have defined the td tags with the css border style....

thankful for any help,
zak

.border {
border: 1px;
border-style: solid;
border-color: #A7A7A7 #A7A7A7 #A7A7A7 #A7A7A7;

}

.header {
font-family: Georgia, "Times New Roman", Times, serif;
font-size: xx-small;
background-color: #FFFF93;
text-align: center;
width: 100%;
background-repeat: repeat;
padding-right: 5px;
padding-left: 5px;
line-height: 25px;
color: #000066;
font-weight: 500;

}
.headercontent {
font-family: Arial, Helvetica, sans-serif;
font-size: 0.5em;
font-weight: lighter;
color: #333333;
padding-right: 4px;
padding-left: 4px;
line-height: 15px;

xhtml

<table width="480" valign="top" border="0" cellspacing="0" cellpadding="0">
<tr height="130">
<td width="" valign="top" class="border"><p class="header">Highlight</p>
<p class="headercontent">text<a href="http://url"> </a>.....</p></td>

<td width="30">&nbsp;</td>

<td width="" valign="top" class="border"><p class="header">News</p>
<p class="headercontent"> <a href="http://www.url.com"> </a></p></td>

<td width="30">&nbsp;</td>

<td width="" valign="top" class="border"><p class="header">Most read</p>

<p class="headercontent"><a href="url</a></p></td>
</tr>
</table>

Daybreak_0
Offline
Enthusiast
Sydney, Australia
Last seen: 17 years 26 weeks ago
Sydney, Australia
Timezone: GMT+10
Joined: 2003-11-15
Posts: 389
Points: 0

border not displaying in netscape and mozilla

It does display in mozilla Firebird 0.7 (and IE6) and as I don't have any others can't see the problem.

I can't see anything wrong, apart from the typing error at bottom <a href="url</a> where the " needs to be added.

Try specifically making the border relate to the tag like this -

td.border {..... etc

Also are you using a correct Doc Type?

Regards
Day

The only way to learn is to do it yourself

Daybreak_0
Offline
Enthusiast
Sydney, Australia
Last seen: 17 years 26 weeks ago
Sydney, Australia
Timezone: GMT+10
Joined: 2003-11-15
Posts: 389
Points: 0

border not displaying in netscape and mozilla

Quote:

hi daybreak,

thanks very much for answering my post about my border not displaying in mozilla and netscape.

i tried changing the border style to td.border and this has not seemed to help.

i did not mention that the table is a nested table and perhaps some definitions somewhere else are affecting things?! i have a global style sheet which is where i put the three style definitions but also have 2 imported style sheets. could this have anything to do with it?

i also have other boxes which i have defined with using the
border style and only one works. the one which is working i have imported a style sheet for.....however, it seems to break up in netscape.

if you have any suggestions could you let me know.

thanks greatly,
zak

CSS stands for cascading style sheets, therefore the following is possible

.my {width: 100px}
.my {color: red}
.my {width: 50px}
.my {color: blue}

and the result will be Width 50px, and Color Blue, as the last definitions overide the previous ones. The above is also true of the order of stylesheets.

@import ("mystyle1...
@import ("myother style2...

Any definition in mystyle1.css will be overwritten by a definition in myotherstyle.css if it is the same tag, element, class.....

You should check all the stylesheets to make sure that they do not conatn the same things.

Regards
Day

The only way to learn is to do it yourself