Old 15-12-2004, 10:50   #1 (permalink)
nick
Registered User
 
Join Date: Aug 2004
Location: Chester, Lancaster Uni, UK
Posts: 30
Send a message via MSN to nick
Removing CSS image border-bottom

Hi,

I'm *really* stuck on removing the borders from my images... my text links are set to border-bottom: 1px dotted; and any images which are enclosed in an <a> tag also have a border-bottom which i'd like to get rid of.

I'm using the following code for my links:
<a href="page" class="img"><img src="image" alt="alttext" /></a>

I would have thought that the following CSS would have sorted it:
a.img {
border: none;
border-bottom: none;
}

... but it doesn't! I've tried every other combination I can think of but can't get it working... any ideas?

My CSS file is at ... - right at the bottom, if you need to look at that for help.

Cheers,
Nick

Last edited by nick : 18-02-2007 at 11:14.
  Reply With Quote
Old 15-12-2004, 11:11   #2 (permalink)
sleepingfish
css is for divs
 
sleepingfish's Avatar
 
Join Date: Feb 2003
Location: Norwich
Posts: 4,469
Lose the dot.

a img {border-bottom: none;}
  Reply With Quote
Old 15-12-2004, 11:18   #3 (permalink)
nick
Registered User
 
Join Date: Aug 2004
Location: Chester, Lancaster Uni, UK
Posts: 30
Send a message via MSN to nick
Just having...
a img {
border-bottom: none;
}
... keeps the border-bottom on the image, and also puts a minging blue border round it too. I've had to add img {border: none;} to get rid of that. You can see what I mean at www.english-in-chester.co.uk.

Nick

Last edited by nick : 15-12-2004 at 11:19. Reason: Put a dot in where it shouldn't have been!
  Reply With Quote
Old 15-12-2004, 11:21   #4 (permalink)
stickmus
hmmm...
 
stickmus's Avatar
 
Join Date: Jan 2004
Location: Yorkuk
Posts: 2,127
border: 0 ?
  Reply With Quote
Old 15-12-2004, 11:25   #5 (permalink)
sleepingfish
css is for divs
 
sleepingfish's Avatar
 
Join Date: Feb 2003
Location: Norwich
Posts: 4,469
Quote:
Originally Posted by nick
You can see what I mean at www.english-in-chester.co.uk
No I can't, where?
  Reply With Quote
Old 15-12-2004, 11:34   #6 (permalink)
nick
Registered User
 
Join Date: Aug 2004
Location: Chester, Lancaster Uni, UK
Posts: 30
Send a message via MSN to nick
Quote:
Originally Posted by sleepingfish
No I can't, where?

Down the right side, under a 'features' heading is a 'Request a Brochure' image - this has an orange dotted bottom border which turns to grey on mouse over. The 'NICKDAY' logo at the bottom has a grey dotted bottom border which disappears on mouse over. This is only in the 'wonderful' IE 6 - it works fine in Safari and Firefox.

Nick
  Reply With Quote
Old 15-12-2004, 11:41   #7 (permalink)
sleepingfish
css is for divs
 
sleepingfish's Avatar
 
Join Date: Feb 2003
Location: Norwich
Posts: 4,469
Oh right, I haven't looked too closely, but I missed your a class "img" the first time.

You could try

a.img img {border:none;}

or add "link" in there as you've used it in your existing css to define your dotted line styling.

If you have to add a class to links, using "img" might not be the best name in case browsers get confused.

( <a href="page" class="img"><img src="image" alt="alttext" /></a> )

The dotted line is there in FireFox as well.

Last edited by sleepingfish : 15-12-2004 at 12:46.
  Reply With Quote
Old 15-12-2004, 12:00   #8 (permalink)
Brown
volkswagen yellow & gold
 
Brown's Avatar
 
Join Date: Apr 2003
Location: london, england.
Posts: 6,147
its taking the default a: style.

give it a class of its own.
  Reply With Quote
Old 15-12-2004, 12:40   #9 (permalink)
Alex
div
 
Alex's Avatar
 
Join Date: Feb 2004
Location: Leeds
Posts: 646
Send a message via MSN to Alex
a.img is saying that any <a> tags with a class of img have no border?

Surely it needs to be

img a
{
border:0;
}

??
__________________
  Reply With Quote
Old 15-12-2004, 12:46   #10 (permalink)
Alex
div
 
Alex's Avatar
 
Join Date: Feb 2004
Location: Leeds
Posts: 646
Send a message via MSN to Alex
hm i gnore that, i think i`m being slow....

Just give it it's own class like brown says
__________________
  Reply With Quote
Old 15-12-2004, 12:48   #11 (permalink)
Brown
volkswagen yellow & gold
 
Brown's Avatar
 
Join Date: Apr 2003
Location: london, england.
Posts: 6,147
Quote:
Originally Posted by BoGeYMaN
Just give it it's own class like brown says
don't listen to me.
  Reply With Quote
Old 15-12-2004, 21:46   #12 (permalink)
nick
Registered User
 
Join Date: Aug 2004
Location: Chester, Lancaster Uni, UK
Posts: 30
Send a message via MSN to nick
Thanks for your help. I changed the "img" class to "linkimg" which may have been causing the problem... as far as I can tell it works fine in everything apart from Firefox, where for some reason it still dotted underlines the logo in the bottom corner, even though it has the same rules applied to it as the other images, but it's too small a problem to bother about!

Nick
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8