Forum Moderators: not2easy

Message Too Old, No Replies

Float Right problem

         

rectangle

6:31 pm on Oct 6, 2008 (gmt 0)

10+ Year Member



Having a bit of trouble with making my div float absolutely right.

It has 5px gap between edge of page top and side.

#apDiv4 {
width:324px;
height:509px;
z-index:0;
background-image: url(bg.jpg);
float: right;
margin-right: 1px;
margin-top: 1px;

Thanks in advance

swa66

9:41 pm on Oct 6, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Perhaps the default padding/margin of the html/body many browsers sport?

Try resetting the padding and margin on either html and body


html, body {
margin: 0;
padding: 0;
}

or even all elements:

* {
margin: 0;
padding: 0;
}

in this case if you use regular lists, you'll need to add some left margin or padding again.

rectangle

2:37 pm on Oct 7, 2008 (gmt 0)

10+ Year Member



thank you very much :-)