div margins

how do i get a 50px high header to be the page's width, sorta like how Louie Mantia has his header on his site with the white and grey at the top? i tried width="100%" but that still leaves some margin on the sides.

#405401

Here is his CSS file,

http://www.louiemantia.com/style.css

That should help you

**EDIT**

I think this is what you are actually looking for you

#topwrapper {

background: url(./img/topbg.gif) repeat-x;

text-align: center;

height: 77px;

width: 100%;

}

#405403

hey, where'd you find that? :P anyway, thanks a lot...i'll try it out..

#405408

np. use the "View Source" and it will show the defined Style Sheet used. Chances are the CSS is in the root and named stylesheet.css. or style.css ;-)

#405409

all you need is

height: 50px;
width: 100%;

it's usually a good idea to use the universal selector to reset all margins/paddings

* {
margin: 0;
padding: 0;
}

#405488

If you're using an block element (DIV) you don't need width: 100%. Unless the element is floating or positioned absolute.

#405627

depends on the situation..

like how i did it on louie's site. the div contains a fixed size header so the width won't be 100%

get it??

#405779

Hmm...very confusing, i'd say. i'll read up more and get back to you guys...

:-j

Edit: Hey thanx pwnzrzpat, it turns out that something was stopping it, so the universal selector works.

#405829

This post has been removed...

#406981

This is more of a hack than a real solution (I'm almost certain there's an easy solution here that I'm missing), but I would do the following:

p {
position: relative;
left: 20px; /*Note that we're moving the paragraphs over the exact width of the image.*/

I would probably wrap the text in a

tag with a given id, and then select the paragraphs based on that (like
div#text p {
/*instead of just*/
p {

).

-NC

#407031

haha, NC, that's kinda....interesting. i did get how you did it, though

so far i have the .blogbody { padding-left: 0px: } and just modified the image properties to move the paragraphs.

I'm interested in what other people also say.

#407279