- Posts: 7
- Thank you received: 0
Media queries
-
sfg85
Inactive member - Topic Author
- New Member
Less
More
11 years 1 week ago #35689
by sfg85
Media queries was created by sfg85
Hello! I have a problem with viewing my website with mobile devices. I changed the position and styles of some modules in the standart HOTtheme, and added in "template_css" what I want to change.
As a result, when I view the website by using computer and resize the browser, it works perfectly, but mobile devices totally ignore my styles and the website looks awful. It seems the devices apply the default style for computer screens. Could you tell me what I did wrong?
@media (max-width: 800px) { {my style} }
@media (max-width: 600px)
@media (max-width: 400px)
I've also tried this:
@media all and (max-width: 800px)
@media and (max-width-device: 800px)
@media handheld and (max-width-device: 800px)
...but it doesn't work
the site is: vetradiography.ru
Thanks in advance,
Philip.
As a result, when I view the website by using computer and resize the browser, it works perfectly, but mobile devices totally ignore my styles and the website looks awful. It seems the devices apply the default style for computer screens. Could you tell me what I did wrong?
@media (max-width: 800px) { {my style} }
@media (max-width: 600px)
@media (max-width: 400px)
I've also tried this:
@media all and (max-width: 800px)
@media and (max-width-device: 800px)
@media handheld and (max-width-device: 800px)
...but it doesn't work
the site is: vetradiography.ru
Thanks in advance,
Philip.
Please Log in to join the conversation.
-
ivan.milic
Support Staff - Moderator
Less
More
- Posts: 14116
- Thank you received: 1639
11 years 1 week ago - 11 years 1 week ago #35696
by ivan.milic
Replied by ivan.milic on topic Media queries
Use:
@media screen and (max-width: 800px){
... css for under 800px ...
}
also you need to watch out about css rules advantage. More precise element targeting and order css of rules - second to be loaded if targeting same css path wins and id selector #something will win .something ...
@media screen and (max-width: 800px){
... css for under 800px ...
}
also you need to watch out about css rules advantage. More precise element targeting and order css of rules - second to be loaded if targeting same css path wins and id selector #something will win .something ...
Last edit: 11 years 1 week ago by ivan.milic.
Please Log in to join the conversation.
Time to create page: 0.148 seconds