|
|
Rank: Aficionado
Joined: 2/16/2009 Posts: 117 Location: England
|
Hi,
I have created a website in Umbraco 4 that is centered perfectly in Firefox, Safari and Google Chrome by using the following style:
#container { width: 901px; margin-left: auto; margin-right: auto;
The problem is this doesn't work in Internet Explorer 7, I know that if I use:
#body {text-align:center;} #container {text-align:left;}
then my page displays in the center of Internet Explorer correctly but the problem with this is in the Umbraco text editor all the content appears centered which will be confusing for the end user when they are modifying the pages. Does anyone have a solution to get round this? Many thanks Tony
Regards Tony
|
|
 Rank: Fanatic
Joined: 11/16/2007 Posts: 264 Location: Surrey, UK
|
Generally, I have one stylesheet for layout and (at least) one for presentation. Assign the presentation one to the Rich Text Editor in Umbraco to get the font, etc, styling without the layout stuff.
Gordon Saxby | Ascend Internet Limited | Web Site Development. Web Site Hosting (inc Umbraco)
|
|
Rank: Aficionado
Joined: 2/16/2009 Posts: 117 Location: England
|
Thank you for your response, I think I have managed to solve the issue using your solution, now all I have to do is work out why the menu isn't the same width in Internet Explorer!!!
Regards Tony
|
|
Rank: Fanatic
Joined: 10/2/2007 Posts: 315 Location: Czech Republic
|
It looks like you are in quirks mode, so box model is corrupted in IE. Try look here http://www.quirksmode.org/css/box.html
|
|
Rank: Aficionado
Joined: 2/16/2009 Posts: 117 Location: England
|
Thank you for your response. from what I understand from reading that article that problem is with IE5, is that correct? I did try adding "box-sizing: border-box" to my body style anyway but it didn't make any difference, am I doing something wrong?
Regards Tony
|
|
Rank: Fanatic
Joined: 10/2/2007 Posts: 315 Location: Czech Republic
|
Hi, box model cause problems in all versions of IE, newer versions too if it is in quirks mode, which depend on doctype declaration. try google or http://en.wikipedia.org/wiki/Internet_Explorer_box_model_bugPetr
|
|
Rank: Aficionado
Joined: 2/16/2009 Posts: 117 Location: England
|
Thank you for your reply, I looked at the wikipedia site which helped me realise that my page was missing:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
Once I added that code into my master template it renders correctly. Thanks again for your help.
Regards Tony
|
|
Rank: Fanatic
Joined: 10/2/2007 Posts: 315 Location: Czech Republic
|
I'm glad you know something new about our 'lovely' IE :-)
|
|
Rank: Newbie
Joined: 6/6/2009 Posts: 1 Location: El Salvador
|
That worked for me also! I had the same problem and thought it was a problem with the hosting since locally it worked fine. Keep it up with the good work!
|
|
The forum has moved
This forum is no longer in use, so you can't reply to this message - please go to Our Umbraco
|
|
Guest |