Solved

reduce list image swaps

Posted on 2013-05-17
1
275 Views
Last Modified: 2013-05-17
Hi,

I have a few questions lately but I am stuck on this.
I have a few images in a list that swap image on hover. Normal code for such a list is different for a bunch of image swaps as some code doesnt work like ul li a...

I need the images to reduce in size somehow when I resize the browser.
If I can reduce the images with media queries then I will accept this.

Here is an example here. is there any point to having the links in a div and a list?

http://www.mymrt.net/ComputerTraining/test3.html

<style type="text/css">

#swap{
width:100px; height:100px;
	background-image:url(images/ic1b.png); 
  background-repeat: no-repeat; 
  display:block;
}

#swap:hover img{
	visibility:hidden;
/*	opacity:0;*/
} 

#imgswap {
	width:100px; height:100px;
	background-image:url(images/ic1b.png); 
 float:left;
margin-right:20px;
  }
  
#imgswap:hover img {
	visibility:hidden;
/*	opacity:0;*/
	} 
#imgswap2 {
	width:100px; height:100px;
	background-image:url(images/ic1b.png); 
  background-repeat: no-repeat; 
  float:left;
  margin-right:20px;
  }
  
#imgswap2:hover img {
	visibility:hidden;
/*	opacity:0;*/
	} 

#imgswap3 {
	width:100px; height:100px;
	background-image:url(images/ic1b.png); 
  background-repeat: no-repeat; 
  float:left;
  margin-right:20px;
  }
  
#imgswap3:hover img {
	visibility:hidden;
/*	opacity:0;*/
	} 
#imgswap4 {
	width:100px; height:100px;
	background-image:url(images/ic1b.png); 
  background-repeat: no-repeat; 
  float:left;
  margin-right:20px;
  }
  
#imgswap4:hover img {
	visibility:hidden;
/*	opacity:0;*/
	} 
		
	
#head {
	margin:0;
	padding:0;
	position:relative; top:100px;
	text-decoration: none;
	text-align:left;	
}
	#head ul li a
	{
	/*text-decoration: none;
	text-align:left;
	float:left;
	padding-right:10%;*/

	}	
#head ul
{
/*margin-left: 15%;*/
padding:0;

list-style-type: none;

border:none;

}	
</style>
</head>

<body>
dss
<div id="swap">
<img  src="images/ic1.png" alt=”C” />
</div>



<div id="head">
 <ul>
             <li>
<div id="imgswap"> <a href=""><img id="imgswap" src="images/ic1.png" alt=""/></a></div>
 
        
<div id="imgswap2"> <a href=""><img id="imgswap" src="images/ic1.png" alt=""/></a></div>
<div id="imgswap3"> <a href=""><img id="imgswap" src="images/ic1.png" alt=""/></a></div>
 
        
<div id="imgswap4"> <a href=""><img id="imgswap" src="images/ic1.png" alt=""/></a></div>

    </li>
          </ul>
           
</div>

</body>
</html>

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
1 Comment
 
LVL 53

Accepted Solution

by:
COBOLdinosaur earned 500 total points
ID: 39174957
Define your widths and heights either as a percentage or use vw and vh. both of those will respond to the width and height of the page.  vw will respond to the width of the viewport, and vh will respond to the height of the viewport.

Cd&
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.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

717 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