 |
 |
css positioning design in IE Win all over the shop in Safari
|
 |
|
 |
|
Mac Elite
Join Date: Mar 2002
Location: Clogland
Status:
Offline
|
|
As far as I can gather the fault lies in IE6 for WIN, as 'margin-left: 150px' looks just right in Safari. Looks more like 220px in IE.
Tried using the be kind to Opera hack, to no avail.
Surely this is such a common problem that there must be a solution documented somewhere.
?????
|
|
|
| |
|
|
|
 |
|
 |
|
Forum Regular
Join Date: Apr 2003
Location: Toronto, Canada
Status:
Offline
|
|
Can you post a link to the page in question?
IE is always annoying when it comes to margin and padding (not to mention :hover).
|
|
|
| |
|
|
|
 |
|
 |
|
Clinically Insane
Join Date: Nov 1999
Status:
Offline
|
|
If the pixel measurement is different, then that sounds like a screen-resolution issue more than a browser problem. The proportions are just about right for it, though I'm guessing that if you measured the width in IE it would come out to 200px.
|
|
You are in Soviet Russia. It is dark. Grue is likely to be eaten by YOU!
|
| |
|
|
|
 |
|
 |
|
Grizzled Veteran
Join Date: Jun 2001
Location: Melbourne, Australia
Status:
Offline
|
|
Ok, try the 'Be nice to myself' hack that I apply liberally:-
1: Make sure the document validates as XHTML 1.0 or 1.1 No particular reason, just a good habit I like to stick with.
2: Add the <?xml version="1.0" ?> declaration at the top before the DOCTYPE. This forces IE to go into quirks mode, even if it's IE6. This is a good thing. It means IE5, IE5.5 and IE6 will all use the same rendering techniques on your page, so compatibility and consistency become much easier to control.
3: Wherever you have a block-level element in your document set to a specific CSS width and you also have padding and/or borders, apply two widths. E.g.
#mybox
{
padding: 10px 10px 10px 150px;
border: 1px solid black;
width: 400px !important;
width: 562px;
}
- this creates a div at the same width for both IE and non-IE PC browsers, taking into account the quirks mode method of measuring box widths. The !important declaration is also... well... important, because it forces compliant browsers to use that value in preference to the 'less' important one. The less compliant browsers correctly use the bottom one.
This 'hack' has the benefit of creating a very level playing field for your browsers, producing clean and unhacked CSS and is browser-independant (so ONE day in the far and distant future MSIE may even play nice!)
Cheers
|
|
Computer thez nohhh...
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Mar 2002
Location: Clogland
Status:
Offline
|
|
Wow, hadn't seen that "!important" trick in my travels.
Putting my feet up at the moment, but will be tweaking away first thing in the morning.
-thanks
|
|
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Nov 2004
Location: Stockholm, Sweden
Status:
Offline
|
|
read everything you see at this site and dig it, daddio
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Mar 2002
Location: Clogland
Status:
Offline
|
|
Excellent link Phil, bees knees, thanks.
Did you know that you used to be a rather famous media personality in NZ?
|
|
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Nov 2004
Location: Stockholm, Sweden
Status:
Offline
|
|
Originally posted by skalie:
Did you know that you used to be a rather famous media personality in NZ?
i seem to be in more places than i'd care to be, once people know my name. what's the NZ story then?
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Mar 2002
Location: Clogland
Status:
Offline
|
|
Nothing bad, he just happenned to be a news reader on the telly in my youth.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Mar 2002
Location: Clogland
Status:
Offline
|
|
OK, time to come clean, I bottled out, and have reworked the page in a table based layout.
Mistake #1, do not use IE6 for Win on your first attempt at making a fully css positioned website.
It would have been OK if I had developed the site using an honest browser and then chased the bugs in IE6, but backward-engineering a site built around IE6 bugs is not an option, rather start from scratch and get it right. Next site then.
Not a biggy, after the intro pages the site moves on to flash anyhows.
Thanks for the helpfull tips and links, all have been filed away for the next attempt.
A new quirk I just discovered with IE6, putting a <center> tag outside, well everything, centers averything on the whole page, including things in nested tables. I'm sure that wasn't the case with earlier versions of the browser.
|
|
|
| |
|
|
|
 |
|
 |
|
Grizzled Veteran
Join Date: Jun 2001
Location: Melbourne, Australia
Status:
Offline
|
|
Originally posted by skalie:
OK, time to come clean, I bottled out, and have reworked the page in a table based layout.
If you like when it goes live, point a link to it and we can give a few pointers as to how it could be reworked
Good luck
|
|
Computer thez nohhh...
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Nov 2004
Location: Stockholm, Sweden
Status:
Offline
|
|
Originally posted by skalie:
Mistake #1, do not use IE6 for Win on your first attempt at making a fully css positioned website.
i work to Firefox, at work (on a pc), and then fix things up for IE 5.0, 5.5, and 6.0 - i don't remember ever having to fix a glitch for Safari.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Mar 2002
Location: Clogland
Status:
Offline
|
|
Originally posted by Phil Sherry:
i work to Firefox, at work (on a pc), and then fix things up for IE 5.0, 5.5, and 6.0
If only I'd had that tip three days ago.
|
|
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Nov 2004
Location: Stockholm, Sweden
Status:
Offline
|
|
Originally posted by skalie:
If only I'd had that tip three days ago.
lesson: learned. you know, next time.
i'm sure we all have our own quirky ways of seeing a project through. that's just one less headache, for me.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Mar 2002
Location: Clogland
Status:
Offline
|
|
You know, I'm very tempted to have a second shot at it tomorrow, using Firefox.
Then when everything goes haywire in IE6 for windows ( standards for the place where I work ), exclaim......... "But it works on every other browser known to mankind !!!!!!".
Then again, I want to keep my job.
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|