hi, i have been trying to put a line(hr.png) below a heading using the following code : Code 1 : <img style="margin-top:-15px;" src="img/hr.png" alt="line" /> Code (markup): Code 2 : <img style="padding-top:-15px;" src="img/hr.png" alt="line" /> Code (markup): The problem is that, Code 1 works fine in IE but FF doesn't respond to it and Code 2 works fine in FF but IE does not respond to it. Please Suggest something. One more thing, in my page i have used : a:link{color:#ff33cc;} a:visited{color:#ff33ff;} a:hover{color:#999999;} Code (markup): and now i want to give different style to other set of links. How can that be done. Thanks for your time. Have a rocking Weekend
Your first question seems vague, but about the second question: If you want black for the visitted links in the navigation div, use; Hence this will only change the color of the visted links the the navigation/sidebar and not affect any other links - like th onees on the content are and the footer.
Thanks to you, now i know how to use different styles for links. Can someone please check if the margin-top problem is there in your browser as well .. or is it just me ?
Well, negative padding isn't supposed to work - and moving the image up the flow wouldn't effect anything BELOW the image, it just moves the image over whatever is above it... The real issue though is that using negative margins if you want it to depth sort OVER the anchor, it needs to be position:relative (which has the wierd quirk of reversing source order) Though I suspect this is a presentational image? If so it should be added via CSS as a background to the header or a wrapper around or inside it, NOT as an inlined image tag.