Hi there, i don't think this has been posted before. Sorry if it has.
I am looking for a piece of code (PHP/HTML) to center a group of div tags, particualarly the ones used HERE.
Thanks for any replies
Browno
THis isn't a PHP question, it's a CSS question. In your CSS, add this:
body{ text-align: center; }
And oh dear god.... get away from Dreamweaver... and use CSS as it's faster than Java for the roll overs....
~Brett
Didn't seem to work, sorry mate. When i put that in, yes they all line up in the middle, but they're not how i arranged them :X
Thanks for the try.
Thats because you have too many absolute positioned divs which are taken out of the document flow. If your using a dreamweaver type page don't even bother trying to sort it out. go to a css site and pick up a ready made example of the page you want. Here's a couple you can try: http://glish.com/css/ and http://www.positioniseverything.net/
Ultimately of course this has nothing to do with PHP and everything to do with HTML and CSS. (Of course, PHP could generate the HTML and CSS dynamically, but that should wait until you've got the HTML and CSS designed properly).