It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming HTML Forum

Margins and position attribute wont go together

Margins and position attribute wont go together

Postby numerical25 on Thu Feb 22, 2007 3:43 am

ok, I am trying to make a webpage that has even amount of space on both side. I do this by adding this to my <div> tag.

style="Margin: auto;"

This will allow my page to have even amount of space on the left and right side no matter what. If you minimize the window, the content on the page kinda shrinks with the window and grows when you maximize the page. Now when I add this

Note: The bold means what has been added to the script

style="Margin: auto; Position: absolute; top: 0px;"

My div margin: auto; doesnt seem to exist anymore. instead it slides over to the left of the browser, leaving all the space on the right. I dont want that. I want zero space at the top and even amount of space on both sides. At the same time I want my content to shrink with the window when it gets smaller. does anyone have any solutions?
numerical25
 
Posts: 7
Joined: Thu Aug 17, 2006 3:46 pm

Postby abhijeet_thomas on Fri Feb 23, 2007 8:29 am

why dont you use a table

I mean table inside table
User avatar
abhijeet_thomas
 
Posts: 36
Joined: Mon Feb 19, 2007 10:57 am


Who is online

Users browsing this forum: Google Adsense [Bot] and 6 guests