SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Addict
    Join Date
    Nov 2008
    Posts
    201
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Height of cell is wrong...

    Page in question may be viewed here.

    What is it that's setting the height of the "proddescript" cell? ("proddescript" cell contains the product name, price, and description). I haven't specified a height for that cell, yet it is about 300px high. I think it has something to do with that css pop-up image code in the "prodimage" cell to the right. The height of the "proddescript" cell seems to be lining up with the "prodimage" cell somehow.

    I don't want the "proddescript" cell to have a specified height. How do I fix that?

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,117
    Mentioned
    448 Post(s)
    Tagged
    8 Thread(s)
    Tables are tricky things, and there's no good reason to use one there. Use floated divs instead, and you won't have this problem. Divs are much easier to use. Make #content overflow:hidden, and place two divs around 292px wide, one floated right and one floated left.
    Facebook | Google+ | Twitter | Web Design Tips | Free Contact Form

    Forum Usage: Tips on posting code samples, images and more

    Forrest Gump: "IE is like a box of chocolates: you never know what you're gonna get."

  3. #3
    SitePoint Addict
    Join Date
    Nov 2008
    Posts
    201
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the tip!

  4. #4
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,288
    Mentioned
    179 Post(s)
    Tagged
    6 Thread(s)
    You split the cell with rowspan so the two cells on the right will stretch out to match the height of the one cell on the left. If you just used two cells and didn't split them then the content would stay at the top of the cell.

    Table cells are always equal in height and if you split one with rowspan the other two cells will still maintain this height (and vice versa).

  5. #5
    SitePoint Addict
    Join Date
    Nov 2008
    Posts
    201
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Gotcha. So what I did was set a specific height for the proddescript cell. That helps.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •