473,396 Members | 2,014 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Why is there a black border around image files in IE?

347 100+
I have an image file that when I look at it in design mode, it looks fine. It has a border of 15 around it. When I look at it in Opera, the border isn't there, but if I look at it in IE8, it shows as a black box around the img. I've tried editing the css of the img file and that looks fine.

heres the line of code in question:

Expand|Select|Wrap|Line Numbers
  1. <img src="http://bytes.com/Assets/Top_Main_Photo_Healthcare.jpg" width="333" height="273" border="15" align="left">
  2.  
Thank you,

Doug
Nov 16 '10 #1
5 3660
JKing
1,206 Expert 1GB
Can you post some more code or better yet provide a link. At the very minimum please provide the related CSS.
Nov 17 '10 #2
Death Slaught
1,137 1GB
Try using inline CSS for the border and including the units (pt, px, em). If I'm not mistaken some browsers interpret
Expand|Select|Wrap|Line Numbers
  1. border="15"
and
Expand|Select|Wrap|Line Numbers
  1. border: 15 solid #000;
as 15pt, which I believe is 21px. Like JKing said, more code or a link would be great.

@JKing
I've never used the border attribute but my above statement is correct right?


Regards, Death
Nov 18 '10 #3
dougancil
347 100+
Here's the html for the page:

Expand|Select|Wrap|Line Numbers
  1. <html><style type="text/css">
  2. <!--
  3. a:link {
  4.     text-decoration: none;
  5.     color: #0085C3;
  6. }
  7. a:visited {
  8.     text-decoration: none;
  9. }
  10. a:hover {
  11.     text-decoration: none;
  12. }
  13. a:active {
  14.     text-decoration: none;
  15. }
  16. body,td,th {
  17.     color: #0085C3;
  18. }
  19. .CTA {
  20.     color: #0085C3;
  21. }
  22. .Link {
  23.     color: #0087cc;
  24. }
  25. .Text {
  26.     font-size: 14px;
  27. }
  28. -->
  29. </style>
  30. <body text="#0085C3">
  31. <table align="center" cellspacing="0" cellpadding="0" border="0">
  32.  <tr>
  33.   <td valign="middle" width="580" height="35" style="font-family: 'Trebuchet MS', Arial, Helvetica, sans-serif; color:#909090; font-size:11px; line-height:13px;"><a href="#" style="color:#0085c2; text-decoration:none;">Click here</a> if you are having difficulty viewing this email.</td>
  34.  </tr>
  35.  <tr>
  36.   <td width="580" height="596" valign="top"><table cellspacing="0" cellpadding="0" border="0">
  37.      <tr>
  38.        <td height="65" valign="top"><img src="http://bytes.com/topic/Assets/top_logo.gif" width="601" height="60"></td>
  39.        </tr>
  40.      <tr>
  41.        <td width="610" height="628" valign="top"><p><span style="font-family: 'Trebuchet MS', Arial, Helvetica, sans-serif; color:#FFFFFF; font-size:12px; line-height:15px;">
  42.            <img src="http://bytes.com/topic/Assets/Top_Main_Photo_Healthcare.jpg" width="333" height="273" border="15" align="right"></span></p>
  43.          <p><span style="font-weight: bold; font-size:28px; line-height:32px; color:#0085c2; font-family: 'Trebuchet MS', Arial, Helvetica, sans-serif;"><br>
  44.            Streamline Your <br>
  45. Healthcare IT</span>         </p>
  46.          <p><span style="font-weight: bold; font-size:16px; line-height:20px; font-family: 'Trebuchet MS', Arial, Helvetica, sans-serif; color:#4d4d4f">Busanihi tatibusdae eum re mos quo volupta ium ne et ad que volore pe volut quam</span></p>
  47.          <p><span style="font-family: 'Trebuchet MS', Arial, Helvetica, sans-serif; color:#272727; font-size:12px; line-height:15px;">Odis doluptaspe venimus solesed que volor autatint la di coresci aspedig enecest undam que dollenectur aut rem hit archicatur as sequiam ipsam nullantibus dolora dellacest ped quibea vollecum sunt, que dolorro cum fugias asperitatur, ut endi aut il et de cuptio illenimusdam nusdae. Uptasperis ut ium eosa ditas eatio blatur, occae im res repudae que volorep erepta dolor aut et, explaccae pe placcusam comnimi nistotate etur reium est, tet quibusci rem que qui cum volorio occum que cus velent. <br>
  48.            <br>
  49.            Odis doluptaspe venimus solesed que volor autatint la di coresci aspedig enecest undam que dollenectur aut rem hit archicatur as sequiam ipsam nullantibus dolora dellacest ped quibea vollecum sunt, que dolorro cum fugias asperitatur, ut endi aut il et de cuptio illenimusdam nusdae. Uptasperis ut ium eosa ditas eatio blatur, occae im res repudae que volorep erepta dolor aut et, explaccae pe placcusam comnimi nistotate etur reium est, tet quibusci rem que qui cum volorio occum que cus velent offictinctem non perum etur? Iquae dellorem sitissi minctor eperum endist exero. <br>
  50.            <br>
  51.            To find out how xyz can help you, visit us online at <b><a href="#">www.xyz.com.<br>
  52.              </a></b></span><span style="font-family: 'Trebuchet MS', Arial, Helvetica, sans-serif; color:#272727; font-size:12px; line-height:15px;"><br>
  53.               Uptium iur sedit alibusdae plibus, volente con proribusdae nobis nos escid quam doloria aut liquam, omnihiti ipis alique sequi unt volorit et repratur? Mus vitiam lab ist doluptios num fugit adis denihillacea inciendant, sa dunt poruptu repedis sit iditatur mos pa ipis mo torrovidem. Simi, inusa velenderia nosant.
  54. Ut fugiate vendemp orerovitas ipicil inci invellorum.<br>
  55.               <br>
  56.           To learn more about xyz and abc, visit us online at <b><a href="#">www.xyz.com</a></b></span></p></td>
  57.        </tr>
  58.      <tr>
  59.        <td height="27" valign="top"><span style="font-family: 'Trebuchet MS', Arial, Helvetica, sans-serif; color:#272727; font-size:12px; line-height:15px;"><img src="http://bytes.com/topic/Assets/dividing-grey-line.gif" width="600" height="27"></span></td>
  60.        </tr>
  61.      </table></td>
  62.  </tr>
  63. </table>
  64. </body>
  65. </html>
  66.  
  67.  
Nov 23 '10 #4
JKing
1,206 Expert 1GB
Wait, so you don't want the black border?

If you just want 15px of space around the image on all sides, you should be using padding not a border. The border attribute of img tags is deprecated. IE8 still supports this and default border color for images is black. By the looks of things Firefox, and likely Opera both still support the border attribute but default to white.
Nov 23 '10 #5
dougancil
347 100+
Actually no I don't want the black border and I'll try using padding instead of a border to see what the yields me.
Nov 23 '10 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Michael Allen | last post by:
Hi all you Java 2D gurus out there. I wonder if you might be able to help me. I've been dipping my toe into the world of Gaussian blurring and with the help of a few articles and some bashing my...
10
by: Vigil | last post by:
I am trying to put a 7px border around a page. If the contents don't fill up the viewport, then the border must appear all around the viewport. If the page is larger than the viewport, then the...
23
by: Bob Bedford | last post by:
I've a table. The table must not have any border. The TR (every line) must have a border, but not the lines between cells. The TR.pages must have no border. so .mytable{border:0px;} ...
5
by: Mel | last post by:
is it possible to draw a border around a row of a table ? example please... thanks
1
by: Keith Smith | last post by:
When I use this code.... window.open('gallery/pic1.jpg','windowname','width=775,height=550,resizable=yes,scrollbars=yes,top=10,left=10'); ....my web page displays a picture with a white border...
8
by: UJ | last post by:
I have a table with multiple cells and I want to draw a box around the entire table but not around the individual cells. How do I do that? TIA - Jeff.
3
by: Alex Maghen | last post by:
I'd like there to be a border around each row of my data-grid but NOT between the columns. I've tried setting BorderColor="Black" BorderStyle="Solid" BorderWidth="1px"...
3
by: John | last post by:
Does anyone know the csc command to put a black border around your whole page? Any help would be great. Thanks!
1
by: constantlearner | last post by:
I have the following code, which you can paste into an html file and try. In IE, a border appears around the selection box. How do I make the border around the selection box transparent, or have no...
5
by: smittie31 | last post by:
I am having a problem with a border around me html page. The border does not flow thru the whole html page, it cuts off halfway. --> See http://keithborom.com/marlon-sanders CSS STYLESHEET ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.