Page 1 of 1

Special CSS for links

Posted: Wed Oct 12, 2005 8:12 pm
by Grover
Hello,

on my new testpage I try to use a special css for my links.
I want first the image and then the link without th unterline. Direct under the discription, startet withe the link in the same line.

My css

Code: Select all

#links{
	font-size:100%;
	margin:10px 10px 10px 40px ;
        text-decoration:none;
	background-image:url(uploads/images/gfx/button_r_arrow.png);
        background-repeat:no-repeat;
width:300px;
}
#links-small{
	font-size:75%;
        width:300px;
}
At the page I use

AVM Savvy128
  Der Savvy128 mit einem Atmel Mega128



Any idea?
Thanks

Grover

Re: Special CSS for links

Posted: Wed Oct 12, 2005 8:36 pm
by westis
Hi Grover,

To remove underline for links do like this:

Code: Select all

a {
  text-decoration: none;
}
Or if you just want to remove underline for the links in the #links div:

Code: Select all

#links a {
  text-decoration: none;
}
To add the image for the links, you put the background-url for the a element above, the same way that you've done. But you need to add padding: left: 15px; or something like that so that the image displays to the left of the link text.

Hope that helps.

Re: Special CSS for links

Posted: Wed Oct 12, 2005 8:53 pm
by Grover
Thanks for the help. It's works. What means that "a"

Re: Special CSS for links

Posted: Wed Oct 12, 2005 9:01 pm
by westis
a is the link element. In the html code you put link tex here. As you can see the link tag is . The same way you can style tr, td, div, p or any of those tags in the stylesheet.