images inserted with [img] size
category: general [glöplog]
The conditionnal comment is there to make sure this IE proprietary thing is only parsed by IE < 8. That should be pretty safe.
It's a tad late now, but I could try to fiddle with that tomorow.
Quote:
That's what the this.parentNode.clientWidth*.95 does. AFAIR CSS expressions are reevaluated whenever something changes on the page, including a resize.plus it needs to handle % not pixels.
It's a tad late now, but I could try to fiddle with that tomorow.
no offense, ps, but jesus fucking christ
yes, its an ugly hack. it works so i dont care.
Quote:
also i would have to install all ie versions to test and i dont want to install malware on my machine ;)
http://browsershots.org/
Quote:
yes, its an ugly hack. it works so i dont care.
umm right... so "all images are fucked up on all browsers except one" is a working fix nowadays?
ps:
If you want images to be displayed in their intrinsinc size, but be downscaled if wider than 95% of their container, the ONLY rule you need in a standard compliant browser is:
The current solution only works in FF because of the -moz-max-content thing. But it breaks -- images are forced to 95% -- everywhere else for the reason I mentioned above.
A really cheap solution to the IE and max-width problem could be:
Quote:
Nei. As I said earlier, img { max-width: 95%; width: 100%; } forces images to be 95% as wide as their container. It does so because you set their width to 100% of their container, but the width is clamped to 95% through the max-width property.the rest of the css should supposedly work properly on its own with just max-width: 95%; width: 100%; but it doesnt, because the browsers dont follow the standard: if you set max-width the browsers stretch the pic to match the border instead of limiting the pics that are higher width than the container width
If you want images to be displayed in their intrinsinc size, but be downscaled if wider than 95% of their container, the ONLY rule you need in a standard compliant browser is:
Code:
Then comes IE, for which you have to use proprietary hacks and branches like the conditional comment + CSS expression I gave earlier.img {max-width:95%; }
The current solution only works in FF because of the -moz-max-content thing. But it breaks -- images are forced to 95% -- everywhere else for the reason I mentioned above.
A really cheap solution to the IE and max-width problem could be:
Code:
Done..bbimage
{
overflow:auto; /* add scrollbars to the container if needed */
}
.bbimage img
{
max-width:95%;
}
all these web technologies are a mistery to me, but I anyway find amazing that still in 2008 there are problems to display an image on screen. It's really scary.
Code:
<!doctype html>
<!-- it's HTML5 baby, and triggers STRICT mode in IE6 -->
<html>
<head>
<title>test case : max-width on IMG </title>
<style>
img
{
max-width:100%;
}
.bbimage
{
overflow:auto;
background:silver;
}
</style>
</head>
<body>
<p>resize your browser window to see the <em>max-width</em> in action.</p>
<h1>The standard way</h1>
<div><img src="http://www.pouet.net/gfx/logos/pouetlawgo.png" ></div>
<h1>And now the "really cheap solution"</h1>
<div class="bbimage"><img src="http://www.pouet.net/gfx/logos/pouetlawgo.png" ></div>
</body>
</html>
iq: Blame MicroSoft for not respecting the CSS2 specification which was published the 12-May-1998.
unclex: does cannapaceus work on ATI yet?
i'll try some cleaner fix later today with this crap.
i'll try some cleaner fix later today with this crap.
ps: On most newer ones, yes. Anyways it works on more configurations than one :-)
http://browsershots.org/ is good for testing, btw...
did anyone notice that the div will cause images that were supposed to be next to each other to be block-level (= under each other)? :)
Gargaj: yep. Not sure what the purpose of that DIV is. But it prevents people to do a collage of avatars or inline a small images in a sentence.
I have to agree with those complaining, it's a bitch with those zoomed up images. The old way with the odd huge image was way better than this zoom-craze.
Stop complaining and just use Firefox. Everyone in the world uses it.
(no, i'm not)
btw, it's also zoomed up in opera. And i can't install FF3 at school.
btw, it's also zoomed up in opera. And i can't install FF3 at school.
Neither am I, I'm using Safari due to it's major speed advantage over firefox3. And I find PithHelmet to be a nicer adblocker than Adblock+.
People using a standard compliant browser ( read IE8, Opera, Safari, Chrome ) that is not FireFox 3 can use the user stylesheet I mentionned in my first post to fix the Pouet's " fix " using a -moz-thing for IE6 and IE7 that make BB images look stupid in ALL browsers but FF3
since when IE8 is 'standard compliant' ? they recently passed the acid2 test and bragged about it. acid2 is 3 years old now.
As for acid3:
As for acid3:
acid2/3 isn't really a good measure for "standard compliance" in this context
what iq said.
it's still borked in chrome btw
and in FF2
ok so apparently it's still borked everywhere ?
come on ...
come on ...