This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > Stylesheets > November 2005 > ms ie 6 does do padding-left?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
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
| |
|
| >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.
| |
| Jim Moe 2005-11-22, 7:16 pm |
| 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)
| |
|
| In article <0O2dnTV7SY8fxR7enZ2dnUVZ_sidnZ2d@giganews.com>,
jmm-list.AXSPAMGN@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.
| |
| kchayka 2005-11-23, 6:36 pm |
| Tony wrote:
> Wayne wrote:
>
> 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.
| |
| Harlan Messinger 2005-11-23, 6:36 pm |
| Tony wrote:
>
>
> 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.
| |
| Alan J. Flavell 2005-11-23, 6:36 pm |
| 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.
|
|
|
| | Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |
|