Removing IMG (image) border using CSS
Most people use an editor when creating blogging or creating their website. Adding an image to the website and/or blog entry is simple because most editors have a button that prompts for the source of the image and then creates the code with the proper alignment. For example:
Well, if you want your users to be able to click that image as a link to open another website or document it might put a blue hyperlink border around the image. Most website images are designed that most people understand that it’s a link without the link border. In fact, most people would consider it a bit old fashioned to see a link border around an image. You might be using a theme for a CMS like Wordpress or Jumla that has already taken this into consideration. If not, there are a couple of ways to remove it.
First, you can modify the HTML code directly. Using the previous example it would look like this:
Second, you can modify the CSS (Content Style Sheet) which is a much more efficient way. Using an external CSS allows for all pages to be updated at once. To use an external CSS you must call it out in the <HEAD> of your HTML. If you’re using wordpress this is most likely located in the header.php file of your theme. An example would be:
In HTML website:
Then, once you have an external style sheet just add the following as a new line:
Refresh your website and the border around all images should be gone.
Filed Under: Website Design


