Solved

Blue boxes around my linked pictures

Posted on 2009-07-03
6
234 Views
Last Modified: 2013-11-19
On some of my images that I use as links a blue border is created around the image. How do I remove this? What is causing this?

An example is the Play Football logo at the bottom of  this page:

http://www.ohioflagfootball.com/index.asp

Thanks.
0
Comment
Question by:elliottbenzle
6 Comments
 
LVL 6

Accepted Solution

by:
Tempelman earned 500 total points
ID: 24770945
Add border="0" to the hyperlink.... By default HTML will create that ugly blue border when you use a picture as a URL ;).
0
 
LVL 13

Expert Comment

by:Murali Murugesan
ID: 24770995
To add on to previous experts comments,

write the css for img and anchor in a generic fashion to remove the borders. Add below to ur application CSS file.

a{
    border:0;
}

img{
  border:0;
}


In case of altering border for certain images .. you can use css class


.imgNoBorder{
  border:0;
}

.imgBorder{
  border:2px;
}

<img src="a.jpg' class="imgNoBorder"/>

<img src="b.jpg' class="imgBorder"/>

-Murali*


-Murali*
0
 
LVL 13

Expert Comment

by:Murali Murugesan
ID: 24771005
Oops missed ur fix part.To fix the image border that  you mentioned you need to add border="0" for img tag. Below would fix ur current problem

<img height="152" width="250" src="images/widget_play_football_250x152.gif" border="0"/>

-Murali*
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 1

Expert Comment

by:ibs06t
ID: 24771290
when ever we give hyperlink link to image tag that border will appear
if u need to remove border to entire website

img
{
border:0px;
}

otherwise  u want remove a specific image
<img src="images/Newgif" alt="New Image" style="border:0px;" />

img
{
border:0px;
}
 
<img src="images/Newgif" alt="New Image" style="border:0px;" />

Open in new window

0
 
LVL 15

Expert Comment

by:deepaknet
ID: 24771710
Just append border=0 for your img tag.

Whenever an image is made to serve as a hyperlink, this happens.
0
 
LVL 4

Author Closing Comment

by:elliottbenzle
ID: 31599498
Thanks.
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question