Multiple block elements on the same line

  • Cae
  • Expert
  • Expert
  • User avatar
  • Posts: 734

Post 3+ Months Ago

I'm trying to create an image gallery with a mouseover overlay on them. In order for the overlay to function correctly I need to have it's position set to absolute so it will line up with the image it is overlaying, and absolute positioning will only work with block-level elements. However, I want the several of the images to be on the same line (so I get a 3x3 grid or the like), and as they are block-level elements each images wraps to a new line.

Short of using tables or any such nonsense, does anyone have any ideas?
  • graphixboy
  • Control + Z
  • Mastermind
  • User avatar
  • Posts: 1825
  • Loc: In the Great White North

Post 3+ Months Ago

Make sure the parent has position relative and then give all elements an absolute position or float everything left and make sure the parent is wide enough for 3 across plus margins.

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 21 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum

© 1998-2017. Ozzu® is a registered trademark of Unmelted, LLC.