Forums

How do I automatically make no border on linked images? (3 posts)

  1. marc100
    Member
    Posted 6 years ago #

    If I put a link on an image then wordpress will automatically put a border around the image.
    And I have to go in and type border="0"

    is there a way that wordpress can automatically NOT put a border on images when I link them?

    Its a pain to have to find the exact right spot and type border="0" all the time.

    thanks

  2. DianeV
    Member
    Posted 6 years ago #

    This one's easy. A linked image looks like this (for brevity, I'll omit the image height, width and alt description):

    <a href="somepage" /><img src="someimage.jpg" /></a>

    So, that's an image inside a link. To remove the border, you'd just add something like this to your styles.css file; what it does is remove the border from images inside links:

    a img {border:none}

    You may have to play with it a bit (I'm a bit tired here), but that should work.

  3. ehegwer
    Member
    Posted 5 years ago #

    works like a charm, even on Firefox (2.0) If you want to remove all the lines, just put it at the top of the CSS file (above the body tag)

Topic Closed

This topic has been closed to new replies.

About this Topic