|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
#1 |
|
Member (9 bit)
Join Date: Nov 2002
Location: London, UK
Posts: 288
|
How do I position a <div> relative to a <div> wrapper?
Hi,
I have created a site which uses css for structure. I am using a div id="wrapper" to contain other divs The design is a three column page with a header-banner running across the top of the left and centre column but with the right column stretching from the top to the bottom of the wrapper. I want the main wrapper to be a specific width, with a variable height, and to center on the page. To ensure that separate divs don't get out of position I thought it best to give them positions within the wrapper - relative to the wrapper. BUT cannot figure out how to do this since the wrapper's position is centered according to windows size and therefore not specific. Please help. Thanks for reading. Last edited by Londoner; 01-15-2007 at 07:51 AM. |
|
|
|
|
|
#2 |
|
Member (9 bit)
Join Date: Dec 2001
Location: Bournemouth
Posts: 276
|
Hi there, 3rd year interactive media student, so i dont pretend to know it all but what i use is a div wraped around that all my others like this:
css code: #centre{ margin-left:auto; margin-right:auto; width:1024px; } div code: < div id ="centre" >[YOUR SITE HERE]< /div > ( remove the spaces, i had to add them to make the code show up )works for me. any good to you? if not point me in the direction of your site, and i'll check the source code, write it, then send it back. hope it helps. M@
__________________
System Spec: WinXP MediaCentre - Intel Nehalem i7 920 S1366 2.66GHz, Gigabyte GA-EX58-UD5, Nvidia 8800GTS 640Mbs DDR3, Corsair Memory 4GB (2X2GB KIT) DDR3 1600MHZ 240PIN UNBUFFERED, 4 x Seagate Barracuda 7200.11 1TB 7200RPM, OCZ Technology StealthXStream, Antec Black Twelve Hundred Tower Case, LG Electronics Blu-Ray/HD DVD-ROM COMBO 16x DVD+/-RW, 2x Acer 24" Wide V243W 5ms LCD TFT
Last edited by mattmorgan; 01-15-2007 at 10:16 PM. |
|
|
|
|
|
#3 | |
|
Member (9 bit)
Join Date: Nov 2002
Location: London, UK
Posts: 288
|
Quote:
That works! At last - I thought I'd tried everything! |
|
|
|
|
|
|
#4 |
|
Member (9 bit)
Join Date: Dec 2001
Location: Bournemouth
Posts: 276
|
cool! any more problems drop me a line.
good luck. M@ |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|