Image Size Problem Hitskin_logo Hitskin.com

This is a Hitskin.com skin preview
Install the skinReturn to the skin page

The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.
+3
Uber Lord
zakir321
simmo
7 posters

    Image Size Problem

    avatar
    simmo
    New Member


    Posts : 11
    Reputation : 0
    Language : english

    Image Size Problem Empty Image Size Problem

    Post by simmo Tue 25 Mar - 10:49

    Heya folks.

    Hopefully this isn't too difficult to solve. Users on my forum have posted some images that are cut off by the right edge of the board:

    Image Size Problem Picproblem

    There's a chunk of the image cut off by the line on the right.

    Other than users resizing pics themselves, is there anyway to make a maximum picture size to fit the space of the board?

    Cheers in advance.

    Edit - And I've just noticed it happens here for me too. It's not a matter of screen width either, as it's happening to some users who have large screens.
    avatar
    zakir321
    New Member


    Posts : 0
    Reputation : 2
    Language : english

    Image Size Problem Empty Re: Image Size Problem

    Post by zakir321 Tue 25 Mar - 18:47

    it is a matter of your browser window's width. Everything wider than the post area will be cropped. The best solution for automatically resizing images within posts would be to put the code below into the text field in "Styles / Colors / CSS Stylesheet" and clicking submit. All images that are larger than the posts width, will be dynamically resized.

    Code:
    .postbody .content img{max-width:100%}

    This of course, has also disadvantages - a better solution would be to tell your users to use thumbnail - links instead. A small preview supported by the most image hosts that links to the full sized image when you click the thumbnail.

    Edit: btw, the code above eventually has to be altered if you are using phpBB version 2.0. Smile
    Uber Lord
    Uber Lord
    Forumember


    Male Posts : 710
    Reputation : 18
    Language : English
    Location : USA

    Image Size Problem Empty Re: Image Size Problem

    Post by Uber Lord Tue 25 Mar - 22:16

    Code:
    .postbody .content img{max-width:60%}

    What size by size is that?
    fisherboy7
    fisherboy7
    Forumember


    Male Posts : 80
    Reputation : 0
    Language : English

    Image Size Problem Empty Re: Image Size Problem

    Post by fisherboy7 Sat 29 Mar - 15:33

    Sunny_D wrote:it is a matter of your browser window's width. Everything wider than the post area will be cropped. The best solution for automatically resizing images within posts would be to put the code below into the text field in "Styles / Colors / CSS Stylesheet" and clicking submit. All images that are larger than the posts width, will be dynamically resized.

    Code:
    .postbody .content img{max-width:100%}

    Wow, great info. Now what about the forum's main logo? If it's too big for some browsers, will this code resize the logo as well? Or is there another code for that?
    avatar
    zakir321
    New Member


    Posts : 0
    Reputation : 2
    Language : english

    Image Size Problem Empty Re: Image Size Problem

    Post by zakir321 Sat 29 Mar - 17:30

    It will only resize images within posts....

    Well, and to my knowledge a similar code wouldn't work for the header logo... at least I can't think of a solution at the moment, but I'll inform you when I stumble upon one. Wink
    kingofpk
    kingofpk
    New Member


    Male Posts : 20
    Reputation : 0
    Language : English

    Image Size Problem Empty Re: Image Size Problem

    Post by kingofpk Sun 30 Mar - 7:34

    Well I have the same problem.
    This is great help sunny but one thing more friend.
    when i put this code, image looks complete 100% but Image Pixels Not Looks Good. Its Effect On Image Pixels.
    I watch some forums when post a high resolution pics The Post Size Automaticaly get a big siz and you can Scroll the page from ScrollBar left to right to watch complete image and its not effect on the post and also on the image pixels. Is there any solution.?

    One More Question When I Submit an Img Or Smiley in new topic or post reply its show only the code but i want when i post reply and take an image or smily it should disply image in the box Before Send The Post. not cods is that possible.?
    Thank you Soo Much.
    avatar
    zakir321
    New Member


    Posts : 0
    Reputation : 2
    Language : english

    Image Size Problem Empty Re: Image Size Problem

    Post by zakir321 Mon 31 Mar - 22:11

    Of course the image necessarily gets resampled when you use this code, but I think a resampled image is still better than a cropped one. Not sure about a good solution that uses scrollbars. But there is a manual solution. If you have an oversized image, use the following code in your posts instead using the [img] tags:

    Code:
    <div style="width:100%; height:100%; overflow:scroll;"><img src="IMAGE URL" /></div>

    Your images posted that way will use scrollbars if their width exceeds the post borders. Smile

    For your second question, be sure that you have activated bbCode for that post (Profile / Preferences) and in general (Users & Groups / Users / User Settings).
    Uber Lord
    Uber Lord
    Forumember


    Male Posts : 710
    Reputation : 18
    Language : English
    Location : USA

    Image Size Problem Empty Re: Image Size Problem

    Post by Uber Lord Wed 2 Apr - 2:55

    Uber Lord wrote:
    Code:
    .postbody .content img{max-width:60%}

    What size by size is that?

    ?
    kingofpk
    kingofpk
    New Member


    Male Posts : 20
    Reputation : 0
    Language : English

    Image Size Problem Empty Re: Image Size Problem

    Post by kingofpk Wed 2 Apr - 3:16

    Thanks Sunny And Uber Lord.
    Its Good I should Announce Click on image to watch full siz image in new window. Laughing
    avatar
    zakir321
    New Member


    Posts : 0
    Reputation : 2
    Language : english

    Image Size Problem Empty Re: Image Size Problem

    Post by zakir321 Wed 2 Apr - 17:15

    Uber Lord wrote:
    Code:
    .postbody .content img{max-width:60%}

    What size by size is that?

    Still not sure what you mean... this makes the images have a maximum size of 60% of the postarea's width.
    kingofpk
    kingofpk
    New Member


    Male Posts : 20
    Reputation : 0
    Language : English

    Image Size Problem Empty Re: Image Size Problem

    Post by kingofpk Thu 3 Apr - 3:27

    Yep 60% looks some good.
    i think its better.
    and post looks good too. cheers
    avatar
    caiwie
    New Member


    Posts : 7
    Reputation : 0
    Language : English

    Image Size Problem Empty replica watch

    Post by caiwie Thu 1 Apr - 9:17

    Removed.
    avatar
    Mythril
    New Member


    Male Posts : 17
    Reputation : 0
    Language : English

    Image Size Problem Empty Re: Image Size Problem

    Post by Mythril Tue 11 May - 23:54

    I'm having the exact same problem. People uploading pictures and the right hand side being cut off. Can someone please tell me where I put this code into the CSS Stylesheet ?!?

    .postbody .content img{max-width:100%}

    I've put it in and I keep getting this error message:

    Detected error
    We have counted a different number of "{" and of "}". It means your CSS risks to be not valid and will not be posted correctly on your forum.

    We advise you to reread your code.

    Thanks in advance Smile

    Mythril