How do I center the 3 elements (in the black boxes both horizontally and vertically

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:

<html lang="en">


<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<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;}

<div class="outer">
  <div class="inner">



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

  • … 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 :slight_smile: