473,795 Members | 2,892 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

IE cannot put padding on IMGs?

I'm trying to add some simple padding to an IMG by using a padding-right
style, but it doesn't work in IE. Works fine in Mozilla and Opera, though.

Here's a link to a page which displays this IE problem:

http://home.comcast.net/~delerious1/index12.html

I do know that I can solve the problem in IE by changing padding-right to
margin-right, but then the links cannot be clicked when the mouse is over that
margin area. So I would really like to get the padding working in IE. Any
ideas?

Jul 20 '05
17 29244
On 21 Dec 2003 09:11:01 GMT, "Evertjan." <ex************ **@interxnl.net >
wrote:
<span style="padding: 3px;"><img src=".."></span>


This solution works in IE 5.5 and 6, but not IE 5.0.

Jul 20 '05 #11
On Tue, 23 Dec 2003 07:44:09 GMT, de*******@no.sp am.com wrote:
On 21 Dec 2003 09:11:01 GMT, "Evertjan." <ex************ **@interxnl.net >
wrote:
<span style="padding: 3px;"><img src=".."></span>


This solution works in IE 5.5 and 6, but not IE 5.0.


Looks like I am going to have to use the really ugly solution of:

<a href="..."><img src="..."><span >&nbsp;</span>link</a>

and in the css:

span {
font-size: 0.7
}

Jul 20 '05 #12
de*******@no.sp am.com wrote:
On Tue, 23 Dec 2003 07:44:09 GMT, de*******@no.sp am.com wrote:
On 21 Dec 2003 09:11:01 GMT, "Evertjan." <ex************ **@interxnl.net >
wrote:
<span style="padding: 3px;"><img src=".."></span>


This solution works in IE 5.5 and 6, but not IE 5.0.


Looks like I am going to have to use the really ugly solution of:

<a href="..."><img src="..."><span >&nbsp;</span>link</a>

and in the css:

span {
font-size: 0.7
}


0.7 what?

And is it not possible to edit the image to inclue the extra space you
want? Sometimes the simplest option is the best.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net > <http://steve.pugh.net/>
Jul 20 '05 #13
On Tue, 23 Dec 2003 10:21:21 +0000, Steve Pugh <st***@pugh.net > wrote:
Looks like I am going to have to use the really ugly solution of:

<a href="..."><img src="..."><span >&nbsp;</span>link</a>

and in the css:

span {
font-size: 0.7
}
0.7 what?


Oh, I forgot to put in the "em" :)

And is it not possible to edit the image to inclue the extra space you
want? Sometimes the simplest option is the best.


I guess I could add in some transparent space... but then that extra space
wouldn't scale if the text size changed.

Jul 20 '05 #14
delerious wrote:
span {
font-size: 0.7
}


0.7hobnobs or 0.7jaffacakes?

--
Toby A Inkster BSc (Hons) ARCS
Contact Me - http://www.goddamn.co.uk/tobyink/?page=132

Jul 20 '05 #15
de*******@no.sp am.com wrote:
On Tue, 23 Dec 2003 10:21:21 +0000, Steve Pugh <st***@pugh.net > wrote:
And is it not possible to edit the image to inclue the extra space you
want? Sometimes the simplest option is the best.


I guess I could add in some transparent space... but then that extra space
wouldn't scale if the text size changed.


That is true. I was going by the example you posted in the first
message, <URL: http://home.comcast.ne t/~delerious1/index12.html> which
used padding-right: 10px;
And, of course, the images themselves won't resize if the text size
changes unless you specify their sizes in ems which is not a good idea
unless the images are very simple.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net > <http://steve.pugh.net/>
Jul 20 '05 #16
On Tue, 23 Dec 2003 09:57:33 GMT, de*******@no.sp am.com wrote:
On Tue, 23 Dec 2003 07:44:09 GMT, de*******@no.sp am.com wrote:
On 21 Dec 2003 09:11:01 GMT, "Evertjan." <ex************ **@interxnl.net >
wrote:
<span style="padding: 3px;"><img src=".."></span>


This solution works in IE 5.5 and 6, but not IE 5.0.


Looks like I am going to have to use the really ugly solution of:

<a href="..."><img src="..."><span >&nbsp;</span>link</a>

and in the css:

span {
font-size: 0.7
}


I have a better solution now involving conditional comments in IE:

<a href="..."><spa n style="padding-right: 0.3em"><img src="..."></span>
<!--[if IE 5.0]><span>&nbsp; </span><![endif]-->link</a>

Of course I can't verify that this works right now as I'm encountering that
multiple IE installation version number problem, but I'm pretty sure it will
work. (famous last words, I know!)

Jul 20 '05 #17
<de*******@no.s pam.com> wrote in message
news:3f******** *******@news.md .comcast.gigane ws.com...
On Sun, 21 Dec 2003 13:39:25 GMT, "SwissChees e" <Sw*********@cf l.rr.com>
wrote:
The problem lies in trying to make the A element display as BLOCK while
including an image as part of the link. See my previous examples from yourother questions. There are better answers i'm sure but I get identicle
output in both IE6 and Mozilla, Opera is another story...


Thanks for the replies, SwissCheese.


Maybe you could wrap the IMG in a <p> element?

Jul 20 '05 #18

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1717
by: geniolatenio | last post by:
Hello guys, I have a rather strange problem with IE (googled for it to no avail) I have these two styles in the css file, right? #menu { left:13px; padding:13px 0 14px 247px; white-space:nowrap } #menu a { padding:13px 11px 13px 11px } (I have removed some items that are not relevant to the problem)
36
3053
by: phil-news-nospam | last post by:
Here is a simpler (no drop shadows) example of the padding bug I see: http://phil.ipal.org/usenet/ciwas/2006-05-08/buttons-1.html So far I find nothing in the CSS2 document that says I should get this kind of inconsistent result. -- ----------------------------------------------------------------------------- | Phil Howard KA9WGN | http://linuxhomepage.com/ http://ham.org/ |
1
8592
by: rdlauer | last post by:
For some time now we've been seeing seemingly random errors thrown by an application "Padding is invalid and cannot be removed". Everything I've read about this online suggests that the machine key is different between two load-balanced servers, but this application is running on just one server. The other odd thing is that the errors come in groups. Over a short period of time (5 minutes or so) many different users will hit this error...
3
5835
by: floppyzedolfin | last post by:
Hi there. I'm coding an encryption / decryption program. At this very moment, I think I should be pretty close from the end, but there's something blocking me on my way. There's a "Padding is invalid and cannot be removed" error raised when closing the cryptostream (or FlushFinalBlock-ing it). For what I have read, Padding errors are due to an incorrect padding : PKCS7 is recommended.
1
1692
by: lilOlMe | last post by:
I'm really starting to lose it on this problem. I have created 2 <div> tags that will server as boxes. While explaining my problem I will refer to these <div> tags as Boxes...to keep things simple. I'd like to draw a box with a border...have the content started 5px away from its edges. I will refer to this box as the "outter box" Then I'd like to draw another box within the box...I will refer to this box as the "inner box". The inner...
0
1582
Screaming Eagle
by: Screaming Eagle | last post by:
I haven't recieved any information that I could use, and researching this issue hasn't turned up any worthy results. Hence my reposting. Since I have had no reply, and my associates wish to move things along, I have been forced to use regular frames for the site (which works fine, but visually its not what I'd like to produce). Ideally, I would like to fix this problem I currently have with iframes, and do without using regular frames. If anyone...
13
3060
by: aarklon | last post by:
Hi all, arrays are guaranteed to be contiguous with no padding before or after any array member , but what about enums ..???
3
3866
by: vippstar | last post by:
Hey comp.lang.c I'm somewhat confused with bit padding. I tried searching the FAQ, but there isn't a search feature, so I used google and the search query: site:c-faq.com padding. I did not find anything relevant to bit padding, only byte padding for structs, which more or less I understand. All sections are from n1256
1
1563
by: dkoro | last post by:
I have a very simple page with a left menu column, and for some reason I just cannot tighten up the spacing between the <p>'s in the left column (the "Item #1" etc)...setting both margins and padding to 0 has no effect. Its driving me crazy! Currently its in a <blockquote> which I thought was the problem but removing the <blockquote> doesn't help. Any ideas? Here's the style sheet: body { font-family:Arial, Helvetica, sans-serif; ...
0
9673
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9522
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10165
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10002
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9044
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7543
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5565
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2921
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.