473,474 Members | 1,312 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

ms ie 6 does do padding-left?

MS IE 6 is not honoring padding-left for images?

For example, with

img style="padding-left: 20px;" align="right" width="216" height="75"
src="g1/filename.gif"

I dont see what I am doing wrong, and Firefox has no problem with it.
Any corrective ideas appreciated.

Source page is http://www.scantips.com/basics4c.html
Nov 23 '05 #1
6 5612
>img style="padding-left: 20px;" align="right" width="216" height="75" src="g1/filename.gif"

First, I would recommend dropping the align, width, and height
attributes and defining them as styles as well. Try floating the image
(float:right). Also, IIRC, part of the problem may be with the
differeces in box model between IE and FF - defining a DOCTYPE STRICT
would help that some. And have you tried using margin instead of
padding?

I'm still learning my way around CSS, so these are just some thoughts -
things that have worked for me in the past.

Nov 23 '05 #2
Wayne wrote:
MS IE 6 is not honoring padding-left for images?

img style="padding-left: 20px;" align="right" width="216" height="75"
src="g1/filename.gif"

I dont see what I am doing wrong, and Firefox has no problem with it.
Any corrective ideas appreciated.

You are leaving too much to IE's imagination. Use a complete DTD Spec:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

Why are you using HTML Transitional anyway? That is NOT for new pages,
only for transitioning legacy pages to a current standard. Use HTML 4.01
Strict:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Nov 23 '05 #3
In article <0O******************************@giganews.com>,
jm***************@sohnen-moe.com says...

You are leaving too much to IE's imagination. Use a complete DTD Spec:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

Why are you using HTML Transitional anyway? That is NOT for new pages,
only for transitioning legacy pages to a current standard. Use HTML 4.01
Strict:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

Thank you, adding the loose.dtd does solve the padding problem.

I dont know where I came up with the original doctype, but it was years
ago. I recently added the image padding-left instead of hspace (goal was
space at one size instead of both sides), which appeared fine in both
Firefox and Netscape, but not in MS IE 6.

The page is very old and definitely transitional. I did add css, but
strict puts the W3C validator into a frenzy. Correcting that probably
should be a goal. But adding loose does solve the problem, thank you.

Nov 23 '05 #4
Tony wrote:
Wayne wrote:
img style="padding-left: 20px;" align="right" width="216" height="75" src="g1/filename.gif"


First, I would recommend dropping the align, width, and height
attributes and defining them as styles as well.


I'll agree about the align attribute, but not height or width. Those
attributes are not deprecated, and that's a good thing.

Ask yourself if you like to watch pages jump around while the browser
figures out image dimensions. Personally, I find it distracting, not to
mention unprofessional looking.

--
Reply email address is a bottomless spam bucket.
Please reply to the group so everyone can share.
Nov 23 '05 #5
Tony wrote:
img style="padding-left: 20px;" align="right" width="216" height="75" src="g1/filename.gif"

First, I would recommend dropping the align, width, and height
attributes and defining them as styles as well.


Width and height aren't deprecated, and that's because they aren't
formatting preferences, they're actual characteristics of the image
being referenced. This information is useful to the browser, allowing it
to layout the page correctly, even in the absence of styles, before the
images have been retrieved. It's best to specify width and height
attributes whenever possible.
Nov 23 '05 #6
On Wed, 23 Nov 2005, Harlan Messinger wrote:

[about img}
Width and height aren't deprecated, and that's because they aren't
formatting preferences, they're actual characteristics of the image
being referenced.
In practical terms it seems best to treat them as such, although the
HTML specification has some weasel words:

| When specified, the width and height attributes tell user agents to
| override the natural image or object size in favor of these values.

I would advise against doing that!
This information is useful to the browser, allowing it to layout the
page correctly, even in the absence of styles, before the images
have been retrieved.


Mostly, I agree, using the natural size of the image in the HTML.
Using the attributes as implied by the HTML specification for resizing
the image (to some other pixel-specified size) does not seem to be a
good idea.

There /can/ be situations where sizing an image in some other units,
for example em units, can be a useful technique, but that can only be
done with CSS, not HTML.
Nov 23 '05 #7

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

Similar topics

17
by: delerious | last post by:
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...
3
by: DM | last post by:
I'm trying to use a relatively positioned <div> to create a positioning context for a <p> such that the <p> will render within the <div> near the right edge. I'm using XHTML 1.0 strict. My page...
13
by: Amarendra | last post by:
Folks, This structure padding issue is bothering me now, could not locate a satisfactory answer on clc, so here it goes... I have a structure, given below: typedef struct { int flag; char...
1
by: mfunkmann | last post by:
Hi, I recently got an error and I don't know how to fix it: Error 1 'System.Data.DataColumn' does not contain a definition for 'Windows' C:\c#\CsharpPRO\Form1.Designer.cs 304 77 CsharpPRO I...
14
by: Francine.Neary | last post by:
Consider the following situation. I have a large static array s of structs, say of size 500. I also need a smaller array of chars, say of size 100, which has nothing to do with the struct. To...
2
by: kernel_panic | last post by:
Consider the following code noting the two uses of sizeof(): unsafe struct A { int value; } unsafe struct B { fixed byte value; // Error: 'A' does not have a
6
by: john | last post by:
Many times I have seen padding bits being mentioned here. What is the purpose of the padding bits?
13
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 ..???
21
by: google | last post by:
Hello, in embedded programming, different kinds of memory exist, e.g. RAM and ROM (Flash memory). For a class containing variables and constant values one might want to put the variables in RAM...
3
by: james.kirin40 | last post by:
Hi everyone, I am using Python's re module to extract some data from html. The following code never returns, and I was wondering if someone can explain to me why. Is this a problem with my...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
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
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...
0
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...

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.