SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Jan 2003
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    basic CSS layout problems

    I'm trying to build a site using CSS layout and no tables but I've found one particular thing were is obvious that I'm soing
    something wrong.

    I'm trying to do 2 columns and a footer.

    the code is this:

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
      <meta http-equiv="content-type"
     content="text/html; charset=ISO-8859-1">
      <title>test</title>
      <style>
    #content {
    border: 1px black dotted;
    width: 300px;
    float: left;
    }
    #navbar {
    border: 1px black dotted;
    width: 100px;
    }
    #footer {
    border: 1px black dotted;
    width: 400px;
    float: left;
    }
    
      </style>
    </head>
    <body>
    <div id="content">content</div>
    <div id="navbar">navbar</div>
    <div id="footer">footer</div>
    </body>
    </html>

    this is how it looks in IE (fine)


    this is how it looks in Mozilla (broken!)


    How is this supposed to be made? Any ideas?

  2. #2
    Non-Member mmi's Avatar
    Join Date
    Jun 2001
    Location
    Rhode Island
    Posts
    587
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Exclamation clear the deck

    hey guillebe - does this get it?
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
      <meta http-equiv="content-type"
     content="text/html; charset=ISO-8859-1">
      <title>test</title>
      <style>
    #content {
    border: 1px black dotted;
    width: 300px;
    float: left;
    }
    #navbar {
    border: 1px black dotted;
    width: 100px;
    float: left;
    }
    #footer {
    border: 1px black dotted;
    width: 400px;
    clear: both;
    }
    
      </style>
    </head>
    <body>
    <div id="content">content</div>
    <div id="navbar">navbar</div>
    <div id="footer">footer</div>
    </body>
    </html>

  3. #3
    SitePoint Member
    Join Date
    Jan 2003
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    seems to work great, thanks!!!

  4. #4
    Non-Member mmi's Avatar
    Join Date
    Jun 2001
    Location
    Rhode Island
    Posts
    587
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Cool on a clear day

    I learned (a little) about this stuff from blufive in an earlier thread - he provided this link for further info


Bookmarks

Posting Permissions

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