Forum Moderators: not2easy

Message Too Old, No Replies

how to remove the white edge?

         

angelsp

10:24 pm on May 30, 2008 (gmt 0)

10+ Year Member



created a new file from DW.

<div id="wrapper">

</div>

CSS as follows

#Wrapper {
background-image: none;
text-align: center;
background-color: #CCCCCC;
margin: 0px;
padding: 0px;
width: 100%;
}

why when I browse, I see white edge around this DIV wrapper? how to remove the edge to make the whole page background color, here is grey #CCCCCC.

thank you very much.

lexipixel

11:05 pm on May 30, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Can't definitely say without knowing what other CSS is in the cascade, but it sounds like there is a "border" property set in an element that is outside the "wrapper"... Try adding one (or more) of the border properties to the #Wrapper declaration, e.g.-

border-width:0px;

border-style: none;

penders

8:05 am on May 31, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



...how to remove the edge to make the whole page background color...

By the sounds of it you want your #wrapper div to cover the entire page/body? By default the body will have padding/margin that will push your #wrapper div in from the sides; like a border? Why not set the background-color of the body instead if this is the case?

Also, you have id="wrapper", but #Wrapper (uppercase 'W' should be lowercase).

angelsp

6:36 pm on May 31, 2008 (gmt 0)

10+ Year Member



thank you both of you.

I tried add the following css code to wrapper, no avail.

border-width:0px;

border-style: none;

used penders' method, changed body BG to the same as wrapper, it's better now.

But where exactly the border came from? I can still see them on the top and bottom of the page.

thank you

penders

7:30 pm on May 31, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



By default the body will have padding/margin that will push your #wrapper div in from the sides...

Have you tried...

body { 
padding:0;
margin:0;
}

?

angelsp

2:39 pm on Jun 1, 2008 (gmt 0)

10+ Year Member



thanks, penders, this totally solved the problem, cheers