issue with NN vs IE (Full Version)

All Forums >> [Web Development] >> Cascading Style Sheets



Message


jules213 -> issue with NN vs IE (7/9/2005 7:56:03)

Hi all,

http://www.islingtonboatclub.org.uk/ (relevant link)

Ok, i can't make the main blue box which contains the main text to sit correctly in both IE and NN. It either sits perfectly in IE, but a horizontal scroll bar is needed to view it in NN, or perfectly in NN but drops down the page and needs a horizontal scroll bar in IE.

The change comes from altering my CSS.

Perfect in NN:

#navhorizontal {
margin-left:160px;
margin-top:0px;
margin-right:0px;
}

Perfect in IE:

#navhorizontal {
margin-left:160px;
margin-top:0px;
width:100%;
margin-right:0px;
}

(the left margin is because the left navigation div is 160px wide)

There is a table inside the main blue box, which is set to 100%, but even if i remove the width, it makes no difference.

At the time of posting this the CSS is set so it is perfect in IE, but i am trying to figure it out as well as posting, so this may change.

Any insights appreciated, this is confusing me,

Thanks,




Tailslide -> RE: issue with NN vs IE (7/9/2005 8:07:01)

Hi

You've got this first thing in your code:
<?xml version="1.0" encoding="utf-8"?>
IE chokes on this so you should remove it. This might help any IE related problems.

That aside - it seems to be working fine for me in FF, Opera, Netscape 7 and IE 6.




jules213 -> RE: issue with NN vs IE (7/9/2005 8:15:47)

Ahhhh the confusion.

Ok, i thought my initial code was correct from what i had read about xhtml etc etc., but i'm now realising i really don't know what i'm doing, and just because your page validates strict, doesn't mean it is right.

on another forum i have been given a fix:

Remove the XML declaration and do this :
Code:
#navhorizontal {
margin-left:160px;
}
* html #navhorizontal {
height:1px;
}


But i am confused. I didn't change the XML declaration as it wouldn't validate, but i changed the style sheet, and it now works.

This is my declaration:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">


Now, if i wanted to write in strict and ensure that it is read as strict by crowsers, and as accessible as possible... what should i put in as my declaration.

Sorry to persist with this, but although fixes from people are great and helpful... i like to try and understand what is going on so i don't have to bug people on forums about similar issues later... give a man a glass of water and he'll stop being thirsty for an hour and all that (god i got that saying wrong, but...)

Cheers




jaybee -> RE: issue with NN vs IE (7/9/2005 8:18:39)

Before you do anything else, run your styles through the validator. They are reporting errors and while you have errors all sorts of odd things can happen.

When you've cleaned it all up then check it and if it's still causing problems come back.

CSS validator - http://jigsaw.w3.org/css-validator/




jaybee -> RE: issue with NN vs IE (7/9/2005 8:22:10)

How dare you fix it before I've finished posting!

Your XHTML is indeed valid but the css wasn't. Css will ultimately control your XHTML so it should be validated as well.

I'm a bit confused about the XML line causing it not to validate, you should only need the DTD.




jaybee -> RE: issue with NN vs IE (7/9/2005 8:24:14)

OK, that's probably down to the fact that you're using a dwt (dynamic web template).




Tailslide -> RE: issue with NN vs IE (7/9/2005 8:24:35)

You just need this:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">


The DOCTYPE is correct - it's just the xml declaration : <?xml version="1.0" encoding="utf-8"?> that could cause problems.

You may run into problems using this: <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" /> There's a whole big row rumbling on about how you serve XHTML as you have there "application/xhtml+xml" or as "text/html". In theory you're right that's the proper way of doing it. Problem is that IE doesn't like the xml stuff - it only works with text/html. Also most servers (unless you configure yours otherwise) will serve a page as text/html whatever you put in.

So the allowable (but not preferable) way of doing it is to serve it like this:
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
as text/html.

It is perfectly possible to use content negotiation so you serve IE text/html and all the goodie browsers xhtml/xml - but it's just an added complication especially if you're not up on the methods (like me!).

You don't have to use iso-8859-1 btw you can use utf-8 if you prefer.




jaybee -> RE: issue with NN vs IE (7/9/2005 8:27:59)

I knew there was a really good reason for avoiding dwt like the plague. Like Tailslide I'm not up on xml either.




Tailslide -> RE: issue with NN vs IE (7/9/2005 8:32:45)

In case anyone's interested on the serving xhtml thing (anyone... anyone...?) here's a couple of interesting examples:

Stu Nicholls serves his XHTML as application xhtml/xml but if you check the header info in FF web developer toolbar you'll see it's served as text/html anyway (as most servers do).

456 Berea St however use content negotiation to serve up text/html and HTML 4.01 strict to IE and shiny lovely xhtml/xml to FF etc.

You're haven't gone to sleep have you...?




jules213 -> RE: issue with NN vs IE (7/9/2005 8:33:00)

jaybee, first off, your avatar suggests you are a lady not to be messed with, so apologies for seeming to have fixed it... i'm new here and want to live a long a fruitful life. [:)]

please believe, that although the initial problem has been resolved, others have come up from your and tailslides replies that will require further use of your (and tailslides) obviously talented minds thus enabling you (and tailslide) to prove once and for all that us mere mortal newbies are indeed to be interminably indebted to your mastery.

Is that enough grovelling to not get an arse-whooping?

Will sort out the css, have a look at what happens then post back. am still confused about what i am adding to the top of my documents. It is easier to copy instruction than understand instruction, and i want to understand.

thanks for the replies to date.




Tailslide -> RE: issue with NN vs IE (7/9/2005 8:42:06)

quote:

ORIGINAL: jules213
... will require further use of your (and tailslides) obviously talented minds thus enabling you (and tailslide) to prove once and for all that us mere mortal newbies are indeed to be interminably indebted to your mastery.


Ooh I like you!

Here's a good article about DOCTYPE declarations: http://www.alistapart.com/articles/doctype/
My apologies if you've seen it already.

There's lots of rows in the web design world - basically anything you do will be wrong in someone's book! There are a few "experts" out there who tend to be right more than wrong (Zeldman, Meyer, Weakly, Bowman etc) and a lot of it goes onto Alistapart.com which is a good source of info.

It's an effort quite frankly to keep up with the latest thinking - you could spend all your time doing that and none designing web sites quite easily!




jules213 -> RE: issue with NN vs IE (7/9/2005 8:55:59)

Cheers Tailslide, not read that one and will do now (just to show my occasional stupidity, i was trying to figure out who would use a domain name as non-sensical as ali sta part... then arriving there showed me the error of my thought process... and i've even been to the site before...)

Point taken about keeping up. Basically, i'm a novice and i have tended to build sites for my own work, but i work within youth services, and because people i know know i can build them, i've had small charities asking me to build simple sites for them. I'd just like them to work as well as possible on different browsers and be ready for changes in the future.

All a bit confusing, but i think i'm getting there... either that or i'm doing doggy paddle in a swimming pool of blissfull delusion...

Have sorted out my CSS sheet. The original problem of this post was resolved with the fix i mentioned above. I shall read about DOCTYPES, try and get out of the house later and do my "COME ON SUMMER YOU B******, WIMBLEDON AND GLASTERS ARE OVER" dance. Then everything will be another step forward.

By the way, the earlier grovelling was only slightly tongue in cheek... have read your and jaybee's posts helping others elsewhere, and was kinda hoping you'd both be dropping into this thread.

All the best, and thanks again to both.




dpf -> RE: issue with NN vs IE (7/9/2005 8:58:11)

quote:

Is that enough grovelling
...jules...jules....you know not what you do!




Tailslide -> RE: issue with NN vs IE (7/9/2005 9:01:02)

quote:

ORIGINAL: jules213

All a bit confusing, but i think i'm getting there... either that or i'm doing doggy paddle in a swimming pool of blissfull delusion...


I may have to adopt that as my motto - there's a load of us in there with you trying to keep our heads above water!




jules213 -> RE: issue with NN vs IE (7/9/2005 9:01:46)

have i inadvertently opened a pandora's box?




Tailslide -> RE: issue with NN vs IE (7/9/2005 9:03:35)

I would say Pandora who but I'll get in trouble for being rude- oops!

This forum is rife with jealousy, intimidation and malice.

And that's just me.




jules213 -> RE: issue with NN vs IE (7/9/2005 9:03:55)

yay doggy paddle!!!




dpf -> RE: issue with NN vs IE (7/9/2005 9:04:43)

quote:

have i inadvertently opened a pandora's box?
..its what you have done to the rest of us - groveling will now be expected even more than ever! Oh well, Welcome to Outfront!




dpf -> RE: issue with NN vs IE (7/9/2005 9:05:21)

quote:

This forum is rife with jealousy, intimidation and malice.

And that's just me.
[:D][:D]




jules213 -> RE: issue with NN vs IE (7/9/2005 9:10:55)

quote:

ORIGINAL: Tailslide

This forum is rife with jealousy, intimidation and malice.



Throw in duplicity, narcissism, arrogance and cowardice, and you may have a new member sticking around for life.

quote:

ORIGINAL: dpf

quote:

have i inadvertently opened a pandora's box?
..its what you have done to the rest of us - groveling will now be expected even more than ever! Oh well, Welcome to Outfront!


ooops... still, not often i am a trail blazer, so yay me!!!




Tailslide -> RE: issue with NN vs IE (7/9/2005 9:13:07)

quote:

ORIGINAL: jules213
Throw in duplicity, narcissism, arrogance and cowardice, and you may have a new member sticking around for life.


Say... you don't work for Microsoft do you?




jules213 -> RE: issue with NN vs IE (7/9/2005 9:17:50)

Tried, but once they found out i laughed at South Park: The Movie, it was all over for me.




jaybee -> RE: issue with NN vs IE (7/9/2005 9:25:38)

I'm a pussy cat really but your grovelling is much appreciated and should serve as a lesson to others on here in how to behave. [:D]




Tailslide -> RE: issue with NN vs IE (7/9/2005 9:27:29)

quote:

ORIGINAL: jules213

Tried, but once they found out i laughed at South Park: The Movie, it was all over for me.


[:D][:D] Welcome to the forum Julian - you're going to fit right in!




jules213 -> RE: issue with NN vs IE (7/9/2005 9:30:35)

Cheers, i have to say, you guys have made working on a saturday far more pleasurable than it should be.




dpf -> RE: issue with NN vs IE (7/9/2005 9:32:22)

quote:

should serve as a lesson to others on here in how to behave.
...it has started........




womble -> RE: issue with NN vs IE (7/9/2005 10:05:44)

quote:

you guys have made working on a saturday far more pleasurable than it should be.


[sm=yikes.gif] You mean there are people out there who don't like working on a Saturday?! (alternatively, and it has been said, I need to get out and get a life.) [;)]

Welcome to OF BTW! [:)]




caz -> RE: issue with NN vs IE (7/9/2005 10:19:39)

OK, let's get down to basics the prolog does do strange things to IE and others so unless you are serving xml you don't use it. FP also uses xml if you tell it to. The search function at the top of the page is very handy, search for "prolog" and you will come across this post,

http://www.frontpagewebmaster.com/m-197558/key-prolog/tm.htm#197558

look at the Important note on that page, in fact read it all it is v e r y interesting, as they say.

Cheers
Carol




c1sissy -> RE: issue with NN vs IE (7/9/2005 18:52:34)

quote:

OK, let's get down to basics the prolog does do strange things to IE and others so unless you are serving xml you don't use it.

Caz is spot on with this one.





Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.140625