floasting to the top and sides
LearnExpression Support Forum
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        



floasting to the top and sides Expand / Collapse
Author
Message
Posted 3/25/2008 10:38:45 PM
Junior Member

Junior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior 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
Post #1239
Posted 3/26/2008 8:28:55 AM
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme 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.
=========================
Post #1240
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.

Permissions Expand / Collapse

All times are GMT -6:00, Time now is 6:51pm

Powered By InstantForum.NET v4.1.4 © 2009
Execution: 0.047. 16 queries. Compression Disabled.