Umbraco- weird stylesheet problem - css

I'm developing a user control that will be embedded in Umbraco. It's been a long slog but I've got it mostly working.
At this point I have a template in Umbraco that refers to my web control as a marco. So far so good. It looks great in Firefox, but breaks in IE7.
The weird part is that the control looks perfect in both IE7 and Firefox when I view it in my test project, outside of Umbraco. Inside Umbraco, Firefox looks great and IE7 breaks. Some of the styles are applied in IE7 but not others, breaking the rendering.
I've checked to make sure the CSS files are in the right place in Umbraco, experimented with a few other things, but no luck. I can't think of anything that would cause IE to break this way only when the control is hosted in Umbraco. If the CSS files were inaccessible, it should break completely, not apply some of the styles but not others.
TIA

EUREKA:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
I didn't have it in my template. Duh.

Related

IE rendering issue

My website is not rendering properly in IE browser and in other browsers like chrome, safari and firefox it displays fine. I am not sure if any div has a problem or is it the style sheet.
Below is the url for which I am talking about:
http://unyforme.com/demo/
Not sure what is causing the bad layout in IE.
Please advise if any one finds a clue and/or point out some thing for me?
Your DOCTYPE must must must be the first line, or IE renders in quirks mode.
Remove everything before:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
Also, to make the site load significantly quicker, move all your javascript to the bottom, just before the end of your body tag.

My responsive website doesn't look correct on Mobile devices?

I've followed a great tutorial for designing a responsive Navigational menu.
When testing the menu on my desktop PC, all looks great. Then as a test, I looked at the website on my mobile - Sony Ericsson Aino (Lame I know) and it looked like the menu couldn't pick up the CSS (style.css). Strange because I've linked my stylesheet properly. I'm not sure if it's my phone but can anyone see what I've done wrong here? Go to www.testing123.co.za .
Problem is that I don't have any tablets, androids or other mobile devices to view the site on, so I don't know if the website (menu) is working on those devices.
Do you need me to copy the CSS in here? Otherwise you can always source code it.
Thanks in advance!
The Aino uses NetFront browser 3.5
The CSS/HTML standards that this phone supports are listed here: http://dl-www.sonymobile.com/cws/download/1/708/159/1277364112/DW-88004-dg_web_browser_nf3_r31a.pdf [see page 12]
I suggest you start with some very basic CSS and test, then keep adding to your stylesheet until it doesn't work.
Note: Older NetFront Browsers (below version 3.5) will ignore the rest of the stylesheet after a media query.
On another note, your stylesheet has the media queries listed from largest to smallest. From a mobile-first perspective you should reverse these, so the smallest is first.
You're using the HTML5 nav element with a XHTML 1.0 DOCTYPE. Change:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
to
<!DOCTYPE html>
<html>

Why is header's css not loading correctly on a specific page in IE?

The page not working in IE8 is http://gainntrain.com/shopping/index.php
It IS working chrome and firefox...
This page loads from CubeCart, but the page I edited to alter the skin http://gainntrain.com/shopping/skins/KitaBlue/styleTemplates/global/index.tpl
That page has the same problem in IE8
The thing I don't understand is that the same header works fine on other pages of the site in IE8
Changed the <header> and <nav> tags to divs with classes using the styles that the tags had and that seems to be handling it just fine so thanks for the answers!
Look at
Validator
and
Jigsaw
Notice that the only errors in Jigsaw are CSS3 rules.
I would suggest looking at the HTML because of this line in Validator's analysis of your page
Line 11, Column 107: end tag for "link" omitted, but OMITTAG NO was specified
…="http://www.gainntrain.com/site/css/style.css" type="text/css" media="screen">
✉
You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
It looks like your document is using HTML5 features but is using an older doctype declaration. I would suggest changing:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
to:
<!doctype html>
<html>
That is as long as it doesn't break the site. :]
Try an online HTML validator on the output, like this one. If you choose the right validator, it's likely to be able to pick out the sticky bits that work better in some browsers than others. Sifting through code by hand to find a solution like this is difficult and time-consuming.

Perplexing IE issue with auto margins

I've had 2 people looking at this all morning, and I can't seem to figure out why IE 8 and 7 is pushing my entire page over to the left. Not having any issues in any other browsers. There is also an problem with the menu, it doesn't seem to work on this page either. Can anyone spot what is going on here? Any help would certainly be appreciated.
http://wineexcursion.com/dev/index.php/event_info/event_schedule/
The comment at the top of the markup is forcing IE to render in Quirks mode, which is what is causing the problems. In IE, if anything precedes the doctype in the markup, it triggers Quirks mode rendering.
From the page source:
<!-- Brown Callout/Brown Sidebar -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
If I use IE dev tools to force the page into standards mode, the page centers as it should and the menu works.

Everything is way off in IE7 & IE8

It's just insane, I've made soo many websites and still it seems every time IE7 and IE8 behave differently every time!!
I'm working on a friends website: Class One
Except I can't seem to get my head around why IE7 and 8 seem to be adding in extra spacing. The positioning of the text overlay div on the jquery slider is off a few pixels and wont cover the full width and the inner div float left content just looks way off, why wont it meet the float right, the maths is right!
I would normally attach code if I knew the problem area but It would be an awful lot of css and html to attach so just put the link up instead.
Thanks in advance!
P.S. I am aware of the php error code, I am getting the hosting provider to sort that as I type! :)
Turns out the php warning is before the doc type so this maybe it?
The major problem here is the DOCTYPE.
This tag must be the first tag in you code, but isn't, because of the PHP Warning.
See:
<br />
<b>Warning</b>: mkdir() [<a href='function.mkdir'>function.mkdir</a>]: Permission denied in <b>C:\Program Files\HSphere\3rdparty\PHP\PHP5\prepend.php</b> on line <b>33</b><br />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
Change beginning of output to
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
If you don't put this tag in the first line, IE will activate quirks mode, and very strange things will happen. When a browser activate quirks mode, many things change, as box model.
NOTE: many browsers has quirks mode, not only IE (I know that firefox has too).
Note: correct use of DOCTYPE will reduce the differences between IE7 and IE8, but not remove all of them.
Ever heard of the IE box model? It's so fun.
Here's some info:
http://stuffthathappens.com/blog/2007/09/12/ie-and-the-css-box-model-wronger-than-wrong/
Summary of IE hacks found to deal with your problems:
http://www.positioniseverything.net/articles/ie7-dehacker.html
Differences in IE 8:
http://www.evotech.net/blog/2009/03/ie8-css-support/

Resources