Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating a 'Photo Box' in CSS

Status
Not open for further replies.
Joined
Jun 9, 2006
Messages
159
Location
US
I'd like to create a CSS container to neatly display a photo, a caption, and some tool links for maintenace, like "Edit" end "Delete".

The purpose of this photo box is to place within a repeating control, so that I can have any given number of boxes and they will wrap and flow seamlessly.

I am light with CSS, but I have a feeling that the secrect lies in the display property? Something like this...


Code:
<div> //images container 

<!-- image block (many!) -->
<span>
  My Image
</span>

<span>
  <img src="someImg.jpg"
</span>

<span>
  Edit | Delete
</span>
<!-- end image block  -->

</div>

Thanks,

Shawn Molloy
Seattle, WA
 
You say image block and then place it inside an inline element. Why span when div can work? Here's an alternative:
Code:
<dl>
 <dt><img src="myImage.jpg" alt="myImage" /></dt>
 <dd>Delete</dd>
 <dd>Edit</dd>
</dl>
Here be a nice example how to style it further:
 
EXACTLY what I was looking for.

Thank you!!

Shawn Molloy
Seattle, WA
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top