Old 18-06-2003, 06:57   #1 (permalink)
Brown
volkswagen yellow & gold
 
Brown's Avatar
 
Join Date: Apr 2003
Location: london, england.
Posts: 6,214
css margin: 0;

ok. so we're not allowed to put anything in our body tag anymore:

<body topmargin="0" leftmargin="0">

so instead we put this in our style sheets:

body {
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
margin-left: 0px;
}

however, opera (5, 6 + 7) doesn't agree with this.

camino, safari, ie, mozilla and even netscape 6 like it however (pc and mac).

any thoughts guys and gals?
  Reply With Quote
Old 18-06-2003, 07:19   #2 (permalink)
Bill Posters
trouble free and loverlee
 
Join Date: Mar 2003
Location: YooKay
Posts: 2,899
Opera has its own ideas about how to negate the borwser offset margin.

Code:
body { margin: 0; /* how it should be done */ padding: 0; /* what Opera thinks is right */ }

It's not a bug. The Opera developers actually believe their method to be more correct than the W3C recommendation.
Someone somewhere is badly missing the point.



p.s.
Oli, any chance you can implement something on the forum to isolate the code from the rest of the post.

TIA
  Reply With Quote
Old 18-06-2003, 07:22   #3 (permalink)
Stickman
Dr. Lucien Sanchez
 
Stickman's Avatar
 
Join Date: Mar 2003
Location: UK
Posts: 5,632
Why is this in programming?

Anyway, firstly you might be interested in css shorthand:
This:

body {
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
margin-left: 0px;
}


can be this (you don't need a unit for nothing)

body {
margin: 0;
}


An article to explain more: Introduction to CSS Shorthand

I can't remember the exact code to remove all page margins, but it's something like this:

body {
margin: 0px;
padding: 0px;
}
body, html {height: 100%;}


The 100% page height should cater for Opera, but I don't know about mac browsers.
  Reply With Quote
Old 18-06-2003, 07:59   #4 (permalink)
oli
Free Ring Ding™
 
oli's Avatar
 
Join Date: Feb 2003
Location: Manchester
Posts: 9,535
Quote:
Oli, any chance you can implement something on the forum to isolate the code from the rest of the post
ill do my best
  Reply With Quote
Old 18-06-2003, 08:08   #5 (permalink)
Brown
volkswagen yellow & gold
 
Brown's Avatar
 
Join Date: Apr 2003
Location: london, england.
Posts: 6,214
cheers bill. padding:0 ; worked for opera and didn't break it for anything else. didn't think of that. FYI this works on all browsers both pc and mac except Netscape 4.7

ps - Stickman - didn't need height: 100%
  Reply With Quote
Old 18-06-2003, 08:22   #6 (permalink)
Stickman
Dr. Lucien Sanchez
 
Stickman's Avatar
 
Join Date: Mar 2003
Location: UK
Posts: 5,632
Cheers for letting me know - I can't remember where that's from, I thought it was for opera.
  Reply With Quote
Old 20-06-2003, 13:40   #7 (permalink)
Luke Redpath
Barney army!
 
Luke Redpath's Avatar
 
Join Date: Mar 2003
Location: London
Posts: 696
FWIW, Opera have got it right...in CSS box model terms at least, margin is space outside of a box and padding is inside, so in the case of body, it should be padding really.
__________________
Luke Redpath .::. Software Engineer .::. Reevoo - Real Reviews From Real Customers
  Reply With Quote
Old 22-06-2003, 19:25   #8 (permalink)
Bill Posters
trouble free and loverlee
 
Join Date: Mar 2003
Location: YooKay
Posts: 2,899
Quote:
Originally posted by Luke Redpath
FWIW, Opera have got it right...in CSS box model terms at least, margin is space outside of a box and padding is inside, so in the case of body, it should be padding really.


Not so fast there, sonny-jim.

The body ≠ the viewport.
Similarly, the body doesn't by definition automatically fill the viewport.
There is indeed a form of padding 'within' the viewport that creates a kind of no-man's land which has prematurely (and problematically) been titled the browser offset margin.

However, when seeking to remove the gap we don't address the viewport, we address the body.
The spacing is 'around' the body, so in relation to the body it is margin, not padding. We cannot address the gap as 'spacing within' the viewport (padding), so we must address it as 'spacing around' the body (margin) by zeroing the margin with css.

This particular semantic quagmire is what lead to two interpretations, both of which can be argued to be correct (from a certain viewpoint).
The one thing that is clear is that the spec regarding the dom definitions, extent and roles of the viewport, html and body should be made much clearer than they are or at least enforced one way.

The purpose behind W3C was to stop browser developers trying to think for themselves.
As soon as they start doing things like that we end up with diverging methods all over again- such as with the case in hand.
And of course, it's always the poor, bloody web-designers/developers that are the canon fodder.

So forgive me when I say that, personally, I'd just like to see Opera shut up and do as they are told. In this instance I don't really care about how they think it should work.
There is no major headache by doing it one way or the other, so by bucking the trend they are simply defeating the purpose of unified support for W3C recommended standardisation.

I can't help thinking that, as well-meaning as the folks at Opera are, they are missing the point just a tad.


But anyway...

Anyone else here think that 24 is blatantly a load of tosh?
  Reply With Quote
Old 22-06-2003, 22:40   #9 (permalink)
Stickman
Dr. Lucien Sanchez
 
Stickman's Avatar
 
Join Date: Mar 2003
Location: UK
Posts: 5,632
Yes. I prefered State of Play.

Why can't browser manufacturers follow the same rules? Bastards.
  Reply With Quote
Old 23-06-2003, 04:49   #10 (permalink)
Mr Fred
Magazines™
 
Mr Fred's Avatar
 
Join Date: Mar 2003
Location: Glasgow..
Posts: 11,275
state of play - cop out at end.

had to watch 6 weeks of painless filler and the ending over in five minutes - and why was camp john simms crying like a big gaylord

oh dear.

24's allright but the president looks like sadsack of 80's kid program raggydolls
  Reply With Quote
Old 23-06-2003, 05:10   #11 (permalink)
Stickman
Dr. Lucien Sanchez
 
Stickman's Avatar
 
Join Date: Mar 2003
Location: UK
Posts: 5,632
The ending wasn't good, but the whole thing wasn't 'filler' and 24 (second series) is toss. Entertaining toss, but still toss nonetheless.
  Reply With Quote
Old 23-06-2003, 05:13   #12 (permalink)
Bill Posters
trouble free and loverlee
 
Join Date: Mar 2003
Location: YooKay
Posts: 2,899
24 just seems like it's being made up as they go along (which probably means that it is).

I'm 99.9% sure that they have a small program set up to formulate plot twists based on sets of keywords like- 'Kym', 'gun', 'trapped', 'again' or 'Tony', 'fight', 'ankle', 'moody', 'again' or 'CTU', 'women', 'glances', 'suspicion', 'again'.

They've clearly run out of things for the female characters to do so they just pushing them through the same mutual-suspicion situations or fantastically bad luck scenarios again and again.

It's a shame the nuke wasn't dropped on the HQ of the show's writers.
It's like they all wrote a scene in isolation, shuffled the pages thoroughly then called that a screenplay.

Even the unpredictability of the plot is predictable.


...but other than that, it's not bad.

--

I didn't watch every part of State of Play, but it was still marginally more entertaining than 24.

There really seems to be a lack of anything worthwhile on the box at the mo, but then I don't watch enough to really get into things anyway.

Comedy at the moment is dire too.
You know we're in a state when the funniest thing on British tv are the re-runs of The Good Life.

  Reply With Quote
Old 23-06-2003, 05:24   #13 (permalink)
Mr Fred
Magazines™
 
Mr Fred's Avatar
 
Join Date: Mar 2003
Location: Glasgow..
Posts: 11,275
just to show


sadsack = david plamer


president


sadsack

  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8