|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
OK this is wierd and I really can't find a solution.
I keep having my text color change back to #000000. this only happens after a table. Having a table generlly means having columns. the actall problem is this: if using a style sheet as such: BODY{ color:#ff0000; } TD{ font-family:sans-serif; color: #0000ff; } OK and your HTML within the body does this <BODY> Before the table <TABLE> <TR> <TD>Within a column</TD> </TR> </TABLE> <BR> After the Table </BODY> Your output will be: Before the table --in red color within a column --in blue. after the table --in red color. This is GOOD this is the way it works. However if you change the <TABLE> tag to <TABLE width="50%"> or any other width then the out put becomes. Before the table --in red color within a column --in blue. after the table --in BLACK color. Now if you remove the font-family tag from the TD in the style sheet this problem goes away. It is realy wierd. If you set a font-family within TD in a style sheet and use a TABLE with the width set you loose the BODY color for everything after the Table. Wierd. Any ideas WHY. This happens in netscape and IE. |
|
#2
|
|||
|
|||
|
It sounds like a browser bug, but if it's consistent across Netscape 4.x and MSIE, it might not be. Have you tried it with Mozilla?
BTW: I noticed you've set the foreground color without specifying a background color. That may make text invisible depending on the user's color configuration and browser defaults. |
|
#3
|
||||
|
||||
|
not sure where the problem is -but why not use classes instead. Do not set a td style for this to work .
eg: .main{ color : #060606 ; font-family : Arial ; font-size : 11pt ; font-weight : 100 ; } (I use a seperate style sheet) then <td class="main"> blah etc even Netscape understands this so its pretty safe all round. hope that helps? Simon firepages@hotmail.com ------------------ Simon Wheeler FirePages -DHTML/PHP/MySQL |
![]() |
| Viewing: Dev Shed Forums > Web Design > HTML Programming > Weird problem with stylesheets |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|