Desktop ONLY (dimikjones please help)


#1

Greetings, I’d like to make a floating window and I know how, but I do not need it in mobile version of the site. I need it in desktop version only. Would you be so kind, to tell me where exactly should I put the code of the window to make it viewable only on big screens? css? php?

Floating box insert code:
I add:
<div id="floatbox"> my phone number </div> in header.php
And I add:

#floatbox {
	position: fixed; right: 10px; top: 100px;
	border: 2px solid #fff;
	padding: 7px 10px; }

in style.css
Thanks.


#2

Add this:


@media screen and (max-width: 991px) {
   #floatbox {
      display: none;
   }
}

Change 991px to the max-width of the screen for which the div will be hidden.


#3

Thanks a lot, Vlad!
Resolved