Results 1 to 2 of 2

Thread: Float Window resize problem

  1. #1
    rukix1x Guest

    Float Window resize problem

    I have a problem with CSS. Everytime I resize the browser window or change the screen resolution, the floated divs disappear when the window gets smaller. Same when the screen resolution gets smaller. I need help. Thanks. I'm currently having problems when it comes to laying out my page that fits on any resolution.

  2. #2
    Join Date
    Feb 2006
    Location
    Salisbury UK
    Posts
    4,332
    Simplest solution is to make your page fixed width and put it all inside a #wrap div:-

    CSS
    Code:
    #wrap { position: relative. width: ???px; margin: 0 auto; }
    HTML markup:-
    Code:
    doctype here
    <html>
    <head>
    Head section
    </head>
    <body>
    <div id="wrap">
    All page html here
    </div>
    </body>
    </html>
    Remember to include a doctype as the first item of your HTML page code from here:-
    http://www.w3.org/QA/2002/04/valid-dtd-list.html

    The #wrap div width should be the total widths of all you divs in the same line plus all their side margins, side padding and side borders.
    Code downloaded to my PC will be deleted in due course.
    WIN7; IE9, Firefox, Opera, Chrome and Safari for Windows; screen resolution usually 1366*768.
    Also IE6 on W98 with 800*600 and IE8 on Vista 1440*900.

Similar Threads

  1. Need help urgently! My site wont display properly in firefox!
    By maddog in forum Web Design, HTML Reference and CSS
    Replies: 0
    Last Post: 28 Jul 2009, 10:42 AM

Posting Permissions

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