Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

style in <td> tags

Status
Not open for further replies.

dislimbic

Programmer
May 7, 2002
34
CA
Hi all, I'm having a little problem i'm trying to make the following code work in netscape 4.7

<table align=&quot;center&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;>

<tr>
<td width=&quot;125&quot;>
<span class=&quot;footer&quot; style=&quot;left:15px;top:5px;&quot;>
<script language=&quot;javascript&quot; type=&quot;text/javascript&quot;>
document.write(dayNow + daySuffix + &quot;\xA0&quot;);
document.write(monthNow +&quot;\xA0&quot;);
document.write(yearNow);
</script>
</span>
</td>
<!--rest of table//-->

what i'm looking for is why the class won't apply to this cell. I've tried using div and p tags and none of them work in netscape (all of them work in IE). The positioning of the style works, but the class won't. Here is the ext style linked to this page.

.footer {font-family:times;font-size:11pt;color:#ED0303;font-weight:bold;}

I've been reading previous posts on this forum and about 3000 css sites for hours and can't figure out why this(or any other tag) won't work. So I apologize in advance if this is a stupid question but either my brain doesn't work today, or i've had too much to drink %-)

dis

ps. fyi the table is nested in a div tag

 
Due to the rules of class inheritance, Netscape doing the right thing.
First you define a global class for footer, and then you override it by inline style that is used for positioning matters. No surprise that text properties are not applied.

Try to combine both text and positioning properties in one place (no matter where: in global stylesheet or inline style for your <span>), i.e. avoid using two different definitions for the same class.

good luck

 
Thanks Starway, I've always done the left and top positioning in inline styles, so that I can use the same global style for paragraphs and text in different places all over the site. Netscape only had a problem with this particular one. Anyways, no big deal, just have to make another style.
Thanks


dis
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top