HighDots Forums  

IE makes a pig's breakfast out of my page!! Any ideas why?

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss IE makes a pig's breakfast out of my page!! Any ideas why? in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Alan Silver
 
Posts: n/a

Default IE makes a pig's breakfast out of my page!! Any ideas why? - 05-17-2006 , 02:13 PM






Hello,

Without wishing to get the obvious "IE is rubbish" response, could
anyone tell me why IE makes such a mess of the page linked below?

The HTML and CSS validate, and Firefox and Opera display it fine. IE
doesn't ;-)

The problem seems to be the width of the #pagebody div. If I set it to
an absolute value (in pixels or percentage), then IE shows it fine. What
I really want is to allow the div to expand to fill the width of the
browser, but use max-width to keep it from getting too wide.

I got around the problem by doing this...

#pagebody {
width: 90%;
}
div[id="pagebody"] {
width: 99% !important;
max-width: 1100px;
}

.... but I don't really like relying on the sort of thing and would
prefer to see if there is a way of doing it properly.

TIA for any help and advice.

http://www.kidsinaction.org.uk/iebarf.html

--
Alan Silver
(anything added below this line is nothing to do with me)

Reply With Quote
  #2  
Old   
Beauregard T. Shagnasty
 
Posts: n/a

Default Re: IE makes a pig's breakfast out of my page!! Any ideas why? - 05-17-2006 , 02:36 PM






Alan Silver wrote:

Quote:
Without wishing to get the obvious "IE is rubbish" response, could
anyone tell me why IE makes such a mess of the page linked below?

The HTML and CSS validate, and Firefox and Opera display it fine. IE
doesn't ;-)
IE doesn't understand position: absolute (or fixed?)
Why do you need those?

--
-bts
-Warning: I brake for lawn deer


Reply With Quote
  #3  
Old   
Alan Silver
 
Posts: n/a

Default Re: IE makes a pig's breakfast out of my page!! Any ideas why? - 05-17-2006 , 02:53 PM



In article <O2Kag.116561$eR6.90302 (AT) bgtnsc04-news (DOT) ops.worldnet.att.net>,
Beauregard T. Shagnasty <a.nony.mous (AT) example (DOT) invalid> writes
Quote:
Alan Silver wrote:

Without wishing to get the obvious "IE is rubbish" response, could
anyone tell me why IE makes such a mess of the page linked below?

The HTML and CSS validate, and Firefox and Opera display it fine. IE
doesn't ;-)

IE doesn't understand position: absolute (or fixed?)
Are you sure? I've used these before with IE and not had this sort of
problem. I know it doesn't understand fixed, but I'm absolutely sure it
understands absolute (as much as IE understands any CSS).

Quote:
Why do you need those?
Because I want the masthead to appear below the content in the HTML, but
I want it to be displayed at the top of the page. Is there a better way
of doing this?

Ta ra

--
Alan Silver
(anything added below this line is nothing to do with me)


Reply With Quote
  #4  
Old   
Spartanicus
 
Posts: n/a

Default Re: IE makes a pig's breakfast out of my page!! Any ideas why? - 05-17-2006 , 03:02 PM



"Beauregard T. Shagnasty" <a.nony.mous (AT) example (DOT) invalid> wrote:

Quote:
IE doesn't understand position: absolute
Beeshit

Quote:
(or fixed?)
IE =< 6 doesn't support fixed

--
Spartanicus


Reply With Quote
  #5  
Old   
Beauregard T. Shagnasty
 
Posts: n/a

Default Re: IE makes a pig's breakfast out of my page!! Any ideas why? - 05-17-2006 , 03:21 PM



Spartanicus wrote:

Quote:
"Beauregard T. Shagnasty" <a.nony.mous (AT) example (DOT) invalid> wrote:

IE doesn't understand position: absolute

Beeshit

(or fixed?)

IE =< 6 doesn't support fixed
Well, I knew it was one of them ... :-)

--
-bts
-Warning: I brake for lawn deer


Reply With Quote
  #6  
Old   
Arne
 
Posts: n/a

Default Re: IE makes a pig's breakfast out of my page!! Any ideas why? - 05-17-2006 , 04:15 PM



Once upon a time *Alan Silver* wrote:
Quote:
Hello,

Without wishing to get the obvious "IE is rubbish" response, could
anyone tell me why IE makes such a mess of the page linked below?

The HTML and CSS validate, and Firefox and Opera display it fine. IE
doesn't ;-)

The problem seems to be the width of the #pagebody div. If I set it
to an absolute value (in pixels or percentage), then IE shows it
fine. What I really want is to allow the div to expand to fill the
width of the browser, but use max-width to keep it from getting too
wide.

I got around the problem by doing this...

#pagebody { width: 90%; } div[id="pagebody"] { width: 99% !important;
max-width: 1100px; }

... but I don't really like relying on the sort of thing and would
prefer to see if there is a way of doing it properly.

TIA for any help and advice.

http://www.kidsinaction.org.uk/iebarf.html

Why do you have set "float: left;" for the #pagecontent?

If you remove that, IE will show the header on the right spot. I belive
IE interpret the fact that you have the id="header" placed belowe the
id="pagecontnet" in the source, as it should be on the right since
id="pagecontent" is floated.

But you need to add/change paddings to ge the space above the content
header.

--
/Arne

Proud User of SeaMonkey. Get your free copy:
http://www.mozilla.org/projects/seamonkey/


Reply With Quote
  #7  
Old   
Alan Silver
 
Posts: n/a

Default Re: IE makes a pig's breakfast out of my page!! Any ideas why? - 05-18-2006 , 09:37 AM



In article <4d1ejsF189emlU1 (AT) individual (DOT) net>, Arne
<invalid (AT) domain (DOT) invalid> writes
Quote:
http://www.kidsinaction.org.uk/iebarf.html

Why do you have set "float: left;" for the #pagecontent?
Because in the full version of this page (this is a stripped down
sample), there are two more divs to be floated next to it, giving three
columns.

Quote:
If you remove that, IE will show the header on the right spot.
You are right!! Trouble is, I need to float this div so that I can
position it next to the other two (not in this sample).

I suppose I could place all three divs in a wrapper div, but that is
adding extra markup for no semantic purpose. Isn't there a better way?

Quote:
I belive IE interpret the fact that you have the id="header" placed
belowe the id="pagecontnet" in the source, as it should be on the right
since id="pagecontent" is floated.
Fair enough, except for the fact that #header is not floated, nor is it
in the document's flow. It's absolutely positioned, so should be placed
relative to its parent container, which in this case is #pagebody. IE
gets this completely wrong. It's supposed to place it absolutely at the
top left of the parent container, with a width of 100%. IE places to the
right of its parent, but not completely clear of it, leaving a small
overlap.

Quote:
But you need to add/change paddings to ge the space above the content
header.
Huh? Don't understand what you mean here. Please clarify.

Thanks for the reply, any further help appreciated.

--
Alan Silver
(anything added below this line is nothing to do with me)


Reply With Quote
  #8  
Old   
Alan Silver
 
Posts: n/a

Default Re: IE makes a pig's breakfast out of my page!! Any ideas why? - 05-18-2006 , 09:51 AM



In article <4d1ejsF189emlU1 (AT) individual (DOT) net>, Arne
<invalid (AT) domain (DOT) invalid> writes
Quote:
Why do you have set "float: left;" for the #pagecontent?
OK, since posting my reply, I have added an extra div to hold the
#pagecontent and the other two divs that will go in there. I added one
of the two others to see how it worked, but IE now does different stupid
things with it!!

If you look at http://www.kidsinaction.org.uk/iebarf2.html in a decent
browser, you'll see a basic layout with content on the left and links on
the right. Look at it in IE, and you won't see the content, nor the
links. If you watch carefully when you load the page, you see a quick
flash of them, but then they disappear. The IE developers' toolbar shows
me that IE is positioning them correctly, but it's not showing them
right.

Any ideas? Thanks again

--
Alan Silver
(anything added below this line is nothing to do with me)


Reply With Quote
  #9  
Old   
niels.froehling@seies.de
 
Posts: n/a

Default Re: IE makes a pig's breakfast out of my page!! Any ideas why? - 05-18-2006 , 10:40 AM



Quote:
If you watch carefully when you load the page, you see a quick
flash of them, but then they disappear. The IE developers' toolbar shows
me that IE is positioning them correctly, but it's not showing them
right.
Probably PekaBoo-bug, don't use too much floats, or float in ...
inapropriate (for IE) areas. This is the most enerving bug I ever found
in IE. You think you can rely on CSS1 and setup nice floating stuff,
and in the end it all disappears.
Sometimes you can fix it by 'position: relative' (which does nothing
at all in other browsers, as long as you don't give coordinates). But I
also had cases where even that failed (20+ floats, ~10 clears).
A not for the width you may want to give to IE but not to others, the
equivalent of 'max-width' in IE is 'width', that has an alias '_width',
doesn't validate as CSS but works. Put it in conditional contents if
you like.

Quote:
Any ideas? Thanks again
Make two versions of your page, the IE-version looks terrible, bad,
usability breaks completely, then put a screen-shot of a
<better-browser-here> on the IE-version and say how much IE sucks and
they should download <better-browser-here>.
No, seriously, go to Meditation-Groups, there is nothing you can do,
so stay calm.

Quote:
Alan Silver
Ciao
Niels



Reply With Quote
  #10  
Old   
Alan Silver
 
Posts: n/a

Default Re: IE makes a pig's breakfast out of my page!! Any ideas why? - 05-18-2006 , 12:11 PM



In article <1147963206.282526.90990 (AT) y43g2000cwc (DOT) googlegroups.com>,
niels.froehling (AT) seies (DOT) de writes
Quote:
If you watch carefully when you load the page, you see a quick
flash of them, but then they disappear. The IE developers' toolbar shows
me that IE is positioning them correctly, but it's not showing them
right.

Probably PekaBoo-bug
snip

Yup, that was it. Thanks for the heads-up.

Quote:
Sometimes you can fix it by 'position: relative'
snip

Phew, that worked!! I'm glad I didn't have to do anything more than
that, I get all nervous when I get into the realms of hacks and tricks.
This was innocuous enough for even me!!

Quote:
Any ideas? Thanks again

Make two versions of your page, the IE-version looks terrible, bad,
usability breaks completely, then put a screen-shot of a
better-browser-here> on the IE-version and say how much IE sucks and
they should download <better-browser-here>.
<g>
I wish it were that simple!!

Quote:
No, seriously, go to Meditation-Groups, there is nothing you can do,
so stay calm.
Oh I'm calm, I have a pleasant and soothing background on my computer,
and some pleasant and soothing music playing!!

Thanks for the reply.

--
Alan Silver
(anything added below this line is nothing to do with me)


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.