homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: not2easy

CSS Forum

background-color none
can't seemt o over-ride the background color

 11:47 am on Apr 16, 2008 (gmt 0)

doctype: HTML 4.01 Transitional

i have a table, where all but one cell have a black border and a background color:

.navBox * td {border: thin solid #000000;background-color: #F5DEB3;}

this works fine, the table is given the class 'navBox' and the cells show the style as expected.

one cell however doesn't need a background color or border:

.navBox * td.nb{border: none;background-color:none;}

so this td is given a class 'nb'
this removes the border but the background color is not going!
is background-color:none; invalid? TopStyle seems to think its ok

there is only a skeleton css sheet at the moment so no other conflicts



 11:53 am on Apr 16, 2008 (gmt 0)

ok my bad, i should have used


'none' seems to validate through a validator but it doesn't work!


 7:56 pm on Apr 16, 2008 (gmt 0)

background-color:none is definitely invalid. background:none however isn't - the none is applied to the background-image component of the background shorthand. Topstyle getting confused?


 11:55 pm on Apr 16, 2008 (gmt 0)

thanks for that, yes TopStyle gave it an ok!

so thanks for clarifying the position.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved