You can use css media queries. read examples here
How to make div disappear when window width is reduced?
-
07-07-2023 - |
سؤال
I am trying to make my logo stay fixed on my header. Here is my example site: http://www.hidesertheat.com/test/index.html
When the window is expanded to a certain height the logo (The sun) changes position. How can I make it fixed?
Also I want the logo to disappear after a certain point of the window is reduced. How can this be done?
المحلول
نصائح أخرى
function setheight(){
var sliderheight = window.innerHeight - jQuery(".header").height();
liheight = sliderheight;
sliderheight = sliderheight+"px";
jQuery("div").css({"dispaly":"none"});
}
See the above example , It may help you
لا تنتمي إلى StackOverflow