Login | Register | FAQ

image links........

+ Post a reply

2 posts Page 1 of 1

image links........

by htmlcssnewbie » Sun Apr 08, 2012 4:23 am

Good morning everyone, I need help making some images as links. Im working on this website of mine and i have the links on the nav bar on the left hand side styled with css and coded and they work. Now on my products page i have a few images that i want them too link too other websites. But everytime i add an anchor href tag too them they get styled with what's on the css page. And i don't want that. Is there another way too not get them styled with the css code that i already have for the nav links? In other words, i want them too be independent from the css file. Help!

User avatar


  • Posts: 5
  • Joined: Sun Apr 08, 2012 4:11 am

Re: image links........

by XainPro » Sun Apr 08, 2012 12:31 pm

you should have implemented style to element <a>
and this would apply style on your all <a> elements wither thay are from nav or images etc.
if you want to make them separate from all other <a> tags you should add class in your navigation <a> element
<div id="nav">
<a href="link" class="theNav" > The navigation Link </a>
<div id="product">
<a href="link" > <img src="path" > </a>

and CSS would be like this
.theNav { //your style for nav }
through this you will only add style to your nav links not the image links
hope you understand.
there are 2 or 3 more ways to achieve what you required but the way i describe is simple and wasy to understand.
if you still find any problem and unable to get required result please do let me know i will explain you in detail.
Its very Easy.
Good Luck
User avatar


  • Posts: 3933
  • Joined: Fri Feb 17, 2012 8:10 pm

+ Post a reply

Page 1 of 1