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.

Is the Divs are better than Cols for Layouts?

Discussion in 'HTML & Website Design' started by diam26, Sep 1, 2008.

  1. #1
    Dear Friends,
    I am new learner, there is discussion going on this forum that Divs are better than Cols to layout the page. Is that true? How is that Possible?
     
    diam26, Sep 1, 2008 IP
  2. xhtmlguy

    xhtmlguy Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    diam26, think of DIVs as empty and flexible containers.

    You can stretch them to make them wide, or add a height to make then long like a vertical column.

    Then you position them like one below another or one besides another [see attached image].



    And this DIV structure is better, than using any other method to make columns.

    You can do this by using CSS, another companion language to HTML. Go ahead and read it on www.w3schools.com , its easy.
     

    Attached Files:

    xhtmlguy, Sep 1, 2008 IP
  3. samamir

    samamir Peon

    Messages:
    33
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    yeah div are better then cols, well youc ould read at the same website mention by xhtmlguy. It's good ..
     
    samamir, Sep 1, 2008 IP
  4. nicangeli

    nicangeli Peon

    Messages:
    828
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    0
    #4
    What are cols? Columns?

    If you are referring tables, then (usually) they should not be used for the layout of a website. Tables are meant for one thing, and one thing only; Tabular data.

    Div's are not semantic and are often overused, if there is a better tag for the job use that instead.
     
    nicangeli, Sep 1, 2008 IP
  5. diam26

    diam26 Peon

    Messages:
    151
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Dear XhtmlGuy,
    Thank you so much for your so nice answer to my question. You have even provided the picture to explain it. I really appreciate it so much. I didnt know that Div are so important. they are like Tables right? Tables are also flexible if you dont fix the size.As you know I am a new learner and I am very interested in Css Layout Style Sheets. I understand Html and XHtml and almost Css but There is only one confusen remain about Col. I can creat col but I don't have fully control on them. I still can't figure out how they work. Actually I want to Understand How the whole page can be controll by cols.Like in front page first of all we have body table and then content tables. but in Css I cant understand how that structure works,some time I can't change background color or cant see the border on one side of the cols so that means I dont understand how cols structured.

    I know that there are also parts like this :

    1. Outside Part of Wrapper
    2. Wrapper
    3. Container
    4. Content
    5. and other Cols
    If I understand this then I have full controll on layout.

    Why we need wrapper? Is it Like Main Table of the page or Main Body of the Page? Then what is Container?

    Please let me know if you know any other good site which explain in detail about the Cols and Layout and also Detail about Div. I learned Html and Css on the W3schoool but they have basic lessions only.It is limited.But still it is good site for beginers like me. I understand almost everything only I didnt get the real story about Cols. Please explain with the pic if you can I would appreciated it so much.





     
    diam26, Sep 1, 2008 IP