• The css stylesheet uses an image for the background on my website, https://www.sentient.mmgtv.org. For some reason though, it is only showing up centered on some browsers. On most IE browsers it does not work. It also doesn’t work with Firefox 4 or 5.

    Any help please? Here is the code:

    body
    { 
    
    background:#000000
    url(https://www.mmgtv.org/sentient/images/bg.png) no-repeat fixed top center;
    
      display: block;
      margin: 0;
      padding: 0;
      text-align: center;
      top center no-repeat;
      color:#666;	
    
     }
    
    .topbar			{ background:URL(../images/topbar.png) top left repeat-x; position:relative; top:0; left:0; height:6px; }
    .imgborder		{ background:#FFFFFF; padding:3px; border:1px solid #ccc;}

Viewing 6 replies - 1 through 6 (of 6 total)
  • On thing I noticed right off the bat was that the body wasn’t taking up the whole window space, and since the background image position is tied to the width of the body element it was offset to the left.

    body { width: 100%}

    I added that to the body definition in sentient.css and it seemed to center the page, but the background image is really hard for me to see with my eyes so it may need more tweaking.

    Thread Starter sentientprod

    (@sentientprod)

    I changed the BGcolor to red to make it easier to see. How exactly did you input the code because I tried that and nothing is working… I changed the min-width and width in styles.css to 100% instead of 1200px and it seems to have fixed it but now everything is pushed to the left instead of being centered.

    I just used firebug to make the tweak and it was telling me that the body element was located in the sentient.css file. It was not in the style.css file. Sorry if it wasn’t clear before.

    Thread Starter sentientprod

    (@sentientprod)

    What about the centering?

    Thread Starter sentientprod

    (@sentientprod)

    Yeah… I changed it to what you suggested and nothing is really working.

    Thread Starter sentientprod

    (@sentientprod)

    Can someone please view my website on any older browser and tell me if the body is aligned to the left or if it’s centered because I don’t have a big resolution to test it on.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Aligning the BG’ is closed to new replies.