Forum Moderators: not2easy

Message Too Old, No Replies

Different stylesheet for Opera

         

krugi

4:36 pm on Oct 11, 2010 (gmt 0)

10+ Year Member



Hello all.

I programmed a site that works on Safari, Chrome, FF and IE, but not in Safari.
All the site content disappears in Opera for some reason. In the rest of the browsers the site looks fine.
When I delete few CSS lines, It's working in Opera, but not in IE.
I think that the only solution is to make a different stylesheet for Opera.

Before giving up, here is the problematic #div css:
#wrapper {
height:auto;
width:740px;
margin-right: auto;
margin-left: auto;
padding-top: 217px;
content: ".";
height: auto;
clear: both;
display: block;
position:relative;
}


If I put the following code instead, Its working in Opera, but make a big mess in IE:
#wrapper {
height:auto;
width:740px;
margin-right: auto;
margin-left: auto;
padding-top: 217px;
height: auto;
position:relative;
}


Is it possible to make a different stylesheet for Opera?
Or, if you have another CSS solution, it'll be great.

Thank you in advance, Yuval.

Major_Payne

7:19 pm on Oct 11, 2010 (gmt 0)



Use this:

#wrapper {
width:740px;
height: YYYpx; /* set height or optional */
margin: 0 auto;
margin-top: 217px;
}

Auto height does not always work the way you were coding it. IE has Conditional Comments [msdn.microsoft.com] to use so make a separate IE only CSS for it.

IE Bugs [positioniseverything.net]

Try not to leave out the CSS that tells browsers EXACTLY what you want them to do with your page when parsing as their default methods are not always the same from browser to browser.

krugi

8:22 pm on Oct 11, 2010 (gmt 0)

10+ Year Member



Thank you for your comment!
I made a special CSS only for IE, and for the rest of the browsers (i mean, the good browsers),
only one. Thats enough (: