It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Partner Sites
Board index Programming CSS Forum

CSS Table Cell size

CSS Table Cell size

Postby jp2aaon on Wed Feb 13, 2008 5:53 pm

I've tried setting the style height of my table's cells (<TD>) to be smaller, but it is not working.

If my text inside the cell is 8px, then all of the cells look like they are 16px tall, even though I set them all to height:8px.

Is there something I can use in the CSS rhelm that will help?
User avatar
jp2aaon
 
Posts: 5
Joined: Tue Feb 12, 2008 10:11 pm
Location: East Texas

Postby rangana on Wed Feb 27, 2008 6:31 am

You could specify a height on your <td> height with CSS. Something like this might work:
Code: Select all
<td style="height:8px;width:8px;">


...and if nothing works, could you wrap in your codes or better post a link :D
User avatar
rangana
500+ Club
 
Posts: 935
Joined: Wed Feb 27, 2008 6:14 am
Location: Cebu City Philippines

Postby jp2aaon on Wed Feb 27, 2008 2:55 pm

rangana wrote:You could specify a height on your <td> height with CSS. Something like this might work:
Code: Select all
<td style="height:8px;width:8px;">


...and if nothing works, could you wrap in your codes or better post a link :D
I tried setting the height, like you have shown above, in the style sheet page like so:
Code: Select all
td
{
  background-color:#FFFFD2;
  border-color: #336699;
  border-width: 1px 0 1px 1px;
  border-style: solid;
  font-family:Arial;
  font-size:x-small;
  height:8px;
  line-height:0;
  margin: 0;
  padding: 1px;
  text-align:left;
}
However, as soon as I include text in a cell Internet Explorer 7 pads the top and bottom of the cells. I can set the "padding" to 0, 1, 4 - it doesn't make any difference.

What I want is the tops and bottoms of the cells to be just about the same exact height as the font of the text I am writing to it.

Sorry, but I can't post a link. It is on a Company Internal web page.

Am I setting the wrong thing? Should I look into setting the padding or something similar for the fonts?
User avatar
jp2aaon
 
Posts: 5
Joined: Tue Feb 12, 2008 10:11 pm
Location: East Texas

Postby rangana on Thu Feb 28, 2008 1:05 am

Could you wrap in all your codes?!..I hardly can't visualize it. :D
User avatar
rangana
500+ Club
 
Posts: 935
Joined: Wed Feb 27, 2008 6:14 am
Location: Cebu City Philippines


Who is online

Users browsing this forum: No registered users and 0 guests