HighDots Forums  

Hyperlinked image border in Opera

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss Hyperlinked image border in Opera in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Headless
 
Posts: n/a

Default Hyperlinked image border in Opera - 09-02-2003 , 06:38 AM






The following code renders a visible border around the hyperlinked image
using the UA's default colours for links in IE and Moz:

a img{border-width:1px}

<a href="foobar.html"><img src="foobar.jpg" alt="foobar"></a>

but not in Opera.

I imagine that border colour normally defaults to transparent, but
shouldn't that be replaced by the default colours for links if the image
is hyperlinked?


Headless

--
Email and usenet filter list: http://www.headless.dna.ie/usenet.htm

Reply With Quote
  #2  
Old   
Headless
 
Posts: n/a

Default Re: Hyperlinked image border in Opera - 09-02-2003 , 11:09 AM






Jim Dabell wrote:

Quote:
The initial value of the 'border-style' properties are 'none'. You need to
change this to 'solid', otherwise "the computed value of border-width is
forced to 0."
Bingo.

Quote:
Is Mozilla in standards mode when this happens?
Definitely.

Quote:
but shouldn't that be replaced by the default colours for links if the
image is hyperlinked?

I would suggest adding the following rule:

a img {
color: inherit;
}
Added (only I changed it to border-color

Thanks,


Headless

--
Email and usenet filter list: http://www.headless.dna.ie/usenet.htm


Reply With Quote
  #3  
Old   
Headless
 
Posts: n/a

Default Re: Hyperlinked image border in Opera - 09-03-2003 , 02:18 AM



Jim Dabell wrote:

Quote:
but shouldn't that be replaced by the default colours for links if the
image is hyperlinked?

I would suggest adding the following rule:

a img {
color: inherit;
}

Added (only I changed it to border-color

That wasn't a typo/thinko, but your version is probably more reliable
Yes on reflection this is a bit of a funny one. I suppose it can be said
that the hyperlink element itself does not render, but rather that it
manipulates the hyperlinked content to make it recognizable as a link.
In the case of inline content such as text the colour of the content
itself is changed, in the case of replaced inline content like images a
border is applied around the image.

The question then is; does <a> have a color/border-color that can be
inherited by descendant elements, and does it depend on what is being
hyperlinked?


Headless

--
Email and usenet filter list: http://www.headless.dna.ie/usenet.htm


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.