Jump to content

fill all the the table cell


wolves

Recommended Posts

in my table cell I have a <div>

the div style is
[code]

     div.header {
      background:#CCCCCC;  
      text-align:center
    }

[/code]

so it's like
[code]
<td><div class="header">some content</div></td>
[/code]

but if my table cell height is gather than my <div> the div color don't fill all the table cell..

how to solve it?
tanks
Link to comment
Share on other sites

[!--quoteo(post=352148:date=Mar 6 2006, 01:43 PM:name=wolves)--][div class=\'quotetop\']QUOTE(wolves @ Mar 6 2006, 01:43 PM) [snapback]352148[/snapback][/div][div class=\'quotemain\'][!--quotec--]
ok, but then all my talbe cells will have #cccccc background color,
because this, I made the div, when I need that color I use the div,
[/quote]

so, put a class on the cells that you want shaded. you'll not be able to get a div to fill 100% of a table cell. you need to apply the styles to the most basic element in the markup you are using:
[code]
td.shade {
  background-color: #cccccc;
}

div.header {
  text-align: center;
}
[/code]
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.