Webpage design question

Discussion in 'OT Technology' started by NPH, May 15, 2006.

  1. NPH

    NPH Guest

    We are trying to design a new webpage and the problem we are having is that we get horizontal scroll bars and the content seems to be off-centered. What is the code to have the frame/content auto-center no matter what the user's resolution is?
     
  2. kingtoad

    kingtoad OT Supporter

    Joined:
    Sep 2, 2003
    Messages:
    55,923
    Likes Received:
    11
    Location:
    Los Angeles
    1. Don't use frames
    2. Design to lowest common denominator
    3. Use percentage widths, not pixels.
     
  3. Rawrer

    Rawrer New Member

    Joined:
    May 15, 2006
    Messages:
    2
    Likes Received:
    0
    Location:
    Canada
    To center with CSS, go something like this:

    .*classoftheobject* {
    margin-left:auto;
    margin-right:auto;
    }

    And, what he said, never use frames (ew) and assign a width to your site. Not sure if you know how to do that though...
     
  4. P07r0457

    P07r0457 New Member

    Joined:
    Sep 20, 2004
    Messages:
    28,491
    Likes Received:
    0
    Location:
    Southern Oregon
    Correction:

    Never use frames or tables :)
     
  5. NPH

    NPH Guest

    We're using div tags to contain the design structure.
     
  6. kingtoad

    kingtoad OT Supporter

    Joined:
    Sep 2, 2003
    Messages:
    55,923
    Likes Received:
    11
    Location:
    Los Angeles
    Then the easiest way to do it is apply a:

    Code:
    margin: 0px auto;
    
    To the center div.... and avoid saying "frame" if you're using divs.
     
  7. NPH

    NPH Guest

    I'll try that.. thanks for the feedback!
     

Share This Page