|
|
|
Junior Member
      
Group: Forum Members
Last Login: 6/14/2008 7:26:34 PM
Posts: 18,
Visits: 38
|
|
I'm not sure if you would call it floating but I am trying to get my site to go to the top and sides of the browser.
At the moment I am getting small white gaps on the top and 2 sides.
I have:
top 0px
margin-top auto
margin-left auto
margin-right auto
left 0px
right 0px
width 100%
do i have to much or am i missing something?
Thanks
xx
|
|
|
|
|
Supreme Being
      
Group: Administrators
Last Login: 10/24/2008 2:27:36 PM
Posts: 437,
Visits: 632
|
|
Well you layout will actually default to the top left corner of the browser, so in reality, you don't have to change anything to get it to do that. However, there is an automatic padding on all browsers, so it won't sit flush unless you turn that off. You can do that in a variety of ways, but it will probably be easiest for your to set the padding to zero on your body tag. So;
body {* padding: 0; }
Minus the * of course.
As for the code you have, that is in all kinds of conflict. The settings of top, left, and right, all refer to positioning, so you would need to have something like position:absolute set for those to work. Also, you can only use 2 at a time, so you would use top and left, or top and right, but not all 3. Your margins are something different, those set space around your element. The value of auto is usually used to get the item to center, because what that essentially does is takes the space around the item, and automatically applies half of that value to each side that auto is applied.
=========================
My wife has given birth to our twins, so I'm still going to be spotty around here. It never seems to correct itself does it? I'm sorry, I'm trying.
=========================
|
|
|
|