Lines under links, not under pictures...

Z

Zadig Galbaras

Hi...

I have set up this for links in my css-file - border-bottom: 1px dotted
#0000FF; -
But then I get this dotted border also under pictures.
Is there a way to avoid this properties to a link on a picture, and still
using the same css-file?

--

Regards
Zadig Galbaras
(nick)
www.tresfjording.com
-----
 
J

Jonathan N. Little

Zadig said:
Hi...

I have set up this for links in my css-file - border-bottom: 1px dotted
#0000FF; -
But then I get this dotted border also under pictures.
Is there a way to avoid this properties to a link on a picture, and
still using the same css-file?

a img { border: 0; }
 
Z

Zadig Galbaras

Thank you JNL...
....but I don't seem to get it to work....

I've copied your line into my csss-file, but no fix...
I've pasted into the styla tag in the code of teh page itself, but in
vain...
I've run outof ideas...

--

Regards
Zadig Galbaras
(nick)
www.tresfjording.com
 
S

SAZ

Thank you JNL...
...but I don't seem to get it to work....

I've copied your line into my csss-file, but no fix...
I've pasted into the styla tag in the code of teh page itself, but in
vain...
I've run outof ideas...
Please post the URL. There could be something else in your code causing
this.
 
J

Jonathan N. Little

SAZ said:
Please post the URL. There could be something else in your code causing
this.

most likely specificity, but who know without seeing his stylesheet and
markup in question...
 
M

Michael Fesser

..oO(Jonathan N. Little)
most likely specificity

Nope. He has applied underlines to his links like this:

a {border-bottom: 1px dotted #00F}

Of course this also affects image links. But the underlines are applied
to the 'a' elements, not to the images, so this:

a img {border: 0}

does _not_ work as intended, because the images don't have any border
(let aside browser defaults).

Currently CSS doesn't allow to select elements that have a particular
descendant, which would be required here. IMHO applying a class to the
image links is currently the only way to solve this issue:

<a href="..." class="img"><img src="..." alt="..."></a>

a.img {border: 0}

Micha
 
Z

Zadig Galbaras

My site: www.tresfjording.com
My css file is a mess, because I've just started learning...
http://www.tresfjording.com/css/granbergMain.css
A lot of things there I don't use, but every time I try to take something
away, something mess up....

And Michael; Your trick didn't do it...

I have this INDEX.PHP which uses the PHP code
<?PHP
include("topp.htm");
?>
and
<?PHP
include("left.htm");
?>
and
<?PHP
include("right.htm");
?>
That to make it easier to make changes in these areas of the screen.
Also, I don't want to use frames, because of that tooltip function. They
seem to not cross frame border and they are halfway hidden behind the
neighboring frame...
I tried <iframe>, but that messed up the page completely....

So.... I hva one option left, I know will work and that is to make a
map-link on the picture in question.
That'll work, I'm pretty sure...And the dotted line is gone... but probalby
return when hovering over the image... :-(

--

Regards
Zadig Galbaras
(nick)
www.tresfjording.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,539
Members
45,024
Latest member
ARDU_PROgrammER

Latest Threads

Top