Forums

centre background image (2 posts)

  1. fishgun
    Member
    Posted 2 years ago #

    what's going wrong here?

    http://cashdoodle.com/

    I have a background image in my header "greyspacer.png" this is the lighter grey box that is obscuring the majority of my page.

    I want it to show centred behind my all my content including my logo images, leaving the darker grey as a background colour.

    I'm very new to web design, so please try and avoid one line comments like "use a div".

    thanks

  2. royho
    Member
    Posted 2 years ago #

    Well first of all you don't need an image if you are going to use just that color. You can define that in CSS. What you should do is give your wrapper a margin:0 auto; put the background color you want inside a div surrounding the rest of your content. Something like this:
    <div id="wrapper>
    <div id="content> <----style the grey box in this id
    </div>
    </div>

    And for the overall darker grey that you have, declare that in the body tag inside the CSS...

Topic Closed

This topic has been closed to new replies.

About this Topic