Multiple block elements on the same line

  • Cae
  • Expert
  • Expert
  • User avatar
  • Joined: Feb 25, 2004
  • Posts: 734
  • Status: Offline

Post February 25th, 2010, 11:23 am

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?
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post February 25th, 2010, 11:23 am

  • graphixboy
  • Control + Z
  • Mastermind
  • User avatar
  • Joined: Jul 11, 2005
  • Posts: 1828
  • Loc: In the Great White North
  • Status: Offline

Post March 1st, 2010, 6:48 am

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.
If at first you don't succeed F1... If that doesn't work try Google!
//// Designer, Developer & Teacher - Interactive, Motion and 3D \\\\
Portfolio at WhenImNotSleeping.com

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 90 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
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.