CSS Media Rule Based on Screen Sizes

9 months ago

< 1 min read

Posted by:

Focus

Subscribe to newsletter

By subscribing you agree to with our Privacy Policy.

Share

This is very helpful for limiting custom CSS to certain breakpoints. Usage examples are Scrollbar, Offset Slides and Offset Carousel Posts. Modify the breakpoints (the ones in px) to your needs.

Desktop & Tablet Only

@media only screen
and (min-device-width: 767px)
{

}



Mobile Only

@media only screen
and (max-device-width: 767px)
{

}



Example

/* WordPress Default Code Block Styling */
@media only screen
and (min-device-width: 767px)
{
.wp-block-code code {
	font-size: 17px}
}

@media only screen
and (max-device-width: 767px)
{
.wp-block-code code {
	font-size: 15px}
}

Read more

Video

3 min read

YotuWP Plugin: Custom CSS

Go to Dashboard > Appearance > Customize and add this custom CSS. LIGHT MODE CSS DARK MODE CSS

Read more

Video

< 1 min read

How to Make Play Icon on Image Overlay Smaller (Elementor Video Playlist Widget)

If you activate the image overlay, there is an option to show play icon. And the default play icon for

Read more

Video

< 1 min read

How to Get Youtube API and Check Quotas

How to get Youtube API:Go to: https://console.cloud.google.com/apis/dashboard How to check Youtube API Quota:Go to: https://console.cloud.google.com/iam-admin/quotas

Read more

Global

3 min read

Improve the Quality of the Scrolling Experience with Custom CSS Scrollbars

Hello guys! Have you ever thought about how to improve the appearance of the scrollbar on your website page? A good scrollbar

Read more

See How It Works

Create better websites, faster.

Download the Entire Library

Adaptative, neutrally designed components.

Customer Service

Focus Website

Today, July 27

Hi, there 👋

How can I help you?

Start Chat with:

We use cookie to improve your experience on our site. By using our site you consent cookies.