Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Should i pretend Opera does not exist?

Status
Not open for further replies.

MasterKaos

Programmer
Jan 17, 2004
107
GB
Ok, i'm REALLY trying to get good with CSS, and only using redundant html tags where there is no easy way of doing things with CSS. The only HTML formatting i have in the page i'm working on, is a <CENTER> tag around a one cell table, to get the whole single page with empty space on either side at higher resolutions effect happening.

Since everything's in this table cell, i can't use absolute positioning in CSS, so instead i use relative. I'm using tricky things like sandbag div's to wrap text around an image, and believe it or not it renders correctly in MSIE 5, MSIE 6, Netscape 6.2 and FireFox 0.8. But in Opera 7.23 the text shows up in the wrong place.

Now if a site only renders correctly in MSIE 6 and looks all wrong in other browsers i say the site is badly coded. But if the site renders correctly in all browsers except Opera, i'm tempted to say it's Opera's fault.

Anyway, feel free to look at my CSS and suggest the "correct" or "better" way of implementing the layout i have chosen.


So should i pretend Opera does not exist, or stuff around with CSS until it looks good in all browsers including Opera?

----------------------------------------------------------------------------
The first 90% of the code accounts for the first 90% of the development time. The remaining 10% of the code accounts for the other 90% of the development time.
 
MasterKaos said:
if a site only renders correctly in MSIE 6 and looks all wrong in other browsers i say the site is badly coded.

You mean you wouldn't consider the possibility that IE is a browser that doesn't adhere to many of the latest standards, and that the author of the site in question was unwilling / unable / too lazy to get it working in standards compliant browsers?

Dan
 
This should fix the problem by-the-book:
Code:
div.content
{	position : relative;
	top : -455px;
	left: 255px;
	[b]float: left;[/b]
}
 
Here's a quick and dirty fix for Opera. Don't ask me why it works, it's just weird browser quirks, I guess:
Code:
div.content{
	position : relative;
	top : -455px;
	left: 255px;
	[b][COLOR=blue]padding-top: 1px;[/color][/b]
}
However, I would seriously consider rewriting your code and using absolute positioning for the photos and relative for the text. Also, ditch the table and use a div instead.
 
The only HTML formatting i have in the page i'm working on, is a <CENTER> tag around a one cell table, to get the whole single page with empty space on either side

A single-cell table? And a <center> tag? There are better ways to do that. The proper CSS way to center a block is like this:
Code:
<div style="width: 760px;margin: 0 auto;">
  This block is centered
</div>
Unfortunately, IE doesn't understand [tt]margin: auto[/tt], so we have to capitalise on one of its misbehaviours:
Code:
<div style="text-align:center">
  <div style="width: 760px;margin: 0 auto;text-align:left">
    This block is centred
  </div>
</div>
Obviously you should use classes to allocate those CSS properties instead of doing it inline. Since you're looking to centre the whole page, you could apply the [tt]text-align:center[/tt] to the <body> element instead of adding the extra <div>.

Hopefully Opera should like that, though I don't have a copy here to check.

-- Chris Hunt
 
You mean you wouldn't consider the possibility that IE is a browser that doesn't adhere to many of the latest standards, and that the author of the site in question was unwilling / unable / too lazy to get it working in standards compliant browsers?

Actually, IE6 conforms to pretty much all the standards.
There are however times when I conforms above and beyond that to things that are as yet proposals (or were proposals at the time the codebase for IE was finalised which didn't make it into the spec in that form) and therefore not supported by other browsers.

If you code to the standards, it will pretty much always work in IE, sometimes in Notsheep, and once in a while in Operette.
 
I code for Safari (MacOSX) and then test it in IE 6 (Windows). If it renders correctly in both of those, then I usually find it works fine in all other variants of browsers on both platforms.

I have had some problems with early Opera (version 6.X) not rendering as expected... but the newer Opera appears to be fine (in both browsers).

There is the important part: define a DOCTYPE for your code. Then the browsers will flip out of "quirks" mode (read: weird, non-standard, buggy mode) and flip into "standards compliance" mode. This is probably the single most important step toward getting your (compliant) code to render identically in all browsers (that support compliance - which is almost everything new).

Cheers,
Jeff
 
Actually, IE6 conforms to pretty much all the standards.

I'm thinking M$ standards. Buggy software, bells and whistles with huge security holes. If those are the standards we are talking about I agree a 100%.

w3c standards, that's another long thread for another day....

grtfercho çB^]\..
"Imagination is more important than Knowledge" A. Einstein
-----------------------------------------------
 
Actually, IE6 conforms to pretty much all the standards.

I agree with Dan - surely you're thinking of something else. Just read through the posts - "works in NS, FF, Opera, Safari, Mozilla, but not in IE" - over and over and over.....

IE operates on Microsoft standards only - and nobody elses. This has been the "Gates Golden Rule" for years.

There's always a better way. The fun is trying to find it!
 
Sorry, I don't know what came over me. Writing german in an english forum... Well, the link is german as well, so the german text in my post is somewhat something like a good introduction to it :)

The Babelfish translates it awkwardly, but have a go nonetheless:


haslo@haslo.ch - www.haslo.ch​
 
Actually, IE6 conforms to pretty much all the standards.
Sure, this is called "quality assurance". Make frequently used things working well (HTML4, core CSS/DOM), spoil rookies with buncha shortcut techniques for lame coding, go proprietary the rest of the way.
 
Personally, I think IE6 does a reasonable job of complying with the standards that were in place when it was written. Compared with its main competitor of the time - NS4 - it was light years ahead.

The real problem with IE (as it was with NS4, in fact) is that it's not being developed. Bugs aren't being fixed, new standards aren't being followed, it's just being left to moulder. Bill seems happy to rest on his laurels now that he has the dominant PC browser, I guess we just have to hope that competition from Opera and Net-Moz-Fire-Whatever can - in time - make him change his mind.

-- Chris Hunt
 
The whole problem is that MickeySoft is integrating IE into the operating system. Because of this they cannot just make a program that does lots of rendering. They have to use all sorts of hooks to make sure all other buggy windows programs can "Use Internet's Explorer settings".
Also it's perfectly sane to Mister Gates to type a url into some explorer window (it changes into an Internet Explorer anyway) or the other way around (some local path without file:///).
Because of all this (and perhaps other marketing strategic reasons) the MSdudes don't have time to work on the actual thing IE is supposed to do:
-render html pages.
-executing javascript

There is one thing though. Although developing for javascript is a pain in the ... in IE, but it runs much faster than on any other browser i currently know.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top