This is a discussion on "place following divs in one page centred div" within the Web Page Design section. This forum, and the thread "place following divs in one page centred div are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
place following divs in one page centred div
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
place following divs in one page centred div
hi, i have been looking on the net for definitive div centering methods.. i got somewhere and then it collapsed when i tried positioning things..
basically, i have 4 divs, one is 750px wide for the logo at the top of the page.. the next one is also 750px wide, directly below the logo and is for the menu.. then i have two divs below the menu, each one 375px wide and 100 percent high. i want to put all of these in a div that lies in the centre of the page, and if possible i would like it to be centered in as many as browsers as possible. here is my code.. stylesheet
but for seo reasons i want the bleft div at the start of the body tag... will this be a problem if i have to place them all in another css div in order... so they can be centred?? |
|
|
|
|||
|
Re: place following divs in one page centred div
<html>
<head> <title>div senter test</title> </head> c:\web\jtemp3.htm...Fridae, 30 Des 05 at 0855 <body> <div style="width:750px;text-align:center"> <div style="width:700px;border:solid 1px black">logo</div> <div style="width:750px">menu</div> <div style="width:750px"> <table> <tr> <td style="width:375px">left stuff</td> <td style="width:375px">rite stuff</td> </tr> </table> </div> </div> </body> </html> Last edited by muneepenee; Dec 30th, 2005 at 14:18. |
|
|||
|
Re: place following divs in one page centred div
i used that code...
nothing was centred on IE of FF... also that layout doesnt allow me to place my opening paragraph close to the body tag (which is in my bleft div) thanks for tryin tho.. is there no way i can just create a single centred div, and place the rest in the middle... im gonna try do that but if anyone can show me straight up then please do. |
|
|||
|
ok, basically im gettin somewhere..
i found a tutorial on the following website which is quite good.. http://www.pactumgroup.com/tutorials/index.php i use this..
if you cant just place divs in divs like this.. (and i tried making a centered table and putting my divs in there and that didnt work) how can it be done?? all these damn issues.. im not gonna go back to tables.. but why cant it be easy. <(i agree) |
|
|||
|
Re: place following divs in one page centred div
well that was easy... thank you herkalees from Massachusetts.. you are a 'top boy' as we say in london...
one more thing tho.. i wanted the entire div holding my content to have a border around it.. wen i tried puttin a border in the centered or wrap div.. the border was only right at the top and in a pointless position. is there a way to put a border around the wrap div so everything in my site is like in a box...? |
|
||||
|
Re: place following divs in one page centred div
Quote:
width: 750px; position: absolute; left: 50%; margin: 0 0 0 -375px; border: 1px solid #000; } That has to work, and if no, your remaining CSS styles might be screwing something up. Thanks for the thanks, it's nice to be thanked. You're welcome. |
|
|||
|
Re: place following divs in one page centred div
ok that still isnt working...
i think what i will do is recreate the page step by step starting with the wrap div and see how that goes... just so i know tho, what other div properties could be screwing it up.. none of them have borders..could it be to do with the margins?? or the background colours?? |
|
||||
|
Re: place following divs in one page centred div
Quote:
|
|
||||
|
Re: place following divs in one page centred div
doesnt there have to be some content in a div for a border to show up? and by content i mean something in that div, but outside any other container or div or span etc?
|
|
|||
|
Re: place following divs in one page centred div
ok.(this is all in firefox by the way)
basically i was placing a div called 'top' inside the wrap div. when i used absolute positioning for the top div.. it automatically killed the 'wrap' border.. i took it away.. and it worked. |
|
||||
|
Re: place following divs in one page centred div
Quote:
Ben, no, as long as a div contains anything, including other divs, the border will show up. The only time it won't is if it's floated and there is nothing inside the div, because then it's taken out of the flow of the document, and is empty. |
![]() |
| Tags |
| place, following, divs, page, centred, div |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Making centred div hug content | mikeym | Web Page Design | 13 | Dec 11th, 2007 22:23 |
| div wrap height centred | jillcary | Web Page Design | 1 | Jul 24th, 2007 16:05 |
| Page out of place !!! | Coty Skaj | Web Page Design | 2 | Jul 2nd, 2006 16:38 |
| Parent of/ page shows up in place of index.htm | Babawawa | Introduce Yourself | 1 | Mar 3rd, 2006 12:07 |
| Divs within another div go to the bottom of page... | Nitesh9999 | Web Page Design | 10 | Mar 1st, 2006 14:08 |