PDA

View Full Version : Opera :(


Zozart
25-02-2003, 18:56
Okay, how can i define the page margin in css to work with opera?

At the moment, im using

body {
margin: 0;
}

That works fine for IE and Mozilla, and gives the page no margins, but on opera the page still has a (default?) margin. I've managed to overcome it by putting

topmargin="0" leftmargin="0" rightmargin="0"

in the body tag, but im sure theres a way using css?

Any help appreciated :)

Walrus
25-02-2003, 19:22
body {
margin: 0px;
padding: 0px;
}


Opera uses padding to create a "default margin", whereas other browsers use margin.

Zozart
25-02-2003, 19:38
ahh, thanks, stupid opera ;)

Gordy
25-02-2003, 19:54
Hence why i code for IE , as most people have it :D U can spend ages getting it to look perfect in every browser but seeing as 99.9% of web users run IE its pointless :D

Walrus
25-02-2003, 20:02
Originally posted by Gordy
Hence why i code for IE , as most people have it :D U can spend ages getting it to look perfect in every browser but seeing as 99.9% of web users run IE its pointless :D

To be perdantic, no other reason :p

December 2002 stats from thecounter.com (http://www.thecounter.com) Global stats:-


1. MSIE 6.x 168794275 (50%)
2. MSIE 5.x 137612722 (41%)
3. Netscape 4.x 6368366 (1%)
4. MSIE 4.x 6008601 (1%)
5. Netscape 5.x 4737217 (1%)
6. Netscape comp. 3067504 (0%)
7. Opera x.x 2784783 (0%)
8. Netscape 6.x 1321829 (0%)
9. Unknown 786058 (0%)
10. MSIE 2.x 144386 (0%)
11. Netscape 3.x 135132 (0%)
12. MSIE 3.x 107998 (0%)
13. Netscape 2.x 5369 (0%)
14. Netscape 1.x 370 (0%)
15. MSIE 1.x 205 (0%)


Puts IE usage at roughly 94% :D

Quite a few users would have been dissapointed in an IE only site :p

AlastairM
25-02-2003, 20:33
Quite a few users would have been dissapointed in an IE only site

Damn right, code to standards not browsers.

And no, Internet Explorer is NOT a standard :D

Just to be even more pedantic:

if you use:



body{
margin:-10px 0 0 -10px
}

html body{
margin:0;padding:0
}



You can remove page margins on netscape 4 as well.

cheers

alastair

Walrus
25-02-2003, 21:21
Originally posted by AlastairM
if you use:



body{
margin:-10px 0 0 -10px
}

html body{
margin:0;padding:0
}



You can remove page margins on netscape 4 as well.


Lol, wouldn't it just be great if everyone followed the standard :p

Gordy
25-02-2003, 21:30
Originally posted by Walrus
To be perdantic, no other reason :p

December 2002 stats from thecounter.com (http://www.thecounter.com) Global stats:-



Puts IE usage at roughly 94% :D

Quite a few users would have been dissapointed in an IE only site :p

perdantic goit :D 94% is still high enuf for me , the sites I work on see a lot less hits from none ie browsers than that 99% last time I checked :)

Zozart
25-02-2003, 21:54
yep, well i've since turned from a front-page newb, into a xhtml newb who writes to w3 standards :D

Thanks for that Alastair, might as well shove that in too then.

Gordy
25-02-2003, 21:58
Originally posted by Splaty
yep, well i've since turned from a front-page newb, into a xhtml newb who writes to w3 standards :D

Thanks for that Alastair, might as well shove that in too then.

Shame ms dont abide by standards :D grrrrrrrr :(

AlastairM
25-02-2003, 22:47
well if you'd stop writing sites just for them...


:D:D

cheers

alastair

Craig McD
13-03-2003, 15:41
IE displays more sites accurately than the so called standards compliant Opera and Netscape. On the Windows platform the only reason not to use IE is if you have a very old processor.

conan
13-03-2003, 16:57
On the Windows platform the only reason not to use IE is if you have a very old processor.

Maybe some people just prefer other browsers?

Personally I use Opera and much prefer it's smaller size, quicker loading, ability to prevent popups and multiple pages within one window to any version of IE.

Following the pedantic streak from earlier, if I come across sites that don't like Opera then I go elsewhere, even with my money if it is a shop I was looking to buy from.

Zozart
13-03-2003, 17:16
Opera is alright, but I much prefer Mozilla. It does everything Opera can do, and is free (with no adverts). Although some sites with heavy javascript don't like Moz, if i need to use them I usually just quickly use opera.

AlastairM
13-03-2003, 17:23
might as well chip in...

IE displays more sites accurately than the so called standards compliant Opera and Netscape.

If your talking about netscape 4, then yes it does. An etch-a-sketch could display a site better. Netscape 7 on the other hand ****es all over IE for css support. Try some css in IE6 and you'll find that they still haven't fixed the box model correctly in all circumstances. IE's css support is a little more forgiving, which is why its often thought to be better, but its far from perfect.

Opera (in versions before 7, haven't really tested 7 yet) has very good css support, but lacks full support for some very useful styles and doesn't handle them very well at all (case in point, overflow:auto on my shoutbox example). Its dhtml support is also painful to work with (or work around) and opera users have a really irritating habbit of not admitting when their browsers is at fault (:D:D joking, honest:D:D)

Other than that, its a good browser, personally I can't stand it but I can see why some would.

<small request>
could this please not deterioate into 'my browsers better than yours'.
</small request>

cheers

alastair

Craig McD
14-03-2003, 11:24
It's not a case of "my browser is better than yours" but it's annoying when people bash products just because they are made by Microsoft. Internet Explorer may not support standards fully but then again neither does Opera or Netscape.

zander
14-03-2003, 15:11
If it doesn't work in IE I won't use it in my code. When I get round to testing in Netscape if it doesn't work then i'll live with it as long as it's still functionaly and someone who hadn't seen the IE version couldn't tell.

I don't religiously test in Opera etc. as at the end of the day so few people use it. But when I do find problems I usually just work around them unless obvious.

At the end of the day Microsofts Products are generally excellent, they may have features you've never heard of or never want and they may be missing some too, but they are still top class bits of software.

At the end of the day there are no real standards. There are ideals, but as none of the browsers completly conform to these, and they're not used in every site they are hardly standard. When all browsers use a standard i'll start learning the 'standards'.


(obviously a few exceptions and a bit of a generalisation!)

AlastairM
14-03-2003, 16:01
(not targeted at anyone in particular, it's an opinion not a judgement)

At the end of the day there are no real standards.
Yes there is. The w3c specifications, although not nessecarily enforcable do outline what a document has to be to be classed as html. If it doesn't meet these, its not html. Fact.

This has absolutly nothing to do with how browser then go on to interperate the page, which is what really causes the problem.

There are ideals, but as none of the browsers completly conform to these, and they're not used in every site they are hardly standard.When all browsers use a standard i'll start learning the 'standards'.
There not used on every site because of the exceedingly large number of 'web developers' who can't even correctly use the most fundamental skill involved in the job.

Just because browsers are forgiving with poor html is possibly the most pathetic excuse for anyone considering themselves a 'professional' to give for not bothering about the rules. Again this isn't targeted at you zander, although hopefully you'll understand my point

caveat:I have no problem with beginners and hobbiests having sites that aren't 'standard'. I also (reluctantly) agree that sometimes you have to use browser-specific html.

for example, using a different language:

I only know a little bit of french. I reckon however, with a bit of hand-waving I could communicate what I want to a native french speaker. Which is fair enough if I only visit france for cheap booze, but it doesn't make me a skilled interpreter, even if they do understand what I'm talking about. I couldn't charge for my 'skill' (well I suppose I could, I just don't reckon I'd get paid:D)

If I want to be an interpreter, I've got to learn french to a high standard, no two ways about it.

Yet thats what happens every day in the web design industry, handwavers getting paid to do interpreters jobs. Even worse than that, handwavers can become qualified interpreters without actually being fluent in anything except a piece of software (and from past experience, not even that fluent in it either)

rant over for now...

alastair

zander
14-03-2003, 16:44
I know it's not aimed at me, but I think you took that a bit too literally and I may have waffled a bit.

Basicly - If you conform to the standards and just the standards then your site isn't going to be visable how you wish in every browser.

Yes the w3c specifications are meant to be the standards, but at the end of the day no browser fully incoperates them all. IMO they are an ideal, as currently there is no browser for which every rule in there specificly applys.

I totally agree with you on the fact that browsers shouldn't be used as an excuse for poor coding, mine is far from perfect but I try to follow good coding practices and do so wherever I can, I just haven't yet started checking everything I make against every standard and changing it where it doens't conform (e.g. I think the <HR> tag was depricated last time around, i haven't yet gone round changing everything as it's still fine how it is.

I also agree with your handwavers analogy, it's v irritating to see. It's just another fact of life though, everyone has to start somewhere - as long as they leave SOME jobs left!

Another thing to concider is that many personal sites or smaller sites are written by people who don't aspire to be web developers etc, they may have never heard of w3c specifications. Browsers have to be fairly forgiving. If the standards don't change too soon hopefully we'll be able to get some kind of universal standard / specification thats accepted by all. I'm not putting any money in it though!

I didn't want to get too off topic / start a flame war.... just not my best day for explaining what I mean!

AlastairM
14-03-2003, 17:10
no worries, its a personal rant of mine that i make no apologies for :D:D

couple of things while I'm here (its friday and I'm bored)...

Basicly - If you conform to the standards and just the standards then your site isn't going to be visable how you wish in every browser.

It never going to be visible how you wish in any browser, standards or not, not while people can get away with writing whatever they feel like. But I do know what your saying, so point taken.

I think the <HR> tag was depricated last time around

believe its been dropped in xhtml 2.0 in favour of <line> :rolleyes: (which is still in draft) but it is still part of xhtml 1.0, only now its <hr />

Another thing to concider is that many personal sites or smaller sites are written by people who don't aspire to be web developers etc,

Again, I know what your saying but thats still not a good reason, not doing something right because its more difficult. If browsers didn't let them get away with lax coding, they'd have to learn it correctly. I don't think it makes it that much more difficult, nor would it put people off, if anything having one 'rulebook' would make things easier to learn.

It is more difficult when you asked someone who learned the 'wrong' way to change though :D

cheers

alastair

abe
14-03-2003, 19:52
I agree with everything Alastair has said, because its nearly all fact.

Personally all my sites are tested in Opera (and used in Opera on a daily basis), but I also test them on other browsers such as mozilla, konqueror and Internet Explorer. If it involves adding an extra few things into a CSS file then Im not fussed, as long as people can view it how it was intended.

zander
15-03-2003, 02:29
Originally posted by *abe*
as long as people can view it how it was intended.

At the end of the day thats what matters!

Zozart
15-03-2003, 12:17
Yeah, I also agree with everything Alastair said. I'm not a pro web designer, but I still write all my sites in valid xhtml and aggressivly test them in as many browsers as I can. :)

maniacyak
18-03-2003, 22:26
<rant subject="web standards">

Originally posted by zander

Originally posted by *abe*
as long as people can view it how it was intended.

At the end of the day thats what matters!


It's a nice theory. Unfortunately the nature of the web is such that you can't ever have complete control over what your web page looks like at the other end. It's all very well designing a page so that every pixel fits where it should, but what if the person at the other end (using IE like a good statistic) has the default font size set to "Largest" because they have poor eyesight? Sure, you could define your text size in pixels, but then you'd end up annoying people with huge monitors and UXGA resolutions. If you're interested in this stuff I suggest you read Owen Briggs' Design Rant (http://www.thenoodleincident.com/tutorials/design_rant/), which is one of the best things I've read on the subject of the web as a medium.

Standards for HTML and so forth are important. They're the one thing that ensures pages have a hope of looking the same in different browsers. My recommendation is to code using Opera as your primary browser, because its standards support is probably (in V7, last time I checked) the most complete. (See this page (http://www.xs4all.nl/~ppk/css2tests/) for more details.) Mozilla is also good. Please, please, don't test solely with IE. There hasn't been a new version in quite a while, which means its standards support is still incomplete, and to make matters worse it actually emulates the behaviour of older versions when dealing with certain pages*, meaning it's not adhering to the standards as well as it's capable of.

*This is a long story.
</rant>

Cheers.

Ian

stdPikachu
19-03-2003, 15:38
Originally posted by maniacyak
what if the person at the other end (using IE like a good statistic) has the default font size set to "Largest" because they have poor eyesight? Sure, you could define your text size in pixels, but then you'd end up annoying people with huge monitors and UXGA resolutions.

I dunno if this is what you mean, but whenever I do a site I have a standard HTML header (with all the metatags, etc etc) tagged as an "inc" file (e.g header1.inc) and use PHP to include this header at the top of every PHP page, instead of putting the same header at the top of every single page. Using this I can then ask the user to define how they want their text (and indeed everything else) to look by picking a "theme" which basically just picks a different header file which links to a different stylesheet. Maybe one day I'll work it so that the user can define their own stylesheet.

Again, I'm not sure if this was anything to do with your gripe, but to me it's the simplest and most user friendly way of making site that can work well across multiple resolutions.

AlastairM
19-03-2003, 16:24
What maniacyak means (I believe :) ) is use relative font sizes such as ems, percents or keywords to allow users to re-size the text themselves (in IE 'veiw'->'text size'). The rational being that IE on windows doesn't allow users to re-size text specified in pixels (god knows why), which is why pixels are often deemed as 'bad'.

Theres nothing really wrong with your method either...

cheers

alastair

Zozart
19-03-2003, 17:00
Originally posted by stdPikachu
I dunno if this is what you mean, but whenever I do a site I have a standard HTML header (with all the metatags, etc etc) tagged as an "inc" file (e.g header1.inc) and use PHP to include this header at the top of every PHP page, instead of putting the same header at the top of every single page. Using this I can then ask the user to define how they want their text (and indeed everything else) to look by picking a "theme" which basically just picks a different header file which links to a different stylesheet. Maybe one day I'll work it so that the user can define their own stylesheet.

If you want to make a style sheet switcher, then theres an excellent tutorial here (http://www.alistapart.com/stories/phpswitch/)
which I used to make my style switcher on http://www.zyon.org, It works great too ;)