English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

HELP! am a newbie .
look at this code.
h1 { font-family:Georgia, "Times New Roman", Times, serif;
font-size : 15px;
color : #666666;
background-color : #ffffff ;
}
body { background-color : #ffffcc ;
color : #ff0000;
margin-left:250px;
margin-right:250px;
line-height: 180%
}
my problem is , i want the background-color : #ffffff for h1 to span the width 100% of browser , instead of 250,250 px margin. Currently that's not the case. what should i do?

2006-10-14 07:19:56 · 4 answers · asked by psychic being 2 in Computers & Internet Programming & Design

4 answers

Add to h1: width:100%;position: absolute; left: 0px;

Of course, you'll have to position it, too.

The other option, perhaps simpler to implement if you have multiple

s is to make the body full width and add the margin specification to a
or other container for the rest of the content.

2006-10-14 07:52:53 · answer #1 · answered by injanier 7 · 0 0

Well the h1 is contained in the body tag, that's why it's taking on the 250 width of the body. Maybe place a div inside the body and set that dive to 250 wide and place a repeating background in the body to give the effect that the h1 is stretching across the screen.

2006-10-14 21:43:03 · answer #2 · answered by joedag32 2 · 0 0

Set your h1 width to 100%

2006-10-14 14:22:22 · answer #3 · answered by Interested Dude 7 · 0 0

Go to www.w3schools.com

2006-10-14 14:27:46 · answer #4 · answered by SaY wHaT >? 2 · 0 0

fedest.com, questions and answers