How do I center the 3 elements (in the black boxes both horizontally and vertically
Thanks....
http://www.fixmysite.us/jim/
| SitePoint Sponsor |





How do I center the 3 elements (in the black boxes both horizontally and vertically
Thanks....
http://www.fixmysite.us/jim/
"Oh, and Jenkins--apparently your mother died this morning."


Firstly, you'd really need those back areas to be actual divs, I'd suggest.
You could try something like this, although it's not very flexible and would have to be different for each example if the images are all of different sizes:
Code:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Experiment</title> <style type="text/css" media="all"> .outer {width: 300px; height:300px; background: red; margin: 100px auto 0; position:relative} .inner {width: 200px; height:200px; background: blue; margin:-100px 0 0 -100px; top: 50%; left:50%; position:absolute;} </style> </head> <body> <div class="outer"> <div class="inner"> </div> </div> </body> </html>
Facebook | Google+ | Twitter | Web Design Tips | Free Contact Form
Try your hand at the new JavaScript Challenge!
If you don't like getting your feet stuck in a bog, avoid Twitter BootsTrap.

Just worked a double shift at DQ..so unless I'm mistaken he could make it more flexible by changing the margins to percentages (50%![]()
.
Look at Pauls site for vertical alignment examples
http://pmob.co.uk
Twitter-@Ryan_Reese09
http://www.ryanreese.us -Always looking for web design/development work
- ... people still use marques?! I'm guessing blinking is back to haunt, too, hmmm?

Well I must admit, marquees are rarely rarely ever used anymore, because they are deprecated in HTML 4.01 strict.
Marquees are annoying and should be avoided, but if your client absolutely must have them for some reason, then Javascript should be used instead![]()
Twitter-@Ryan_Reese09
http://www.ryanreese.us -Always looking for web design/development work
Bookmarks