SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Hybrid View

  1. #1
    SitePoint Enthusiast subBlue's Avatar
    Join Date
    Jun 2001
    Location
    Edinburgh, UK
    Posts
    51
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Page margins by CSS?

    What is the CSS to define the margins of the webpage?
    It's possible to use: leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"
    within the <body> tag, but that doesn't produce XHTML 1.0 valid code.

    TIA.
    Become Interactive because its all gone a bit subBlue

  2. #2
    .net install meltdown
    Join Date
    May 2001
    Location
    View Ridge
    Posts
    692
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can set the margins of the <body>

    body
    {
    margin-bottom:0px;
    margin-left:0px;
    margin-right:0px;
    margin-top:0px;
    }

    Depending on the layout you're looking for you could also use different variations of <div>'s and css.

    Check out glish's css layouts for some more detail.

  3. #3
    SitePoint Enthusiast subBlue's Avatar
    Join Date
    Jun 2001
    Location
    Edinburgh, UK
    Posts
    51
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks, that site is an excellent resource
    Become Interactive because its all gone a bit subBlue

  4. #4
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can also shorten it to margin: 0px, 0px, 0px, 0px; or even margin: 0px; (if all the values are the same.
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes


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
  •