|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Centred Div (Horizontally+Vertically)
Hi,
How do I centre a div, and always keep a 18px gap at the top of the page (before content start) when the browser window is resized? |
|
#2
|
|||
|
|||
|
Try setting 18px padding on body for the gap and place the div in a cell (vertical-align:middle;text-align:center) of table (width:100%;height:100%).
|
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Client Side Things > Centred Div (Horizontally+Vertically) |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|