This is a discussion on "Top and bottom margin for container/wrapper divs" within the Web Page Design section. This forum, and the thread "Top and bottom margin for container/wrapper divs are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
Top and bottom margin for container/wrapper divs
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
Top and bottom margin for container/wrapper divs
If you use auto for the left and right it will center the div horizontally, I tried using the following code to center the div vertically but it dosen't work.
Is there a way to center the div vertically? #container{ margin-top: auto; margin-bottom: auto; margin-left: auto; margin-right: auto; width:700px; height:510px; } Thanks! Jim. |
|
|
![]() |
| Tags |
| top, bottom, margin, containerwrapper, divs |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Wrapper problem | goldy | Web Page Design | 2 | May 30th, 2008 19:11 |
| CSS margin-bottom property problem | cangoalie | Web Page Design | 12 | Mar 8th, 2008 20:40 |
| My navigation breaks my wrapper. | tigerslicer | Web Page Design | 6 | Sep 10th, 2007 10:58 |
| Trying to align a div in a wrapper | AdRock | Web Page Design | 7 | Feb 22nd, 2007 16:03 |
| Divs within another div go to the bottom of page... | Nitesh9999 | Web Page Design | 10 | Mar 1st, 2006 14:08 |