Bitcoin Forum

Other => Meta => Topic started by: dree12 on January 23, 2013, 03:30:33 AM



Title: Cap image width
Post by: dree12 on January 23, 2013, 03:30:33 AM
Add to the stylesheet:

Code:
img {
  max-width: 100%
}

This rescales all images to the maximum width possible without a scrollbar. We all think scrollbars are annoying, but so are downsized images by overzealous posters trying to avoid them. This seems to be a simple solution.

Test below (courtesy niko):
http://blog.ancientlasers.com/wp-content/uploads/2012/02/Bitcoin.jpg


Title: Re: Cap image width
Post by: dree12 on January 28, 2013, 04:38:04 AM
Bump. This would be a trivial and very useful addition at no cost.


Title: Re: Cap image width
Post by: dree12 on February 21, 2013, 09:11:11 PM
People have recently expressed concerns with mobile phones. This simple 3-line change would resolve those. I'm not sure why it hasn't been added.


Title: Re: Cap image width
Post by: Mike Christ on February 21, 2013, 09:55:21 PM
I, too, would like to see this implemented.


Title: Re: Cap image width
Post by: greyhawk on February 21, 2013, 10:03:01 PM
I concur.


Title: Re: Cap image width
Post by: 21after2 on February 21, 2013, 10:03:50 PM
I'm surprised this hasn't already been implemented, or at least responded to. It's a simple, efficient, and quick idea to put in.


Title: Re: Cap image width
Post by: repentance on February 22, 2013, 01:15:49 AM
Please do this.


Title: Re: Cap image width
Post by: Phinnaeus Gage on February 22, 2013, 01:33:11 AM
I concur.

Concur, I.


Title: Re: Cap image width
Post by: niko on February 22, 2013, 01:49:16 AM
Test:

http://blog.ancientlasers.com/wp-content/uploads/2012/02/Bitcoin.jpg


Title: Re: Cap image width
Post by: theymos on February 22, 2013, 02:49:30 AM
Done.

Test:

http://blog.ancientlasers.com/wp-content/uploads/2012/02/Bitcoin.jpg


I own that coin. :)


Title: Re: Cap image width
Post by: dree12 on February 22, 2013, 04:07:34 AM
Done.

Test:

http://blog.ancientlasers.com/wp-content/uploads/2012/02/Bitcoin.jpg


I own that coin. :)

This doesn't seem to work right now. The class ".headerandpost" should be ".td_headerandpost".


Title: Re: Cap image width
Post by: theymos on February 22, 2013, 04:28:45 AM
Fixed.


Title: Re: Cap image width
Post by: dust on February 24, 2013, 08:20:57 AM
This isn't working here, where a large image is quoted: https://bitcointalk.org/index.php?topic=146385.msg1554510#msg1554510 (https://bitcointalk.org/index.php?topic=146385.msg1554510#msg1554510)


However the image in this thread is properly handled when quoted.


Title: Re: Cap image width
Post by: deepceleron on February 24, 2013, 09:19:11 AM
Fixed.
So this was changed?

https://bitcointalk.org/Themes/custom1/style.css?fin11:
Code:
#bodyarea .windowbg .td_headerandpost img {max-width: 100%}

The preview post feature doesn't show the auto-shrunk version of images though..
Actually the whole thread below where you post a response still has full-size images
                        


So I put something like this:
http://bitcoincharts.com/charts/chart.png?width=2000&m=mtgoxUSD&SubmitButton=Draw&r=2&i=1-min&c=0&s=&e=&Prev=&Next=&t=S&b=&a1=&m1=10&a2=&m2=25&x=0&i1=OBV&i2=&i3=&i4=&v=1&cv=0&ps=0&l=0&p=0&
And now no in-post scroll to make it useful...?
(edit: my post has a scroll bar...???)

Another place to fix width is in the "show last posts" per user. One wide post (code or image) and the whole page goes wide:
https://bitcointalk.org/index.php?action=profile;u=63589;sa=showPosts


The mobile phone user would be served by a SMF extension that followed the link and made sure the linked file isn't huge. I could kill a page and blow up your 4G by linking a never-ending php as an image.


Title: Re: Cap image width
Post by: deepceleron on February 24, 2013, 09:37:05 AM
More: To force width it appears that class="post" is what needs a style. It looks like to fix old posts below a reply or "view all posts by" you need to add to  "windowbg", "windowbg2", "windowbg3":

Code:
<tr class="catbg">
<td colspan="2" align="left" class="smalltext">
<div style="float: right;">Posted on: February 21, 2013, 02:03:01 PM</div>
Posted by: greyhawk
</td>
</tr><tr class="windowbg2">
<td colspan="2" class="smalltext" id="msg1547342" width="100%">
<div align="right" class="smalltext"><a href="#top" onclick="return insertQuoteFast(1547342);">Insert Quote</a></div>
<div class="post">I concur.</div>
</td>


Title: Re: Cap image width
Post by: theymos on February 24, 2013, 04:54:28 PM
Alright, I fixed that.


Title: Re: Cap image width
Post by: Mike Christ on February 24, 2013, 08:57:21 PM
Works great ;D


Title: Re: Cap image width
Post by: 2112 on May 20, 2013, 08:04:06 PM
Is it difficult to add the same to the stylesheet that governs the "Show the last posts of this person" page? Thanks.