?
Solved

resize list of images

Posted on 2013-05-15
6
Medium Priority
?
273 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
WordPress Tutorial 1: Installation & Setup

WordPress is a very popular option for running your web site and can be used to get your content online quickly for the world to see. This guide will walk you through installing the WordPress server software and the initial setup process.

 

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 2000 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

Industry Leaders: 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!

Question has a verified solution.

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

The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
This article discusses how to implement server side field validation and display customized error messages to the client.
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…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

752 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