www.webdeveloper.com
Results 1 to 3 of 3

Thread: row image swap dont click

Threaded View

  1. #1
    Join Date
    Sep 2006
    Posts
    375

    row image swap dont click

    Hi,

    I have code that has links in a row and swaps images.
    This was an ordeal to say the least.

    The images dont resize as i thought on browser resize so I had to use media queries to alter size of these images.

    Can I get the images to resize without adding media queries?



    Code:
    img, embed, object, video {
    
      max-width: 100%;
       
    }
    
    ul.nav
    {
        list-style-type: none;
        padding: 0;
        margin: 0;
        float: left;
        
    }
    
    
    .nav li#welcome a {
    	 background-image:url(images/ic1.png); 
      background-repeat: no-repeat; 
    	 
    	 }
    .nav li#welcome a:hover {
    	 background-image:url(images/ic1b.png); 
      background-repeat: no-repeat; 
     
      
       }
    
    .nav li#welcome2 a {
    	 background-image:url(images/ic1.png); 
      background-repeat: no-repeat; 
    	 
    	 }
    .nav li#welcome2 a:hover {
    	 background-image:url(images/ic1b.png); 
      background-repeat: no-repeat; 
      
       }
     .nav li#welcome3 a {
    	 background-image:url(images/ic1.png); 
      background-repeat: no-repeat; 
    	 
    	 }
    .nav li#welcome3 a:hover {
    	 background-image:url(images/ic1b.png); 
      background-repeat: no-repeat; 
     
      
       }
    
    .nav li#welcome4 a {
    	 background-image:url(images/ic1.png); 
      background-repeat: no-repeat; 
    	 
    	 }
    .nav li#welcome4 a:hover {
    	 background-image:url(images/ic1b.png); 
      background-repeat: no-repeat; 
      
       }
     
       
    #head ul li a
    	{
    	text-decoration: none;
    	
    	float:left;
    	margin-right:40px;
    
    	}
    
    #head ul li 
    {
         display: inline;
    	 
    
     }
    #head img
    {
          max-width: 100%;
    
     }
    
    
    #head ul
    {
    /*margin-left: 15%;*/
    padding:0;
    
    list-style-type: none;
    
    border:none;
    
    }	
    
    
    
    @media screen and (min-width: 960px) 
    {
    	ul.nav a{  height: 100px; width: 100px;}
    }
    
    @media screen and (max-width: 959px) 
    {
    	ul.nav a{  height: 50px; width: 50px;}
    }
    
    </style>
    </head>
    
    <body>
    
    lkjl
    <div id="head">
      <ul class="nav">
        <li id="welcome"><a href="home.html"></a></a></li>
        <li id="welcome2"><a href="home.html"></a></a></li>
          <li id="welcome3"><a href="home.html"></a></a></li>
        <li id="welcome4"><a href="home.html"></a></a></li>
      </ul>
    </div>
    Last edited by jagguy; 05-17-2013 at 08:25 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles