pouët.net

images inserted with [img] size

category: general [glöplog]
hey, what's the fuck with the retarded size of images inserted with [img] tags in posts ?
now every 16x16 is zoomed to death
Don't use IE if it bothers you
added on the 2008-10-06 23:16:02 by Joghurt Joghurt
That's because ps fixed it.
before they weren't shown in actual size
now it is fixed, read: bigger
added on the 2008-10-06 23:19:30 by EviL EviL
i'm using safari for the record
make a user CSS and be done with it.
Code:.bbimage img{width:auto !important;height:auto !important;}
set in Edit > Preferences > Advanced > Style Sheet.

Problem solved.
added on the 2008-10-06 23:30:31 by p01 p01
yeah well, now i have to fix smart fixes from others :)
thx, problem solved indeed
Internet Explorer, Firefox 2, Safari, Konqueror and Opera all show the images zoomed.

Firefox 3 however, shows them the correct size..
added on the 2008-10-07 00:51:42 by Deltafire Deltafire
guess which one follows the css standards properly.
added on the 2008-10-07 00:57:10 by psenough psenough
guess what happens if you remove the gecko-only "-moz-max-content" value for "content-width" ;)

it's kind of hard for other browsers to show stuff correctly (even in future versions) if you use vendor-specific CSS values.
added on the 2008-10-07 01:05:50 by stijn stijn
Reminds me of "Works best with Internet Explorer 5.5" days...
added on the 2008-10-07 01:07:42 by LiraNuna LiraNuna
and max-content isn't even in the css3 draft yet, it's only been discussed on its mailing list...
added on the 2008-10-07 01:09:48 by stijn stijn
stijn: we have large as fuck images that b0rk the table width everywhere.

Code: .bbimage img { max-width: 95%; max-width: -moz-max-content; _max-width: auto; width: 100%; _width: ; _height: ; }


there. this should do the trick. i hope.

any complaints left?
added on the 2008-10-07 01:12:25 by psenough psenough
(for those interested, the proposal is here. looks like a useful addition when it becomes available)
added on the 2008-10-07 01:12:35 by stijn stijn
ps: sorry to disappoint but I think you've got CSS mojo wrong. The following rule clearly forces the width of images to 95%.

Code:.bbimage img { max-width: 95%; width: 100%; max-width: -moz-max-content; _width: 100%; _height: auto; }
added on the 2008-10-07 01:12:50 by p01 p01
well, let me try that, but i think it'll b0rk stuff on ie
added on the 2008-10-07 01:19:42 by psenough psenough
yes, it was b0rking, atleast on ie7.

back to my above suggestion. o_O
added on the 2008-10-07 01:25:16 by psenough psenough
b0rking ie6, not ie7, i dont have ie7 nor ie8 installed. nor do i wish to.
added on the 2008-10-07 01:25:52 by psenough psenough
how about simply having:

/* regular CSS */
Code:.bbimage img { max-width: 95%; }
Conditionnal comment in the markup
Code:<!--[if lte IE 8]><style type="text/css"> .bbimage img { width:expression( Math.min(this.clientWidth,this.parentNode.clientWidth*.95|0)+'px'); } </style><![endif]-->

/!\ I've not tested the IE expression, but that's basically the idea
added on the 2008-10-07 01:28:36 by p01 p01
I think IE8 get the max-width right, so the CC should be <!--[if lt IE 8]>
added on the 2008-10-07 01:30:53 by p01 p01
stijn: dude, the -max-content is purely academic optimization for ff3, it gets ignored everywhere else. 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. i have no deep css knowldedge but this is nothing a few google searches wouldnt explicitly warn you about being br0ken when trying to find a hotlinking image max-width css rule that works on all browsers properly. in fact everyone seems to advise to do server size linking and batch resize everything to avoid handling this with css hacks, which i refuse to consider as a solution.
added on the 2008-10-07 01:35:52 by psenough psenough
p01: because last time i tried to javascripted anything into the css people complained their browser crashed.
added on the 2008-10-07 01:36:50 by psenough psenough
plus it needs to handle % not pixels.
added on the 2008-10-07 01:37:47 by psenough psenough
also i would have to install all ie versions to test and i dont want to install malware on my machine ;)
added on the 2008-10-07 01:38:26 by psenough psenough
server side* linking
added on the 2008-10-07 01:39:33 by psenough psenough

login