CSS Margins in Opera

J

Joe

Whenever I view my Website in the Opera browser, it seems to ignore my
margins, which seem to work fine in Internet Explorer. Below I have included
what I have put in the head of the page:

<style type="text/css">
BODY
{
scrollbar-base-color: #9A0000;
scrollbar-arrow-color: white;
scrollbar-DarkShadow-Color: black;
margin-top: 0;
padding-top: 0;
}
<!--
A:link { text-decoration: none; color:"#FFFFFF" }
A:visited { text-decoration: none; color:"#FFFFFF" }
A:hover { text-decoration: underline overline; cursor: hand; color:"Red" }
-->
h1 {font-family: Arial; color: #FFCC33; font-size: 13pt; }
</style>

Does Opera not support CSS margins or am I doing something wrong?
Thanks, Joe
 
S

Steve Pugh

Joe said:
Whenever I view my Website in the Opera browser,

Which version?
it seems to ignore my
margins, which seem to work fine in Internet Explorer.

Have you tried in Mozilla?
Below I have included
what I have put in the head of the page:

<style type="text/css">
BODY
{
scrollbar-base-color: #9A0000;
scrollbar-arrow-color: white;
scrollbar-DarkShadow-Color: black;
margin-top: 0;

This is the only margin in the code here. By default the margin on
body in Opera is 0 (the padding is 8px by default) so this has no
effect.
padding-top: 0;

This works. But Opera handles the collapsing of margins differently
(i.e. properly) there may be other factors at play. A URL would help.

Why start an HTML comment in the middle of a block of CSS?
A:link { text-decoration: none; color:"#FFFFFF" }
A:visited { text-decoration: none; color:"#FFFFFF" }
A:hover { text-decoration: underline overline; cursor: hand; color:"Red" }

No need at all for those quotes.
-->
h1 {font-family: Arial; color: #FFCC33; font-size: 13pt; }

Is this a print stylesheet? Points make sense for print, but on the
screen.

Steve
 
T

Toby A Inkster

Joe said:
BODY
{
scrollbar-base-color: #9A0000;
scrollbar-arrow-color: white;
scrollbar-DarkShadow-Color: black;
margin-top: 0;
padding-top: 0;
}

Have you tried also setting:

html { margin-top: 0; padding-top: 0; }

?
 
L

Leif K-Brooks

Joe said:
Whenever I view my Website in the Opera browser, it seems to ignore my
margins, which seem to work fine in Internet Explorer.

Opera applies padding to body instead of margin.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,999
Messages
2,570,243
Members
46,838
Latest member
KandiceChi

Latest Threads

Top