WordPress.org

Ready to get started?Download WordPress

Forums

Remove border from image links (6 posts)

  1. gracianotorrao
    Member
    Posted 2 years ago #

    Hi
    Using Blue taste theme, how do i remove the border from all images that have a hyperlink associated?
    Thanks

  2. Jorge
    Member
    Posted 2 years ago #

    I would add a little bit of CSS to the end of your style.css file. It would go something like this:

    a img { border:0; }

    This tells the browser that any image nested within an anchor will have a border of 0px.

    I hope this helps :)

  3. Usubba
    Member
    Posted 2 years ago #

    style="text-decoration:none; cursor:pointer;"
    Jus add the style to you anchor after href="your link" that will take care of the problem

  4. Jorge
    Member
    Posted 2 years ago #

    @Usubba, I wouldn't recommend that method, I'll explain why:

    The original post asked for "all images" not just one or a few. When you're dealing with a site-wide specification like that, it's best to add your code to the theme itself either in the style.css file or one of the template files.

    The approach style="text-decoration:none; cursor:pointer; is good for one or two elements that require that one style.

  5. gracianotorrao
    Member
    Posted 2 years ago #

    Well, let me add some info.
    The problem is thal this only happens when using Iinternet Explorer, and not with any other browsers!
    I'v had a similar problem tha was by changing some code in the top of the style.css file:

    <!--[if IE ]>
    	<style type="text/css">
    		#ddnav li ul{
    			position: absolute;
    			left: -999em;
    			margin-top: 0px;
    		}
    		#ddnav a{
    			width:auto;
    		}
    		a img {
    			border:0;
    		}
    	</style>
    <![endif]-->

    The idea was to change this property at the template level, as Jorge points out.
    I tried as above but no results.

  6. Jorge
    Member
    Posted 2 years ago #

    Personally, I would specify which version of IE in your 'if' tag, like this:

    <!--[if IE 6]><![endif]-->
    <!--[if IE 7]><![endif]-->
    <!--[if IE 8]><![endif]-->
    <!--[if !(IE 6) | !(IE 7) | !(IE 8)  ]><!--<![endif]-->

    This particular snippet allows you to specify the versions of IE that we find annoying. The last line is anything but versions 6,7, or 8 so the latest versions of Chrome, Firefox and IE9 (and up) will pick that up.

    Also, any CSS you add, let's say, to the header.php of your theme, make sure it is added after the 'style.css' file.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.