Everybody! This is important. In a few days, these forums will be moving over to using the totally sweet Discourse platform. To ensure this migration happens smoothly with no loss of content, these forums are currently in a read-only mode. I do apologize for the inconvenience.

There is never a good time to turn the forums off for an extended period of time, but I promise the new forums will be a billion times better. I'm pretty sure of it.

See you all on the other side in a few days, and if you have any (non-technical) questions, please e-mail me at kirupa@kirupa.com. For technical questions, try to find a tutorial that corresponds to what you are looking for and post in the comments section of that page.

Cheers,
Kirupa

Results 1 to 8 of 8

Thread: borders in href's

  1. #1

    borders in href's

    i'm using the border-bottom attribute for my href's. how do i stop it being applied to link images?

    I've tried putting an "img" class onto those specific hrefs:

    a.img {border: 0px;}
    But it doesnt work

  2. #2
    img {border:0px}
    in your css should do it.

  3. #3
    yep....thats in also...but it doesnt stop the images with links getting borders

  4. #4
    i should probably do some experiments, but how about:
    a .img{border-bottom:0px;}

    ?

  5. #5
    176
    posts
    Registered User
    Quote Originally Posted by treatkor
    i should probably do some experiments, but how about:
    a .img{border-bottom:0px;}

    ?
    take out the period:

    a img {border-bottom:0px;}
    PHP Code:
    <zip> echo this; </zip

  6. #6
    nothing....try it yourself and see what happens...create a basic page and put this CSS in:

    a:hover {border-bottom: dotted 1px #000;}
    img {border: 0px;}
    Put an href around an image and see if you can stop the border appearing.

  7. #7
    a img{border: 0;} should work.

    Is there more code that could be interfering?

  8. #8
    only way i could figure to do it was like this:
    HTML Code:
    <html>
    <style type="text/css" media="screen">
    	a:hover {
    		border-bottom: 5px dotted #000;
    	}
    	a.nobo, img {
    		border:0px;
    	}
    </style>
    <body>
    <a href="http://treatkor.com" class="nobo">
    	<img src="lips.jpg" /></a>
    	<br /><br /><br />
    	<img src="lips.jpg" />
    	<br /><br /><br />
    	<a href="http://treatkor.com">regular link</a>
    </body>
    </html>

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Home About kirupa.com Meet the Moderators Advertise

 Link to Us

 Credits

Copyright 1999 - 2012