Click to See Complete Forum and Search --> : Link won't conform to css properties
TravisMath
01-14-2007, 11:51 AM
I have two links and they are both supposed to conform to the same CSS properties. However one of them is stubborn and will not. The main thing that bothers me is that they are both supposed to have no underline except when you hover over it, except one of them always has an underline. And the stubborn link is only acting that way when the link is set to the same page as the same page it's on. When it's set to anything else, (say a pound sign, or another page to the site) it works perfectly. However I need the link to be <a href="index.php"> and not <a href="#"> due to many different reasons. Can you think of any reason this link might be acting stubborn, and how I could change it to conform to the CSS?
Thanks,
Travis
tome100
01-14-2007, 12:25 PM
Hard to tell without seeing the code itself.
Is it possible that the link that is being stubborn has a style set inside it? if so, that style will override the other styles.
WebJoel
01-14-2007, 01:38 PM
I have two links and they are both supposed to conform to the same CSS properties. However one of them is stubborn and will not. The main thing that bothers me is that they are both supposed to have no underline except when you hover over it, except one of them always has an underline. And the stubborn link is only acting that way when the link is set to the same page as the same page it's on. When it's set to anything else, (say a pound sign, or another page to the site) it works perfectly. However I need the link to be <a href="index.php"> and not <a href="#"> due to many different reasons. Can you think of any reason this link might be acting stubborn, and how I could change it to conform to the CSS?
Thanks,
Travis
a {text-decoration:none;}
a:hover {text-decoration:underline;}
should be all you need, unless there is something else, -maybe an inline style, -affecting the <a href="#"></a>. We'd need to view your code.
The "#" by itself merely prevents the page from re-loading and showing your the default browser's 'error URL not found' page. "#" means "self", so it isn't actually navigating anywhere, it is already there.
You can write it as <a href="#nogo"></a> as well. Using "#" in the href="" is just a hack so that if you decide to 'validate' your page prematurely, you do not get 'malformed URI warnings' thrown back at you for every 'empty' hyperlink.