Page 1 of 11
Forum moderator: bigblog 
uCoz Community » For Webmasters » Custom Solutions » Auto post image resize in blog module
Auto post image resize in blog module
ehhe
Posts: 70
Reputation: 0

Message # 1 | 11:46 AM
Welcome!

I see a lot of message about auto image resize but i can't find a solution for this. So my visitors posts many thread to blog module with a largest post image than my site style. So i need an auto post image resize in blog module. I know this is possible smile
Animorph
Posts: 2855
Reputation: 189

Message # 2 | 2:52 PM
ehhe, you can do that with simple CSS codes

You can make the image auto resize to the max width of the boundary by using max-width:100% and height:auto.

Code
img {
  max-width: 100%;
  height: auto;
}


but it all depends on your website design number, please provide your website url and design number so the uCoz staff can help you a lot easy'er

ehhe
Posts: 70
Reputation: 0

Message # 3 | 2:10 PM
Thanks! This is work wery well smile I try to auto centering images with:

margin-left: auto;
margin-right: auto;

but this is not work. Why?
Post edited by ehhe - Monday, 2015-03-23, 2:34 PM
steven4u
Posts: 73
Reputation: 8

Message # 4 | 2:49 PM
ehhe,
there are many ways to center your image, try to use :
Code
margin-left: [number]%  


example :
Code
margin-left:30%


provide us with your website URL so we can help .

A person who never made a mistake never tried anything new
bigblog
*boops*
Posts: 1438
Reputation: 69

Message # 5 | 7:26 PM
Quote ehhe ()
margin-left: auto;
margin-right: auto;

This doesn't works because you didn't set a fix width value.

hey i'm joe, please don't call me on my real name because you're gonna misspell or mispronounce it and it drives me nuts
uCoz Community » For Webmasters » Custom Solutions » Auto post image resize in blog module
Page 1 of 11
Search: