[thelist] making DIV widths strict

Dave Stevens stem at stemofficial.co.uk
Tue Sep 10 12:59:14 CDT 2002


Hi,

I need to have a menu where separate images give the impression of being one
big block.

I have done this many times with tables, obviously very easy that way.
However, in my latest site I'm having a crack at the whole XHTML/CSS thing
:)

So I thought having a DIV element encasing my images with the width
specified as the same as that of the images would work, with each image
being displayed below the previous one.

However, this has not worked - the images just spread across the width of
the page. I cannot use <br /> in front of each image, as this leaves me with
a line between each image, destroying the design...

Am I being extremely dense?

The CSS:
div.rollmenu {position: absolute;
              top: 74px;
              left: 0px;
              width: 124px;
              z-index: 1;
              height: 133px;
              }

The HTML, scaled down :) :

<div id="rollmenu">
      <img />
      <img... />
      <img />
      <img... />
      <img />
      <img... />
      <img />
      <img... />
    </div>

Cheers,
Dave Stevens,  www.stemofficial.co.uk
["Oil Spills in Puddles Can Look Pretty"]




More information about the thelist mailing list