ElkArte Community

Elk Development => Theme development => Topic started by: anagnam on October 21, 2015, 01:25:53 am

Title: Responsive Image
Post by: anagnam on October 21, 2015, 01:25:53 am
Hi devs,

Can you please show me where in the template I can edit to add or override the CSS for the image attachment so I can make them responsive. Currently its ok in the desktop version, but in ipad or iphone, the image is not responsive. I know a little bit of CSS but I dont know where in the template I need to edit it.

many thanks for your help in advance  :)
Title: Re: Responsive Image
Post by: wintstar on October 21, 2015, 02:25:10 am
Look here => http://www.w3schools.com/css/css_rwd_images.asp
Title: Re: Responsive Image
Post by: anagnam on October 21, 2015, 02:28:50 am
@wintstar  I already know how make a responsive image. I just want to know where in the template I need to put the markup so the images become responsive like the template itself.
Title: Re: Responsive Image
Post by: radu81 on October 21, 2015, 04:41:37 am
have a look at this topic, maybe could be useful for you
http://www.elkarte.net/community/index.php?topic=2364.0
Title: Re: Responsive Image
Post by: anagnam on October 23, 2015, 12:17:18 pm
@radu81 tried it but didnt work. I use @Spuds inline attachment addons though.
Title: Re: Responsive Image
Post by: radu81 on October 23, 2015, 04:01:23 pm
it works for me, I also use the addon Inline images. You can see it here, in the first post there are two images inserted with attachimg tag, there is no need to login: skodaclub.it/index.php?topic=5068.0
I don't remember if I also did some css modifications, but you can use Chrome inspector or firebug

===edit===
I think I found it, have a look at this post ;)
http://www.elkarte.net/community/index.php?topic=1450.msg19660#msg19660

Title: Re: Responsive Image
Post by: anagnam on October 24, 2015, 04:38:40 am
@radu81 @TE solution didnt work for me so I modified index.template to add custom CSS instead. now everything is working fine.
Title: Re: Responsive Image
Post by: emanuele on October 24, 2015, 08:08:51 am
Feel free to share your findings, and maybe put them in the forum of a tutorial, this will help other people with the same problem. ;D
Title: Re: Responsive Image
Post by: radu81 on July 27, 2016, 07:23:27 pm
I have a test forum, it was migrated from SMF to Elkarte 1.0.4 and now to 1.0.7
I have the same problem, I solved editing ILA.subs and Subs.php as suggested here:
http://www.elkarte.net/community/index.php?topic=2364.msg15512#msg15512
http://www.elkarte.net/community/index.php?topic=1450.msg19660#msg19660

I don't know if this is related to ILA addon but I see that in Elkarte 1.1 version is solved and works  fine. Is this a bug into 1.0.7 or is just my forum that is not working (I admit is not a clean install and probably I did something wrong)
Title: Re: Responsive Image
Post by: ahrasis on July 27, 2016, 08:42:59 pm
Quote from: anagnam – @radu81 @TE solution didnt work for me so I modified index.template to add custom CSS instead. now everything is working fine.
Actually, you do not have to modify any template to add custom css, as you just need to add the said custom css in css folder.