Solved

3 pictures per row

Posted on 2011-03-01
6
276 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Botom of page is wrong color 5 25
Box Locations 6 26
Remove Space when printing webpage - Setup in Print.css 3 29
tiled banner 2 12
Unordered lists (HTML ul tags) are very handy to create menus of all types, shapes and sizes.  All it takes is a little knowledge of CSS and the possibilities are endless. First off, you should know the general format for menus created using the …
Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
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…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

685 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