Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Media Query Alteration

Featured Replies

Hi there,

 

I'm currently working with a Media Query theme, and I have a quick question on how to go about changing the way it behaves when re-sized.

 

See here for an online example.

 

http://o-p-o.org/test/

 

Regular CSS - http://o-p-o.org/test/css/style.css

Responsive CSS - http://o-p-o.org/test/css/responsive.css

 

Attached are some screenshots on how it behaves, and what I'm trying to achieve.

 

1.jpg is the full width currently, and 2.jpg is what I'd like it to look like.

 

3.Jpg is the medium width Currently and 4.jpg is what I'd like it to look like.

 

I've tried so many things to try and get this to work but I really can't figure out how to do this. Any help with this would be greatly appreciated.

 

Cheers.

post-17244-0-38089800-1341075201_thumb.png

post-17244-0-17994400-1341075213_thumb.png

post-17244-0-31479100-1341075220_thumb.png

post-17244-0-61262900-1341075228_thumb.png

Try adding:

@media only screen and (min-width: 992px) {
   .desc {
       display: none;
       }  
   #home-portfolio li.last, #home-blog li.last {
       display: block;
       } 
   #home-portfolio ul, #home-blog ul {
       margin: 0;
       }
   #home-portfolio li, #home-blog li {
       width: 225px;
       }
}
@media only screen and (max-width: 991px) {
      .desc {
       display: none;
       }  
   #home-portfolio li.last, #home-blog li.last {
       display: none;
       } 
   #home-portfolio ul, #home-blog ul {
       margin: 0;
       }
   #home-portfolio li, #home-blog li {
       width: 245px;
       margin-right: 11px;
       }
   .overlay {
       width: 245px;
       }
}

To the bottom of your responsive.css. You should be able to work it out from there.

 

Goodluck,

~evu.

  • Author

Try adding:

@media only screen and (min-width: 992px) {
   .desc {
       display: none;
       }  
   #home-portfolio li.last, #home-blog li.last {
       display: block;
       } 
   #home-portfolio ul, #home-blog ul {
       margin: 0;
       }
   #home-portfolio li, #home-blog li {
       width: 225px;
       }
}
@media only screen and (max-width: 991px) {
      .desc {
       display: none;
       }  
   #home-portfolio li.last, #home-blog li.last {
       display: none;
       } 
   #home-portfolio ul, #home-blog ul {
       margin: 0;
       }
   #home-portfolio li, #home-blog li {
       width: 245px;
       margin-right: 11px;
       }
   .overlay {
       width: 245px;
       }
}

To the bottom of your responsive.css. You should be able to work it out from there.

 

Goodluck,

~evu.

 

Cannot thank you enough, works perfectly (:

 

Thanks Evu, greatly appreciate your help.

Edited by snick

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.