PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Sunday, October 16, 2022

[FIXED] Why aren't my overflow and display properties working in Firefox and Chrome?

 October 16, 2022     css, firefox, google-chrome     No comments   

Issue

I have in my CSS this class:

.middleContent { overflow: hidden; display:inline-block; }

This works in IE but not in Firefox or Chrome so I wanted to do a sanity check here because I am not sure how to write this and might need direction.

To leave it working in IE, I left the above line:

.middleContent { overflow: hidden; display:inline-block; }

So for Firefox and Chrome, do I add the following lines like this:

For Firefox:

@-moz-document url-prefix() { 
     .middleContent { overflow: hidden; }
}

For Chrome:

@media screen and (-webkit-min-device-pixel-ratio:0) {
    .middleContent { overflow: hidden; }
}

Solution

Yes, you are correct. To Target Chrome :

@media screen and (-webkit-min-device-pixel-ratio:0) { 
 div{top:0;} 
}

To Target any firefox:

@-moz-document url-prefix() { 
      .selector {
         color:lime;
      }
    }


Answered By - yardie
Answer Checked By - Terry (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing