Click here to Skip to main content
Click here to Skip to main content
Alternative Tip/Trick

Tagged as

Remove blue border when image is inside the hyperlink

, 8 Mar 2011 CPOL
Rate this:
Please Sign up or sign in to vote.
DescriptionI...

Description

If one would want to restrict the no-border CSS rule only to certain images inside any anchor tags, it is advised to use a class CSS selector rule:

CSS Code

<style type="text/css">
    a img.noborder
    {
        border: none;
    }
</style>

Usage

Using that in your HTML would look like this:
<a href="http://www.codeproject.com"><img src="Bobette.gif" alt="No border to see here!" class="noborder" /></a>
 

Note:

The same way that E#XYZ can be used to select any HTML element E with its attribute id set to XYZ the . can be used in E.XYZ to select any element E where its attribute class set to XYZ.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Manfred R. Bihy
Software Developer (Senior) Atos Origin
Germany Germany
While teaching myself BASIC and assembler on a Commodore 64 in the early 80's I got seriously infected by a tough kind of programming virus. The disease turned chronic and has since then been diagonsed as incurable. So I thought I'd put my affliction to good use and studied computer science which, after some trial and error, finally fetched me a degree.
 
This is some of the ground I've covered over the last 20 years:
  • Database design & programming
  • Application programming
  • Systems programming
  • Web applications
  • Multimedia/HTPC platform development
  • eCommerce software platform
  • Design & development of FAST based search solutions
I will not engage in listing all the languages, frameworks and tools I've worked with. The list would be too long, most probably mainly meaningless and judging by what has been accumulated just over the last 2 years surely incomplete too.
There are of course some languages that deserve to be mentioned as they played a vital role in me becoming what I am now.
  • BASIC
  • Assembler (6502)
  • C
  • Scheme (Lisp dialect)
  • Java
  • C#
The last four years were spent designing and programming FAST based search solutions using FAST Enterprise Search Platform 5.1 & 5.3. Since MS has already announced that FAST ESP will not be further developed and will die by 2017/2018, we are now looking into other technologies like Lucene/Solr, Sinequa and FAST Sharepoint Search.

Comments and Discussions

 
Generalgood finding...Excellent. my vote of 5 PinmemberSunasara Imdadhusen19-Aug-11 19:29 
GeneralReason for my vote of 5 Good points Manfred PinmvpEspen Harlinn14-Mar-11 23:41 
GeneralRe: Thanks Espen! PinmvpManfred R. Bihy14-Mar-11 23:53 
General@Deeksha: Thanks for fixing my typo and yes, the examples in... PinmvpManfred R. Bihy8-Mar-11 23:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.141216.1 | Last Updated 9 Mar 2011
Article Copyright 2011 by Manfred R. Bihy
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid