Results 1 to 7 of 7

Thread: Nubie with Huge html fiasco....

  1. #1
    Join Date
    Jan 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Nubie with Huge html fiasco....

    My website was built to center within a large monitor. Isn't there html code I can use to center website within all monitors? Thank you in advance for any help out there. http://www.googlespage.com.

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    The layout of that site is awful. You need to totally redesign it and use relative units such as % and em instead of the absolute units you have done there. In my browser (Firefox 1.5) at my resolution (1600x1200), not only is it not centred, but the paragraphs overlap.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Jan 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thank you for taking the time to reply. Can you tell me more about that % and em?

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    There are two types of units in CSS: absolute, and relative. An absolute unit would be something like px: it's the same size, no matter what size the window is. A relative unit is something like %: it is always a percentage of the size of the containing element, and changes in proportion if the user, say, resizes the window. Also available are em and ex for fonts, which mean the size of a capital letter M or X in the user's current font size, respectively. Good sites are built on the latter.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  5. #5
    Join Date
    Jan 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thank you! I'm using absolute and interested in 'relative'. If possible, can you compare a line of my absolute code to a line or two of 'relative code'? Thank you!

  6. #6
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Well, for example:
    Code:
    table#mytab {
      margin-left: 20px; /* render 20 pixels away from the side of the page */
    }
    Or:
    Code:
    table#mytab {
      margin-left: 5%; /* render 5% of the way into the page (assuming table#mytab is a child of body) */
    }
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  7. #7
    Join Date
    Jan 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thank you so very much Twey!!

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
  •