Current status of the Ning Platform is always available on the Ning Status Blog.

There are times when you're customizing your network that your CSS codes act differently in different browsers. These snippets of code will help you fix those types of problems.


Targets Chrome & Safari

/* Google Chrome & Safari CSS */
@media screen and (-webkit-min-device-pixel-ratio:0) {
   /* your CSS here */
}


Targets firefox

/* Firefox CSS */
@-moz-document url-prefix() {
   /* your CSS here */
}


Targets IE 10 & 11

/* IE 10 & 11 CSS */
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)  { 
    /* your CSS here */
}


Targets IE 7, 8 & 9 - CSS stylesheet 

<!-- IE 7, 8 & 9 CSS stylesheet -->
<!--[if IE]>
    <link rel="stylesheet" type="text/css" href="https://api.ning.com//ie789.css" />
<![endif]-->




Example

I wrote a neat little code to enhance the comment threads it looks perfect in IE9, 10, 11, Chrome & Safari   with a left margin of 60px but in Firefox it pushes it 60 pixels too far left. So we'll use the Firefox query to fix this issue.

The original code no fix

/* Comment thread enhancement */
.comments-list.comments-level1 .comments-comment{
    border-bottom: 1px solid #aaa;
    margin-left:0px;
    left:0px;
    padding-left:0px!important;
    padding-top:5px; }
.comments-comment .comments-list .comments-comment DIV.comments-commentBody.media-frame{
    border: 1px solid #aaa;
    margin-bottom:5px;
    padding-top:10px!important;
    padding:5px;}
.comments-comment .comments-list .comments-comment DIV.comments-commentBody.media-frame:before{
    background:url("https://storage.ning.com/topology/rest/1.0/file/get/963872767?profile=original")
    no-repeat!important;
    background-position:left 0px top -0px!important;
    background-size: 20px 20px!important;
    content: ""!important;
    width:100%;
    color: transparent!important;
    margin-top:-25px!important;
    margin-left:60px!important;
    position:absolute!important;
    z-index:2!important;
    padding:10px;}


And the Firefox css fix.

/* firefox CSS */
@-moz-document url-prefix() {
.comments-comment .comments-list .comments-comment DIV.comments-commentBody.media-frame:before {
    margin-left:0px!important;}   
}


The completed code that looks the same in all browsers.

/* Comment thread enhancement */
.comments-list.comments-level1 .comments-comment{
    border-bottom: 1px solid #aaa;
    margin-left:0px;
    left:0px;
    padding-left:0px!important;
    padding-top:5px; }
.comments-comment .comments-list .comments-comment DIV.comments-commentBody.media-frame{
    border: 1px solid #aaa;
    margin-bottom:5px;
    padding-top:10px!important;
    padding:5px;}
.comments-comment .comments-list .comments-comment DIV.comments-commentBody.media-frame:before{
    background:url("https://storage.ning.com/topology/rest/1.0/file/get/963872767?profile=original")
    no-repeat!important;
    background-position:left 0px top -0px!important;
    background-size: 20px 20px!important;
    content: ""!important;
    width:100%;
    color: transparent!important;
    margin-top:-25px!important;
    margin-left:60px!important;
    position:absolute!important;
    z-index:2!important;
    padding:10px;}

@-moz-document url-prefix()  {
.comments-comment .comments-list .comments-comment DIV.comments-commentBody.media-frame:before{
    margin-left:0px!important;}  }

You need to be a member of Ning Creators Social Network to add comments!

Join Ning Creators Social Network

Votes: 0
Email me when people reply –

Replies

  • This is a helpful bit of information.  Thanks for sharing it, George! smile.gif

    • You're welcome and thank you TJ.  smile.gif     

      I like the smiley faces you're using in your comments.  smile.gif

  • Nice work George smile.gif

    • Thank you Dave.. Give me a call please.. :)

      • will ring tomorrow :)

      • Looks great, George. Give me a ring when your not busy, please.

        Blessings.

This reply was deleted.
 

Some interesting articles related to community management, digital marketing etc. could be found in our digest. Don't hesitate to leave a feedback so we would know that we should continue :-)

Latest Activity

Alex - Rosas † Negras replied to Alex - Rosas † Negras's discussion
I managed to add group video calling, if anyone is interested I will post the codes
"⚡JFarrow⌁  
I'm working on the stories and I don't have time to work on the video call you just…"
Sunday
Alex - Rosas † Negras replied to Alex - Rosas † Negras's discussion
I managed to add group video calling, if anyone is interested I will post the codes
"if you want I'll give you the codes privately and we'll see if the two of us can make it perfect"
Jun 27
Eva and ⚡JFarrow⌁ are now friends
NC for Hire
Jun 25
⚡JFarrow⌁ replied to Eva's discussion
For three days now, my networks, Ning 2.0 and Ning 3.0, are incorrectly visible
"Ug... thats not right..  ill send you my phone number in messages and we'll talk it over."
Jun 24
Eva replied to Eva's discussion
Help Help Help
" I just started a test network on Ning. I'm having the same problems there too! No photos, in…"
Jun 21
Eva posted a discussion
Jun 21
Eva posted a discussion
For three days now, my two networks, Ning 2.0 and Ning 3.0, have been displayed incorrectly, they…
Jun 21
⚡JFarrow⌁ replied to Alex - Rosas † Negras's discussion
I managed to add group video calling, if anyone is interested I will post the codes
"looks interesting"
Jun 20
⚡JFarrow⌁ updated their profile photo
Jun 16
Kenny Craig updated their profile
Jun 8
Isabella Wilson updated their profile
Jun 5
Eva liked ⚡JFarrow⌁'s discussion What is going on with Ning? What Do We have to Look Forward To?
Jun 2
More…

Meanwhile, you can check our social media channels