homepage Welcome to WebmasterWorld Guest from 54.237.98.229
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: not2easy

CSS Forum

    
CSS Mystery
Attributes seem flaky
RossWal

10+ Year Member



 
Msg#: 342 posted 8:28 pm on Oct 10, 2002 (gmt 0)

Admittedly, this probably isn't the best coding practice, but I wonder why it doesn't work? The first CSS attribute shown below has no affect when specified on a table tag that's inside another table. It works fine on the outer table, or on td or tr tags in the inner table. The second css attibute works just fine on either the inner table or the outer table. This is on IE 6.

Can anyone help me understand why?

Thanks!


.wontWorkForInnerTable
{
BACKGROUND: #bfcff1
}


.willWorkForInnerTable
{
FONT-WEIGHT: bolder;
FONT-SIZE: 14px;
FONT-FAMILY: Arial, Helvetica "sans-serif";
LETTER-SPACING: -0.03em
}

 

Nick_W

WebmasterWorld Senior Member nick_w us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 342 posted 8:53 pm on Oct 10, 2002 (gmt 0)

Yeah, CSS and tables is just weird ;)

Not sure about the specifics but, I know that they're a problem!

Nick

SuzyUK

WebmasterWorld Senior Member suzyuk us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 342 posted 9:37 pm on Oct 10, 2002 (gmt 0)

It's workink OK in my IE6..

here's the code I used

CSS:
table.outer{
background-color: #009;
padding: 2px;
}

table.inner{
background-color: #ddd;
}

HTML:
<table class="outer" cellspacing="0">
<tr>
<td>first test cell</td>
<td>
<table class="inner" cellspacing-"0">
<tr>
<td>one cell inner table</td>
</tr>
</table>
</td>
</tr>
</table>

--------------------------------
the only thing I can think of is to check all your tags are closed, and that you have background-color, unstead of just background

Suzy

RossWal

10+ Year Member



 
Msg#: 342 posted 10:26 pm on Oct 10, 2002 (gmt 0)

Thanks guys. Suzy, I tried your suggestions to no avail. I'd did find that if I add a border into the css definition, it miraculously starts working, including the background color. Remove the border and it dies again. Since a border is actually in keeping with my needs, I'm good to go. But it's an oddity for sure.

Ross

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