What is the exact css code to put a background behind a centered div tag?

1 replies
  • WEB DESIGN
  • |
I want to center my website and behind the centered div tag i want to have a plain gray background but i can't seem to get any codes to work.

Please give me the exact codes and where to put them...i dont know if i should put it in a css or right in the page code.
#background #centered #code #css #div #exact #put #tag
  • Profile picture of the author Dan Grossman
    Whether you put the CSS in the page or in a separate file is irrelevant, the effect is the same if you target the appropriate element.

    HTML Code:
    <div style="background: #ccc">Gray Background Div</div>
    Signature
    Improvely: Built to track, test and optimize your marketing.

    {{ DiscussionBoard.errors[129209].message }}

Trending Topics