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.

Proper div tutorials

Discussion in 'CSS' started by NewComputer, Feb 26, 2005.

  1. #1
    Anyone have any on their site? I am getting to a point where I feel I need a little more knowledge. I need some help with what I would call 'columns'
    SEMrush
     
    NewComputer, Feb 26, 2005 IP
    SEMrush
  2. nfzgrld

    nfzgrld Peon

    Messages:
    524
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #2
    What do you want to do with them? You want to line up two or more divs and have them act like columns? It's possible, but you'll have a "fun" time getting them to look the same in IE as they do in everything else.
     
    nfzgrld, Feb 26, 2005 IP
  3. seank1

    seank1 Peon

    Messages:
    35
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    You can google 'CSS Layouts' and find a ton of links on how to setup columns with DIVs. And its not as hard as nfzgrld said. There are a few standard setups that work in almost all browsers.
     
    seank1, Feb 26, 2005 IP
  4. nfzgrld

    nfzgrld Peon

    Messages:
    524
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #4
    When did I say it was difficult? Sure there are "standard" setup that will work, but then you're site will look pretty standard. Once you start putting stuff in the columns and dressing them up you'll likely start to see IE go one way and everything else go another. You're columns will also be affected by other stuff on the page like footers, etc. I learned out to do this stuff by using w3schools.com as a referance and then just doing trial and error until I got the results I wanted. seank1 is right, it is easy, but only AFTER you know how to do it.
     
    nfzgrld, Feb 26, 2005 IP
  5. NewComputer

    NewComputer Well-Known Member

    Messages:
    2,021
    Likes Received:
    68
    Best Answers:
    0
    Trophy Points:
    188
    #5
    Thanks Sean,

    Any that you prefer? Any you can recommend? I looked on Google and saw nothing really. I do want 3 divs to act like three columns.
     
    NewComputer, Feb 26, 2005 IP
  6. J.D.

    J.D. Peon

    Messages:
    1,198
    Likes Received:
    64
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Three div's will never act as three td's because div's are independent of each other and, unless you use JS, there's no way to make a div grow if the adjacent div has more content.

    J.D.
     
    J.D., Feb 27, 2005 IP
  7. NewComputer

    NewComputer Well-Known Member

    Messages:
    2,021
    Likes Received:
    68
    Best Answers:
    0
    Trophy Points:
    188
    #7
    JD,

    What I am trying to achieve is three 'columns', left to right. Far left containing navigation, middle containing content and the right containing information or advertisements etc... I have tried floating them, absolute (which works until you try to place another div below these three) etc... It should not be this hard, and that is why I was looking for a tutorial.
     
    NewComputer, Feb 27, 2005 IP
  8. Hijacker

    Hijacker Peon

    Messages:
    151
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Umh, a tutorial for doing "tables" with divs would be nice... I am searching for some, too :)
     
    Hijacker, Feb 27, 2005 IP
  9. J.D.

    J.D. Peon

    Messages:
    1,198
    Likes Received:
    64
    Best Answers:
    0
    Trophy Points:
    0
    #9
    There's quite a bit of a difference in how browsers interpret element's height property (e.g. if you set height to an absolute value, FF will overflow div, but IE will grow it), which is important in a page layout. Also, IE doesn't support min-height, which is quite useful if you want to make sure that your page doesn't take half the screen if there isn't enough content to fill the entire screen.

    You'll save yourself a lot of time if you just use a table to lay out your page. Div's can be used inside the main table for things like menu items or ads.

    J.D.
     
    J.D., Feb 27, 2005 IP
  10. Arnica

    Arnica Peon

    Messages:
    320
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Take a look at positioniseverything.net which should give you enough grounding to achieve what you're after.

    Mick
     
    Arnica, Feb 28, 2005 IP