Shape 5

Joomla Templates => New Vision - Club => : rowanwins November 07, 2012, 04:16:14 PM



: Responsive images in articles
: rowanwins November 07, 2012, 04:16:14 PM
Hi guys,

Thanks for a great template. I just had a question about how to make images contained in articles responsive.

I've normally layout my articles in a table but when I do this it all goes a bit crazy on mobile devices, the image stays the same size but the text just get next column gets all squished.

If I dont have a table the image stays the same size but the text get resized so its smaller.

Im sure you guys must have a better way where the image resizes :)

Thanks in advance!

Rowan


: Re: Responsive images in articles
: mikek November 08, 2012, 08:48:13 AM
Hello,

I'm not sure what your question is? A table won't work well with responsive designs and is not commonly used anymore. If you want the images to resize you need to do them outside of a table.


: Re: Responsive images in articles
: rowanwins November 08, 2012, 04:08:43 PM
Hi Mike,

Well that answers part of my question, tables & responsive = bad!

So currently I have an article with an image in it
http://bullant.rldesign.net/about2.html

When I resize the page the image stays the same size and the text all moves around it. Ideally I'd like the images in my articles to resize on the fly, like they do in the image slider on the demo homepage...

Perhaps this is because my image is within the same para as my text rather than just sitting on the line above or below?

Am I making any more sense?

Thanks


: Re: Responsive images in articles
: mikek November 09, 2012, 08:56:57 AM
Hello,

All a responsive image will do is make sure that it doesn't become larger than the div that contains it, ie: max-width:100%

if you want it to keep it's proportions you need to switch the image to a percentage based width. You currently have it set to 290px and it will always stay that width until it reaches the width of the surrounding div.