Image size

Found an issue with the phpBB system here at NESdev? Use this forum to report problems.

Moderator: Moderators

Post Reply
socram8888

Image size

Post by socram8888 »

To prevent an image broking the forum's design, why no using the CSS parameter max-width? Using "max-width: 100%", the images would be resized to the post's width if they're bigger
tepples
Posts: 22705
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples »

I imagine that the lack of max-width in the default phpBB 2 theme's CSS (of which the nesdev theme is a palette swap) has something to do with Microsoft Internet Explorer 6 not supporting max-width. But then right now I'm a hypocrite anyway with my 128px tall Pinocchio avatar.
User avatar
koitsu
Posts: 4201
Joined: Sun Sep 19, 2004 9:28 pm
Location: A world gone mad

Post by koitsu »

This is probably why it's not a commonly-used CSS tag. That and the phpBB authors likely don't have a good grasp of CSS (sadly not a lot of people do :-( ). Plus, the phpBB forum software here is very old (upgrading to the new stuff would be a serious undertaking, specifically ensuring all the old posts get retained).

And what makes you think someone actually wants their uploaded image scaled? Please don't propose it be made into a per-profile option; I think most people like the forum here for its content, not for its avatars.

For sake of comparison, I went through total hell trying to keep browsers from doing pixel interpolation on the Parodius home page logo (once that feature got implemented). The idea was to use a small animated picture and then use an exact 2x scale to increase the size of the image while keeping the pixellated look. This is what I had to resort to:

Code: Select all

img.class {
  width: 338px;   /* Actual size desired on-screen */
  border: 0px;

  /* Non-CSS-standard options below */
  -ms-interpolation-mode: nearest-neighbor;
  image-rendering: -moz-crisp-edges;
}
I'm still quite sore/angry over this, specifically because both of the necessary options you see are non-standard. I tend not to care much about Opera, but I imagine they're rolling their eyes over both attributes too. Here are the relevant docs:

http://msdn.microsoft.com/en-us/library ... 85%29.aspx
https://developer.mozilla.org/En/CSS/Image-rendering

Phooey.
socram8888

Post by socram8888 »

I'm not talking about avatars or forum's images, but for embedded images using [img]

Using max-width:100%; thay would get resized to the post width. And you can still see them in full size right-clicking and selecting "Open image in a new tab/window"
Post Reply