Go Back   WarriorForum - Internet Marketing Forums > Warrior Support Forums > Website Design
Register Blogs FAQ Social Groups CalendarHelp Desk

Reply
 
LinkBack Thread Tools
Old 09-25-2008, 12:04 AM   #1
Warrior Member
 
Join Date: Sep 2008
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default What is the exact css code to put a background behind a centered div tag?

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.

Jobs for 14 is offline   Reply With Quote
Old 09-25-2008, 12:06 AM   #2
Happily Self-Employed
War Room Member
 
Dan Grossman's Avatar
 
Join Date: Jan 2007
Location: Philadelphia, PA
Posts: 797
Thanks: 16
Thanked 345 Times in 53 Posts
Social Networking View Member's Twitter Profile 
Default Re: What is the exact css code to put a background behind a centered div tag?

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>

Dan Grossman is offline   Reply With Quote
Reply

  WarriorForum - Internet Marketing Forums > Warrior Support Forums > Website Design

Tags
background, centered, code, css, div, exact, put, tag

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -6. The time now is 08:41 PM.