Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Automatic resize pictures for mobile view
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Automatic resize pictures for mobile view

 Post Reply Post Reply
Author
recordere.dk View Drop Down
Newbie
Newbie


Joined: 01 February 2004
Location: Denmark
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote recordere.dk Quote  Post ReplyReply Direct Link To This Post Topic: Automatic resize pictures for mobile view
    Posted: 06 March 2011 at 1:41pm
Hi All

Here's a simple usefull change to Web Wiz Forum 9.70, to make the forum pictures resize automatically for mobile viewing.

Edit file: cssstyles/default/mobile_default_style.css

Locate .msgBody{ definition, and add a new style for images.


/* Forum posts */
.msgBody{
    width: 100%;
    margin: 2px;
    float: left;
    overflow: auto;
}

.msgBody img {
    max-width: 99%;
    height: auto;
}

The blue text is the new definition.

Here is a 1200 pixel wide picture viewed in the forum though an iPhone:





BTW. If you want the same function for the normal view forum as well, its a bit different.

Edit cssstyles/default/default_style.css

Add a definition like:

.msgBody img {
    max-width: 750px;
    height: auto;
}

Change the number 750 to a pixel size that fits the width of the message area in your forum. Then images wider than that number automatically gets resized to this width.

  Regards, Lars
Back to Top
123Simples View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 July 2007
Location: United Kingdom
Status: Offline
Points: 1192
Post Options Post Options   Thanks (0) Thanks(0)   Quote 123Simples Quote  Post ReplyReply Direct Link To This Post Posted: 06 March 2011 at 3:11pm
This is an excellent tip Lars
Thankyou
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 07 March 2011 at 9:53am
Thanks Lars will look at adding this to the next release.
Back to Top
Rammy Desuja View Drop Down
Newbie
Newbie
Avatar

Joined: 27 April 2013
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote Rammy Desuja Quote  Post ReplyReply Direct Link To This Post Posted: 27 April 2013 at 2:28pm
Really nice. looking to see very useful. thanks for this feature..............

Thanks;

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.