Thread: April 24
View Single Post
  #51  
Old 04-29-2004, 04:45 PM
Derek's Avatar
Derek Derek is offline
Dean of misderektion
Senior Staff
 
Join Date: Mar 2003
Location: Sector 001
Posts: 1,106
Default

[color=#000000ost_uid0][quoteost_uid0="PointyHairedJedi"][quoteost_uid0="Kira"]It's always been like that in Opera.[/quoteost_uid0]
Well, I only started using it something like a week ago, so that would be why I didn't know. Is there no way to make it the same?[/quoteost_uid0]
Well, that all depends on who you talk to.

It's funny that the same HTML produces three different results:
IE
[imgost_uid0]http://dadean.org/~spurk/images/ie-subsite.PNG[/imgost_uid0]
As you can see, it has equal-sized bars in the middle on either side of the image.
Mozilla
[imgost_uid0]http://dadean.org/~spurk/images/mozilla-subsite.PNG[/imgost_uid0]
Mozilla puts the bars in the middle on either side of the main image, but they're of different sizes.

I pointed this out once before, and even investigated and found out that according to the W3C (HTML standards body), this rendering is correct because when you use percentages to scale images you aren't scaling the size of the image with respect to itself or with respect to the space available, but to the [iost_uid0]remaining[/iost_uid0] space available.

In the example above, the three images have widths of 17%, 60%, 17%. Opera and IE both take the total width of the page and scale the first image to 17% of that total, the second to 60% of that same total, and the third to 17% of that same total, leaving the first and third of equal size. However, Mozilla scales the first image to 17% of the total space, but the second is scaled to 60% [iost_uid0]of the remaining 83% left[/iost_uid0], and the third image is scaled to 17% of the remaining amount left, which comes out to 5.644% of the total space.
Opera
[imgost_uid0]http://dadean.org/~spurk/images/opera-subsite.PNG[/imgost_uid0]
Opera seems to put the bars on the bottom of the main image (but they are the same size). That would suggest that Opera uses a baseline that it renders all images above, while Mozilla and IE, allow images to go below their baselines as well as above it.

A little experimentation proves my theory. If you change the middle image HTML to read:
[code:1ost_uid0]"5MNG"[/code:1ost_uid0]
That should fix the alignment problem in Opera.
[/colorost_uid0]
__________________
"Please, Aslan," said Lucy, "what do you call soon?"
"I call all times soon," said Aslan; and instantly he vanished away and Lucy was alone with the Magician.
Reply With Quote