1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

mystery padding driving me nuts.

Discussion in 'CSS' started by Roze, Oct 5, 2005.

  1. #1
    Hi guys,

    This is my first attempt at a CSS driven layout. I've got the entire page exactly the way I want it on both FF and IE6 except one little thing. If you look at the bottom of this page in IE6 you'll see the bamboo image has a bit of the wood background showing beneath it. there is no reason for this, I have the div set without a height and I thought the image would stretch the div to 26px high, and then the base of the image would touch the black of the background. Instead, the div is making itself just a few pixels higher then necessary and driving me nuts.

    It's not a big deal, I'm just trying to understand more about CSS.
    SEMrush
    Can anyone give me a solution for this problem? Here's the page: http://www.rosebytes.com/bobo/test.html
     
    Roze, Oct 5, 2005 IP
    SEMrush
  2. TheHoff

    TheHoff Peon

    Messages:
    1,530
    Likes Received:
    130
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I know it doesn't make any sense, but remove the linebreaks after the <img> and before the </div>. Also remove linebreaks before any </td>.
     
    TheHoff, Oct 5, 2005 IP
  3. Roze

    Roze Guest

    Messages:
    403
    Likes Received:
    29
    Best Answers:
    0
    Trophy Points:
    0
    #3
    You are a genius, thank you it worked...that is VERY, very bizarre that it would do that. Firefox was smart enough, why not IE?

    This CSS is great...usually I'm a nested table girl. I actually broke down and had to use one simple table with three <td>'s for the middle of the page...but it's better then my usual HTML fiascos. Thanks again!
     
    Roze, Oct 5, 2005 IP
  4. TheHoff

    TheHoff Peon

    Messages:
    1,530
    Likes Received:
    130
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Sometimes tables just make sense. I've seen a few tutorials that show you how to do pure CSS 3 column layouts... but they are so full of workarounds and "tricks" just for the sake of saying they didn't use any tables.

    And asking me to explain why IE does something... well I'd have a better chance at explaining quantum physics.
     
    TheHoff, Oct 5, 2005 IP
  5. Roze

    Roze Guest

    Messages:
    403
    Likes Received:
    29
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Haha yes it's true, stupid IE!

    The problem with the 3 colunm layouts in CSS is that the divs in each column won't have the same lengths as <td>'s would in a table...so if you want the background image or color to extend to the full size of all three columns, you're out of luck. I struggled with it all day till I realized that I could combine my new css background tricks like no-repeat to a table and get the best of both worlds.

    Hey one more question while I've got you cornered...dreamweaver yells at me when I try to do vertical attachment : bottom with a background...says it's not fully supported. Is this still true? it's working on both FF and IE6.

    Ok I confess, I used one spacer image also. ;)
     
    Roze, Oct 5, 2005 IP
  6. TheHoff

    TheHoff Peon

    Messages:
    1,530
    Likes Received:
    130
    Best Answers:
    0
    Trophy Points:
    0
    #6
    >>I struggled with it all day till I realized that I could combine my new css background tricks like no-repeat to a table and get the best of both worlds.

    There are CSS tricks out there if you search for 3 column layout, but yea, tables make it simple.

    >>Hey one more question while I've got you cornered...dreamweaver yells at me when I try to do vertical attachment : bottom with a background...says it's not fully supported. Is this still true? it's working on both FF and IE6.

    My personal policy is that if it works on 95% of the user's browsers, go with it. It is helpful to have a Mac person check it out in a few programs before you use it if it is in an important project.
     
    TheHoff, Oct 6, 2005 IP