Welcome to PhpBB3 BBCodes. Click here to register
Feed

Image shrink

Forum rules
User contributions are the users own "Stuff"
They are not supported by the BBCode Staff and is used at own risk

Image shrink

Postby KukY13 » 26 Jul 2010, 10:43

Has something like this ever happened to you:
Image
That a image you post is too wide and it gets cut off?

Well, this single line edit will prevent it!

Open common.css:
Find:
Code: Select all
img {

Add after:
Code: Select all
   max-width: 100%;

*Should work with all styles*

Now, any image that is too wide will be shrinked to fit in, and small enough images will retain their original size:
Image

Enjoy!
Image
User avatar
KukY13

BBCoder III
 
Windows XP Chrome
Status: Offline
Age: 13
Posts: 92
Topics: 10
Joined: 26 Jun 2010, 14:23
Last Visit: Yesterday, 20:43
PhpBB Version: 3.0.7-PL1

Donate to skip ads


Re: Image shrink

Postby heredia21 » 26 Jul 2010, 19:51

Thank you!
User avatar
heredia21

BBCoder IV
 
Windows 7 Chrome
Status: Offline
Posts: 176
Topics: 17
Joined: 07 Apr 2010, 18:42
Last Visit: Today, 04:08
PhpBB Version: 3.0.7-PL1

Re: Image shrink

Postby Pete » 31 Jul 2010, 10:37

Geez... so simple and very useful. Thanks for sharring!
User avatar
Pete

BBCoder II
 
Windows Vista Internet Explorer 8
Status: Offline
Posts: 16
Topics: 2
Joined: 24 Mar 2010, 19:39
Last Visit: 30 Aug 2010, 03:04

Re: Image shrink

Postby kevinviet » 01 Aug 2010, 03:39

Thanks for share KukY13 :)
User avatar
kevinviet

Donator
 
Windows Vista Firefox
Status: Offline
Posts: 70
Topics: 3
Joined: 06 Mar 2010, 02:52
Last Visit: Today, 05:51
PhpBB Version: 3.0.7-PL1

Re: Image shrink

Postby Ephemeraboy » 04 Aug 2010, 22:18

totally useful
thanks
User avatar
Ephemeraboy

BBCoder II
 
Windows XP Firefox
Status: Offline
Age: 19
Posts: 35
Topics: 4
Joined: 09 Mar 2010, 02:03
Last Visit: 29 Aug 2010, 12:46
Location: Unrated Zone
PhpBB Version: 3.0.7-PL1

Re: Image shrink

Postby testas123 » 28 Aug 2010, 13:59

so if image is too wide, it will shrink and if i want to see full size, i click on image and it will pop up in a new window? Yes?

Am i doing it right? :lol:
User avatar
testas123

BBCoder II
 
Windows XP Chrome
Status: Offline
Posts: 12
Topics: 1
Joined: 11 Jun 2010, 16:09
Last Visit: Yesterday, 07:58
PhpBB Version: 3.0.5

Re: Image shrink

Postby KukY13 » 28 Aug 2010, 14:18

testas123 » 28 Aug 2010, 15:59 wrote:so if image is too wide, it will shrink and if i want to see full size, i click on image and it will pop up in a new window? Yes?

Am i doing it right? :lol:

No, this will just shrink the image if it is too wide.
If you want to see it in full size on click, try this: Image Hyperlink
Image
User avatar
KukY13

BBCoder III
 
Windows XP Chrome
Status: Offline
Age: 13
Posts: 92
Topics: 10
Joined: 26 Jun 2010, 14:23
Last Visit: Yesterday, 20:43
PhpBB Version: 3.0.7-PL1

Donate to skip ads



Return to User Contributions



  • Similar topics
    Replies
    Views
    Last Post

Who is online

Users browsing this forum: No registered users and 1 guest