Solved

3 pictures per row

Posted on 2011-03-01
6
274 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
get multiple images to align right 5 45
Making my existing website "mobile friendly"... 10 36
CSS Question 5 44
Not showing page correctly 3 31
Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
In this tutorial viewers will learn how to define a gradient in CSS. Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Gradient. Define the background as "linear-gradient(to right, #ee3668, black)". Ensure you …
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…

863 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

22 Experts available now in Live!

Get 1:1 Help Now