Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Jan 2007
    Location
    Halesworth, England
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Relative Tableless CSS Layout Help

    Hello,

    After only recently discovering the benefits of a table less CSS layout I have been having a few problems. I am fluent in HTML and understand the basic workings with formatting fonts etc with CSS but the whole positioning and boxes have thrown me.

    I am trying to create a layout in this shape without tables that is relative to the screen size of the user viewing but the boxes never seem to line up properly and usually it ends up all over the place.


    nice mock-up eh? Good 'ol paint

    Sorry to bug you with such a simple question just I have never really explored the depths of CSS before and any help you could give me would be gratefully appreciated.

    Thanks, Tony

  • #2
    Senior Coder coothead's Avatar
    Join Date
    Jan 2004
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    1,746
    Thanks
    0
    Thanked 244 Times in 239 Posts
    Hi there Tony.Phipps,

    and a warm welcome to these forums.

    Have a look at this basic example, it may get you started...
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
       "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    
    <style type="text/css">
    html,body {
        height:100%;
        margin:0;
        padding:0;
        text-align:center;
     }
    #top {
        height:10%;
        background-color:#fcc;
        color:#000;
     }
    #left_container {
        width:65%;
        height:90%;
        float:left;
     }
    #left_container_top {
        height:10%;
        background-color:#ccf;
        color:#000;
     }
    #left_container_middle {
        height:30%;
        background-color:#ffc;
        color:#000;
     }
    #left_container_bottom {
        height:60%;
        background-color:#fcf;
        color:#000;
     }
    #right_container {
        width:35%;
        height:90%;
        float:left;
        background-color:#cfc;
        color:#000;
     }
    </style>
    
    </head>
    <body>
    
    <div id="top">id="top"</div>
    
    <div id="left_container">
    <div id="left_container_top">id="left_container_top"</div>
    <div id="left_container_middle">id="left_container_middle"</div>
    <div id="left_container_bottom">id="left_container_bottom"</div>
    </div>
    
    <div id="right_container">id="right_container"</div>
    
    </body>
    </html>
    coothead

  • #3
    New to the CF scene
    Join Date
    Jan 2007
    Location
    Halesworth, England
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thumbs up

    Ah ha!

    Brilliant thank you , that should definately get me on my way. I am confident with the formating so it shouldn't be a problem. let you know when its finished.

    tony

  • #4
    Senior Coder coothead's Avatar
    Join Date
    Jan 2004
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    1,746
    Thanks
    0
    Thanked 244 Times in 239 Posts
    No problem, you're welcome.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •