DIV tag and CSS

Discussion in 'HTML & Website Design' started by harihan, Sep 9, 2010.

  1. #1
    i have designed small website using DIV tag but i m facing some problems while making design live. when i check design in another system then layout is different like images and other things are not at their proper place. i m not able to solve this problem and looking for help here from you guys.
     
    harihan, Sep 9, 2010 IP
  2. radiant_luv

    radiant_luv Peon

    Messages:
    1,327
    Likes Received:
    34
    Best Answers:
    1
    Trophy Points:
    0
    #2
    How would you want us to view your website? There is no link/ or code?
     
    radiant_luv, Sep 9, 2010 IP
  3. harihan

    harihan Peon

    Messages:
    29
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    You can see here:

    koreconsult.com/home.html
     
    harihan, Sep 9, 2010 IP
  4. radiant_luv

    radiant_luv Peon

    Messages:
    1,327
    Likes Received:
    34
    Best Answers:
    1
    Trophy Points:
    0
    #4
    I would say refer some tutorials before you proceed with the website coding.
     
    radiant_luv, Sep 9, 2010 IP
  5. JJulian

    JJulian Peon

    Messages:
    29
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    You are using a lot of float: left. But I don't see anywhere that you are clearing the floats. This may be having the negative effects in the different browsers. I really have a hard time reading your code as well. I would suggest that you use Id's for your div tags then use a seperate file for your CSS.

    Julie
     
    JJulian, Sep 9, 2010 IP
  6. amitash

    amitash Well-Known Member

    Messages:
    399
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    125
    #6
    Try using tables instead of DIVs as it is just a static HTML page without much designing!
     
    amitash, Sep 9, 2010 IP
  7. harihan

    harihan Peon

    Messages:
    29
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Thanks for your help here. i would appreciate your suggestions. I can make this design easily with table but i m learning using DIV tags and CSS too.
     
    harihan, Sep 9, 2010 IP
  8. rachel.anthony12

    rachel.anthony12 Peon

    Messages:
    21
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    yaa..using tables will give good results and proper formatting also as per your need..its very easy also to use the tables
     
    rachel.anthony12, Sep 10, 2010 IP
  9. JJulian

    JJulian Peon

    Messages:
    29
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    You have a lot of div tags in you code that are formated exactly the same and the content looks like it is in the same section. You should combine them into one div tag. Give it an id and then assign the formatting to that id, It will make your code a lot easier to read and figure out.

    try looking at w3schools.com/css/default.asp and other tutorial sites.
    I actually bought a book to teach myself CSS called "CSS The Missing Manual" by David Sawyer McFarland. It is really good and easy to follow.
    -Julie
     
    JJulian, Sep 10, 2010 IP
  10. sussanesylvia

    sussanesylvia Peon

    Messages:
    107
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    yes this is the issue when you use DIV tag. You need to be very proficient in handling DIV if you uses this. try out various online books taht gives you step by step guidance like the one given just above w3schools.com/.
     
    sussanesylvia, Sep 11, 2010 IP
  11. LoveArtHope

    LoveArtHope Peon

    Messages:
    28
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #11
    I'm having similar issues with a page I am designing and thank you JJulian. My div's were stacking like a staircase. I forgot I think to use clear and now I can go back in and figure out where i forgot to use it. Thank you also for the tutorial sites. I need a quick refresher. Question though. I thought tables were disfavored by the internet standards. i mean I was taught how to do both, but it was understood that divs were the more efficient standard to use? What will HTML 5 be like too? Tables? Divs? Something new.
     
    LoveArtHope, Feb 11, 2011 IP
  12. chanif.alfath

    chanif.alfath Active Member

    Messages:
    148
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    88
    #12
    IMHO you need learn more about DIV before you use it, sometimes it make our design will be destroyed :)
    me also, already use table for al long time before i change to div & span tag.

    just like sussanesylvia, w3schools.com is the resource you can get in inet :p
    except google.com :D
     
    chanif.alfath, Feb 11, 2011 IP
  13. jongos

    jongos Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #13
    make an id inside a section div (header, content, footer), then followed by many class div inside those section div. and don't forget, always, to use a clear tag after using a float tag, whenever you want a new lined div below your floated-div.

    
    <div#id>
    <div.class>this-div-using-float-property1</div>
    <div.class>this-div-using-float-property2</div>
    <div.class>this-div-using-float-property3</div>
    <div.class>this-div-using-float-property(~)</div>
    <div.class>this-div-using-clear-tag-property</div>
    </div>
    
    Code (markup):
    .. you do that, you'll never look back to using tables, unless you make alot of data query ofcoz'

    hope your understand my poor english, sorry about that
     
    jongos, Feb 11, 2011 IP
  14. drhowarddrfine

    drhowarddrfine Peon

    Messages:
    5,428
    Likes Received:
    95
    Best Answers:
    7
    Trophy Points:
    0
    #14
    Only on DP to posters consistently respond to age old threads as if they were new. Then they continue them on for years and years.
     
    drhowarddrfine, Feb 12, 2011 IP