www.webdeveloper.com
Results 1 to 4 of 4

Thread: Auto resize for different resolutions?

  1. #1
    Join Date
    Sep 2007
    Posts
    5

    Auto resize for different resolutions?

    Hey guys,

    I have no content up yet, but I am developing www.andrewdeihl.com Take a look at the layout. What code can I use to make sure it looks the same no matter what the users resolution is at? on some computers it looks WAY to big and really takes away from the layout.

    Thanks!
    Andrew

  2. #2
    Join Date
    Aug 2007
    Location
    Leeds, Yorkshire, England
    Posts
    387
    Make your image re-sizeable. Use the following css and html


    Code:
    div#logo
    {
      width:50%;
    
      margin-right:auto;
      margin-left:auto;
    
    }
    
    
    img
    {
      width:100%; /* MUST BE SET so that image re-sizes - see div#pic */
                  /* don't specify the height otherwise it can get re-sized by some browsers */
    }
    
    
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    
    
    <div id="logo">
    <img src="your_logo.jpg"  />
    </div>

  3. #3
    Join Date
    Sep 2007
    Posts
    5
    thanks for the help!

    It has been some time since I did any CCS coding or HTML with out an editor.

    http://www.andrewdeihl.com/business.html

    I added before the:

    div#logo
    {
    width:50%;

    margin-right:auto;
    margin-left:auto;

    }


    img
    {
    width:100%; /* MUST BE SET so that image re-sizes -

    see div#pic */
    /* don't specify the height otherwise it

    can get re-sized by some browsers */
    }

    To the head. and the rest to the body and I get some of the code showing up.

    Any solutions?

    Thanks again,
    Andrew

  4. #4
    Join Date
    Jun 2005
    Location
    United Kingdom
    Posts
    1,043
    My tired eys don't see the page looking odd in FF. However, I see you have no DOCTYPE. Google around, and learn bout that - it will affect how your page looks in various browsers.

    Having looked at your page, I suggest you put

    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    right at the top, before <html> in your page.

    If you do that, then the charset needs to change form itf-8 to iso-8859-1.

    Then check your page for validation errors.

    Good night, and good luck.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles