Solved

resize list of images

Posted on 2013-05-15
6
268 Views
Last Modified: 2013-05-17
Hi,
I have a list of images with spaces between each.
can I get them to resize when I reduce browser size?
I would like the images to be smaller and the spaces between them to sqeeze up.
#headingIconList ul
{
margin: 0;


list-style-type: none;

border:none;

}

#headingIconList ul li 
{
     display: inline;

 }

#headingIconList ul li a
{
text-decoration: none;
padding-right:  10%;



 
}//////////////////////////////
......................
  <ul>
             <li>
             
                 <a href=""><img  src="../images/ic1.png" alt="head"/></a>
                 <a href=""><img  src="../images/ic1.png" alt="head"/></a>
                 <a href=""><img  src="../images/ic1.png" alt="head"/></a>
                 <a href=""><img  src="../images/ic1.png" alt="head"/></a>
              
             </li>
          </ul>

Open in new window

0
Comment
Question by:jagguy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 53

Expert Comment

by:Scott Fell, EE MVE
ID: 39170337
Typically when you are using media queries to detect browser size you will have multiple sizes of your images and load as needed.

Although not optimal, you can set the size by changing the width and height in your css

ul li img{width:80%; height:80%;}
0
 

Author Comment

by:jagguy
ID: 39170377
Yes I know media queries but with images they resize automatically as the browser reduces in size
Here is an example here of a heading with an image.
See how it resizes.
http://www.mymrt.net/ComputerTraining/home.html

I cant do this for a list of images as links

img, embed, object, video {

  max-width: 100%;
   
}

Open in new window

0
 
LVL 53

Expert Comment

by:Scott Fell, EE MVE
ID: 39170403
seems to work fine http://jsbin.com/itixel/1/

<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>JS Bin</title>
  <style>
    img{

  max-width: 100%;
   
}
  </style>
</head>
<body>
 
    <ul>
             <li>
             
                 <a href=""><img  src="http://www.nuvo.net/binary/76d4/beerbuzz600.jpeg"/></a>
                 <a href=""><img  src="../images/ic1.png" alt="head"/></a>
                 <a href=""><img  src="../images/ic1.png" alt="head"/></a>
                 <a href=""><img  src="../images/ic1.png" alt="head"/></a>
              
             </li>
          </ul>
</body>
</html>

Open in new window

0
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 

Author Comment

by:jagguy
ID: 39170869
excellent images !
here is the issue , if the images are small like 100X100 and they are all in a row, the dont resize like the larger images and they drop down to the next line.

This resizes image to 80% of the screen in a media query.
ul li img{
		width:80%; height:80%;
		} 

Open in new window

0
 

Author Comment

by:jagguy
ID: 39171158
When I resize my webpage, the row of 4 images in the heading dont resize and they go on another line.
I just want the images to reduce in size as the browser reduces.

Here is what I am talking about

http://www.mymrt.net/ComputerTraining/comptest.html
0
 
LVL 53

Accepted Solution

by:
Scott Fell,  EE MVE earned 500 total points
ID: 39171557
Working Sample  http://jsbin.com/uqevuk/1/ or http://jsbin.com/uqevuk/1/edit

You will need to tweek the css but this gets you in the right direction.  

Updated css
 #headingIconList{
   /* ---   ignore ------
		text-align:left;
		position:relative; top:22%;left:15%;
   */
	   }
 #headingIconList  img{
         margin-left:1%;
         margin-right:1% ;
         width:20%;		

	   }

/* ---   ignore ------
#headingIconList ul li 
{
     display: block;

 }

#headingIconList ul li a
{
text-decoration: none;
padding-right:  10%;


}
*/

Open in new window

Updated HTML
<div id="headingIconList">
         
                 <a href=""><img  src="http://www.mymrt.net/ComputerTraining/images/ic1.png" alt="head2"/></a>
                  <a href=""><img  src="http://www.mymrt.net/ComputerTraining/images/ic1.png" alt="head2"/></a> 
                  <a href=""><img  src="http://www.mymrt.net/ComputerTraining/images/ic1.png" alt="head2"/></a>
                 <a href=""><img  src="http://www.mymrt.net/ComputerTraining/images/ic1.png" alt="head2"/></a>
          
           
        	</div><!--headingIconList-->

Open in new window

0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
This article discusses four methods for overlaying images in a container on a web page
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…

740 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