I Give up (3 Column Help)

Discussion in 'CSS' started by J.T.D., Feb 26, 2008.

  1. #1
    Hi all,
    I really give up on this one. I'm trying to get this image (See Below) to have 3 columns. I don't get how I could do that without using tables, though. Float doesn't have a center option, so what would I do. Thanks.

    - JTD

    Image:
    [​IMG]
     
    J.T.D., Feb 26, 2008 IP
  2. shallowink

    shallowink Well-Known Member

    Messages:
    1,218
    Likes Received:
    64
    Best Answers:
    2
    Trophy Points:
    150
    #2
    Well fast way would be to put 3 divs each with float:left and width: 30%; Could be P tags just as easily.

    <style>
    .one {
    float:left; width: 30%;
    height: 200px; border: black solid 3pt;
    }
    </style>
    <div class="one">
    </div>
    <div class="one">
    </div>
    <div class="one">
    </div>
     
    shallowink, Feb 26, 2008 IP
  3. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    436
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I'd actually use DIVs here with heading elements for the column titles and lists for the contents (well, for the first two anyway - I'd use a DIV containing an image for the third).

    Then float them each at 33%.
     
    Dan Schulz, Feb 26, 2008 IP
  4. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Hmmm, doesn't IE add 33% plus 33% plus 33% and get something more than 100%? Isn't it safer to do it shallow's way?
     
    Stomme poes, Feb 28, 2008 IP
  5. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    436
    Best Answers:
    0
    Trophy Points:
    0
    #5
    No, 33% + 33% + 33% will equal 99% which IE can handle. It's only when you make one of those 34% that IE will trip up and add them up to be 101%.

    Of course he's also mixing percentages (widths) and points (borders) which is just going to break anyway.
     
    Dan Schulz, Feb 28, 2008 IP
  6. matthewbeckman

    matthewbeckman Peon

    Messages:
    140
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Yea I would go with 30% because that is playing it safe with IE, sometimes it will trick internet explorer (I have seen it happen on very simple designs with borders and such), but then again, who takes the time to design for internet explorer anymore? Microsoft has made developers jobs so hard...
     
    matthewbeckman, Feb 28, 2008 IP
  7. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    436
    Best Answers:
    0
    Trophy Points:
    0
    #7
    I do, since 70%+ of the the people who go online use the darn thing. Bear in mind I keep an eye on it, I don't develop for it (I develop to the standards, and against the browers, using as little code without having to hack for any browser whenever possible).
     
    Dan Schulz, Feb 28, 2008 IP
  8. matthewbeckman

    matthewbeckman Peon

    Messages:
    140
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Ha I know I was kidding, it's just so stupid that people haven't moved away from it yet. It is to hard to trick into certain things when you start getting into serious design. I always make sure my code is validated to the standards, but that doesn't mean internet explorer is going to accept it. Have you ever seen it handle a transparent png image...? God don't get me started with that.
     
    matthewbeckman, Feb 28, 2008 IP
  9. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    436
    Best Answers:
    0
    Trophy Points:
    0
    #9
    PNG alpha-transparency and opacity support in IE 6 are the only real issues I tend to have with IE 6 anymore. IE 7 is fine as far as I'm concerned. People just need to learn how to take the browsers into consideration when coding is all. :)

    Anyway, here's a question for J.T.D. Is that image (on the right side) the actual size or is it just a placeholder for the "right column content"? *notes that I may have an idea here...*
     
    Dan Schulz, Feb 28, 2008 IP