Results 1 to 6 of 6

Thread: Centering layout in IE, and make background image go all the way down

  1. #1
    Join Date
    Dec 2007
    Posts
    19
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Centering layout in IE, and make background image go all the way down

    Hey, I'm working on a new layout for my site, and I'm using a CSS based template.
    But I've got two problems,

    1. it looks awesome on Firefox, but it isn't centering on internet explorer, how do I fix this?

    2. I'm using a background image for my different sections, but I really want them to stretch all the way down the page in stead of just stopping when there isn't any content left.

    I tried looking on http://www.w3schools.com/css/default.asp but I didn't really see anything that helps

    this is my css:
    <edited>

    I didn't write this myself, I modified an exciting template
    Last edited by Briggs; 04-08-2008 at 04:39 AM.

  2. #2
    Join Date
    Apr 2006
    Posts
    190
    Thanks
    3
    Thanked 7 Times in 7 Posts

    Default

    Using

    Code:
    margin: auto;
    in your body portion

    Code:
    body {
    	float: center;
    	background: #830109;
    	color: #000000;
    	font: normal 62.5% "Lucida Sans Unicode",sans-serif;
    	margin: auto;
    }
    should do the trick and lose the float: center; it is not needed.
    Ryan
    Sevierville, TN

  3. #3
    Join Date
    Dec 2007
    Posts
    19
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    sadly that didn't work

  4. #4
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    1,160
    Thanks
    17
    Thanked 277 Times in 275 Posts

    Default

    Do you have a DTD on your page
    Have you had something similar to this above you html tag:
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
       "http://www.w3.org/TR/html4/strict.dtd">
    If nothing works, together with the margin:auto;, then a live page or your code could get this easy

    See if it helps
    Learn how to code at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph!

  5. The Following User Says Thank You to rangana For This Useful Post:

    Briggs (04-02-2008)

  6. #5
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    to center content within the <body> tags use text-align:center.

    In regards to the 100% height background, some HTML code would be helpful. It really depends on how your divs are layed out.

  7. #6
    Join Date
    Dec 2007
    Posts
    19
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by rangana View Post
    Do you have a DTD on your page
    Have you had something similar to this above you html tag:
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
       "http://www.w3.org/TR/html4/strict.dtd">
    If nothing works, together with the margin:auto;, then a live page or your code could get this easy

    See if it helps
    *sighs* I don't know how I could have missed this

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
  •