Solved

3 pictures per row

Posted on 2011-03-01
6
273 Views
Last Modified: 2012-06-21
<div style="width:100px">

in this div I want 3 pictures per row with a description under picture


</div>

so if there are 4 pictures
1111
1
5 pictures
1111
11


all I need is the css for one picture
0
Comment
Question by:rgb192
  • 4
  • 2
6 Comments
 
LVL 40

Accepted Solution

by:
gurvinder372 earned 500 total points
ID: 35010792
try this one
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
	<style>
		.pic
		{
			display:inline;
			width:28px;
		}
		.pic img
		{
			width:28px;
			height:30px;
		}
		.pic div.description
		{
			width:28px;
			overflow:hidden;
		}
	</style>
</HEAD>

<BODY>
	<div style="width:100px">
		<div class="pic">
			<img src="DSC_6481 copy.jpg">
			<div class="description">Desc1</div>
		</div>
		<div class="pic">
			<img src="DSC_6481 copy.jpg">
			<div class="description">Desc1</div>
		</div>
		<div class="pic">
			<img src="DSC_6481 copy.jpg">
			<div class="description">Desc1</div>
		</div>
	</div>
</BODY>
</HTML>

Open in new window

0
 

Author Comment

by:rgb192
ID: 35011020
is there a way to do this without overflow hidden

because I want to display the entire words
0
 
LVL 40

Expert Comment

by:gurvinder372
ID: 35013762
would you be ok with the words getting spanned across multiple lines then?
Since the width is just 28px, can you just try and reduce the font only?
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:rgb192
ID: 35031770
yes multiple lines is ok
0
 

Author Comment

by:rgb192
ID: 35097741
how to span words across multiple lines
0
 

Author Closing Comment

by:rgb192
ID: 35244559
thanks
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

"I want to put my photos online, but I don't want them stolen.  What settings should I use?" When You Put Photos Online First and foremost, any digital file published on the WWW can be copied, stored, modified, retransmitted, etc.  Remember Naps…
So you have coded your own WordPress plugin and now you want to allow users to upload images to a folder in the plugin folder rather than the default media location? Follow along and this article will show you how to do just that!
In this Micro Tutorial users will learn how to embed custom fonts into websites using @font-face in CSS Select a font: Ensure the EULA allows you to use @font-face: Download the font: Get the browser-compatible files you need: Edit your CSS       - Name …
In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now