image not display on mobile device

Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Mon Aug 24, 2015 12:27 pm
Reply with quote
Report this post
Hello,
i would like to hide a picture in the right side bar (into a custom module) when i am looking at the webstite in a tmobile device or small tablet.
i intend to use the following css rule :

@media all and (max-device-width: 820px)
{
img { display: none; }

@media only screen and not (min-device-width: 360px)
{
img { display: none; }
}

but I can't find in which css file I must insert it.
thks for help.
pascal
User avatar
Senior Boarder

GK User
Mon Aug 24, 2015 12:34 pm
Reply with quote
Report this post
override.css is the best place
Just remember to enable "CSS override" in template settings - advanced section.
User avatar
Moderator

GK User
Mon Aug 24, 2015 1:34 pm
Reply with quote
Report this post
Thks,
i added the following code

@media all and (max-device-width: 480px)

{
img { display: none; }
}

@media only screen and not (min-device-width: 820px)
{
img { display: none; }
}
but the image still appear in my mobile? is there something wrong in my css code?
User avatar
Senior Boarder

GK User
Mon Aug 24, 2015 8:54 pm
Reply with quote
Report this post
any help please.
thks in advance
User avatar
Senior Boarder

GK User
Fri Aug 28, 2015 6:37 am
Reply with quote
Report this post
As I understand it doesn't work?
Could you please post an url to your site?
User avatar
Moderator

GK User
Fri Aug 28, 2015 9:24 pm
Reply with quote
Report this post
yes it doesnot work .
the image still appears on the right side even in a mobile or when the browser window is reduced.
the url of the concerned page is http://www.phaedra-ellipse.fr/index.php ... -contacter

thks a lot for your advice.
pascal
User avatar
Senior Boarder

GK User
Wed Sep 02, 2015 2:50 pm
Reply with quote
Report this post
This code will work:
Code: Select all
@media (max-width: 480px) {
   img { display: none !important; }
}

the problem is within inline styling of this element - that is why you need to use important.
User avatar
Moderator


cron