[SOLUTION] IE renders badly margins and profiles

16 years 6 months ago #48129 by beat
lnemeth wrote:

Now the bad news: I learned that my site is really, really ugly in IE! Borders around the divs, improper div locations, and more. But, I don't guess CB can fix that for me!

Anyway, thanks for your help.

Lou


Regarding IE bad rendering, there is a very simple fix that the CB team offers you for free :D :

check the page source of your site: if you see something like this at the begin:

[code:1] <?xml version="1.0" encoding="iso-8859-1"?> [/code:1]

(e.g. www.joomla.org has this stupid prolog at the begin), then you know why IE goes into "quirks mode" (see www.quirksmode.org/css/quirksmode.html for full details ! ) and your margin probably blow out, and your site template looks different on IE.

Fix is as simple as removing this not only unneeded, but also damaging prolog from your template index.php file.

Modern templates don't need this, and should not have this. Tell this loudly to your template-provider, and point him to the quirks-mode page for his night-readings.

The Joomla core team accepted to remove it from Joomla 1.5 default templates, but unfortunately not from Joomla 1.0, at least up to 1.0.13.

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info

Please Log in to join the conversation.

16 years 3 months ago #53881 by altoidboy
hey beat, i have a question:

i have some weird ie issues too, so i tried looking into this. in my template (rt_haiku) index.php file, i don't see the line you mentioned. i do however see this:

[code:1]echo '<?xml version="1.0" encoding="'. $iso[1] .'"?' .'>';[/code:1]

which i'm not sure if it's the same thing or not.

if i view my site in a browser and then pull up the source for the generated page, i see this:

[code:1]<?xml version="1.0" encoding="iso-8859-1"?>[/code:1]

so it looks like it's sneaking in there somehow!

would you advise i comment out the entire "echo" line (above)?

(edit: forgot to mention: joomla 1.0.13 and cb 1.1)

Post edited by: altoidboy, at: 2008/01/08 17:44

Please Log in to join the conversation.

16 years 1 month ago #57626 by posternb
Well, I guess my very first post in this forum lets me answer a question instead of pose a new one... :P

altoidboy wrote:

i don't see the line you mentioned. i do however see this:

[code:1]echo '<?xml version="1.0" encoding="'. $iso[1] .'"?' .'>';[/code:1]

which i'm not sure if it's the same thing or not.

if i view my site in a browser and then pull up the source for the generated page, i see this:

[code:1]<?xml version="1.0" encoding="iso-8859-1"?>[/code:1]

so it looks like it's sneaking in there somehow!

would you advise i comment out the entire "echo" line (above)?


The short answer is: yes, if you comment out the entire line:
[code:1]echo '<?xml version="1.0" encoding="'. $iso[1] .'"?' .'>';[/code:1]

...it will remove the line:
[code:1]<?xml version="1.0" encoding="iso-8859-1"?>[/code:1]

...from your final page.

Now, let me try to explain what is happening, and why. Keep in mind, I am a PHP newbie (but with other scripting experience)... however, the fact that I can explain this at least tells me I know enough to help you, and that is least I can offer. Think of this as your first lesson in PHP.

Basically, the 'echo...' line of code is just telling your browser the PHP engine how to create the final line of code.

"echo" is basically the php code for "print the rest of this sentence to the final browser-compatible page, replacing any code variables with their proper meaning, and removing any code that is inappropriate for the browser".

The parts between the single quotes ('<?xml version="1.0" encoding="') is the first part part of the sentence that is being echoed. Single quotes are used because the text inside has its own quote marks. If you are trying to echo[/] text with single quotes, it needs to be surrounded by double quotes; and if you are trying to echo[/] text with double quotes, it needs to be surrounded by single quotes. This prevents the PHP engine from being confused and accidentally echoing only part of the text.

The Dot (.) is like a plus sign... it tells the PHP code "hey, add (aka concatenate) this next bit of text to the sentence you're echoing".

Immediately following the dot (.) is a variable. That's the thing that starts with a dollar-sign ($). The variable stands for something else, which has been defined elsewhere in the system. In this case, $iso[1] = iso-8859-1.

Then, another dot, to connect the next part, between the quotes, to the sentence that is being echoed. In this case, it is the quote-mark and question mark that follows the iso-number.

Then, another dot, to connect the last part between quotes, the closed bracket.

Finally, we end our PHP statement with a semi-colon (it's like the period at the end of the sentence... it tells the PHP engine that you have finished a command).

Now, to be honest, I don't know why the '"?' and the '>' had to be concatenated by a dot, and couldn't just be put together in a single set of quotes, since there are no variables between them. I would imaging that the end could have appeared as: '"?>' instead of '"?'.'>' ... but like I said, I am a bit of a PHP newbie. If there are any pro's out there, I wouldn't mind learning if there is really a difference, or if perhaps a change in the code from a previous syntax might have just left this a bit clunkier than it should have.

I certainly hope this helps you, and any other folks who are greener than I, begin to understand why the first bit of code in the PHP side is ultimately the same thing as the 2nd but of code on the browser side.

Cheers, and good luck!
Poster Nutbag

Cheers,
Poster Nutbag

Please Log in to join the conversation.

15 years 7 months ago #71967 by amar_strange
Replied by amar_strange on topic Re:[SOLUTION] IE renders badly margins and profiles
i have been facing a strange problem since the launch of my website.....it has been 3 months i m looking for solution to this problem...but failed.....maybe i can get here..

my problem is THAT my website loads perfectly fine in firefox(progressevily) but in IE the page loads first then displays at once that takes a lot of time....

you can see yourself
www.amitylounge.com


due to this problem my website is lacking ppopularity....please help...i ll be really thankful to you

Please Log in to join the conversation.

15 years 7 months ago #72075 by amar_strange
Replied by amar_strange on topic IE renders badly margins and profiles
i was expecting solution here...:(

Please Log in to join the conversation.

15 years 7 months ago #72320 by p9939068
Replied by p9939068 on topic Re:IE renders badly margins and profiles

but in IE the page loads first then displays at once that takes a lot of time....

That sentence doesn't really make sense, so it's kinda hard to help. I went to your site using IE, and everything seems to lost well and fast. Perhaps you can try clearing your IE cache.

i was expecting solution here...

It's bad to expect things from strangers ;)


Mike Feng
Creator of SIMGallery, SIMAnswers, and ParaInvite
www.simbunch.com
twitter.com/simbunch

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.244 seconds

Facebook Twitter LinkedIn