Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > CSS Margins in Opera

Reply
Thread Tools

CSS Margins in Opera

 
 
Joe
Guest
Posts: n/a
 
      02-04-2004
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


 
Reply With Quote
 
 
 
 
Steve Pugh
Guest
Posts: n/a
 
      02-04-2004
"Joe" <> wrote:

>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

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <> <http://steve.pugh.net/>
 
Reply With Quote
 
 
 
 
Toby A Inkster
Guest
Posts: n/a
 
      02-04-2004
Joe wrote:

> 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; }

?

--
Toby A Inkster BSc (Hons) ARCS
Contact Me - http://www.goddamn.co.uk/tobyink/?page=132

 
Reply With Quote
 
Leif K-Brooks
Guest
Posts: n/a
 
      02-04-2004
Joe wrote:
> 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.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CSS and body margins Christoph HTML 14 09-14-2006 02:44 PM
Comparisons of IE, Opera and Firefox on DOM (Javascript/CSS) support(Opera wins) Bob HTML 24 05-21-2006 05:31 PM
Opera mirror margins bug Nik Coughlin HTML 7 05-10-2006 10:37 PM
Newbie question re CSS margins in IE damiensawyer@yahoo.com.au HTML 8 03-11-2006 11:45 PM
div css margins broken when no padding is applied Andrew Crowe HTML 3 12-13-2003 04:17 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57