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

Forum

It's very important to use the @media wraps for different screen resolutions on a responsive network such as Ning 3.0 networks.  

There are a lot of 3.0 networks that have asked me for help. Most of them their sites look perfect on a laptop, PC or TV with their custom CSS. But when it comes to a cell phone view it's terrible because they are using the same custom CSS codes for their cell phones as they are for the larger screen resolutions. Hopefully this will help some of the creators out there.

Usage Examples
This CSS wrap will deal with resolutions 960 pixels and wider. Change the word min- to max- that will make the CSS work on screen resolutions 960 pixels and smaller.

@media screen and (min-width:960px)  {

 }

And this is how it will look with your CSS added to it. As you can see there are now two of these symbols } at the end of your CSS code... very important. :-)


@media screen and (min-width:960px)  {
HEADER.site-header.cf {
    height:170px!important; }
 }

You can add multiple snippets of CSS in one @media wrap

@media screen and (min-width:960px)  {
DIV.adjacentEntryLink.adjacentEntryLink-next{
  margin-right:0px!important;}

DIV.adjacentEntryLink.adjacentEntryLink-previous{
  margin-left:0px!important;}

BODY.page-members.page-members .profileCoverArea {
    height: 235px!important; }


You can also use a max and min in the same CSS @media wrap. This CSS wrap will deal with screen resolutions 760 pixels up to 960 pixels.

@media screen and (min-width:760px) and (max-width:960px)  {
  
}

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Examples
Example 1, profile Cover Area image.
Let's say your profile Cover Area image looks great with a height of 265 pixels when your screen resolution is 970 pixels or wider but doesn't look very good at a screen resolution of 969 pixels or less. So we will use an  @media wrap to solve that issue.

This will deal with the height of your profile Cover Area image from screen resolutions 970 pixels or greater

@media screen and (min-width:970px)  {
DIV.banner-header.profileCoverArea {
    height:265px!important;
} }

And this one will deal with the height of your profile Cover Area image from screen resolutions 720 pixels up to 970 pixels.

@media screen and (min-width:720px) and (max-width:970px)  {
DIV.banner-header.profileCoverArea {
    height:170px!important;
} }

And these two will deal with the height of your profile Cover Area image for Mobile Phones 720 pixels or smaller.
There are a few different types of mobile phones with different screen resolutions so will break it down a little more to accommodate.

@media screen and (min-width: 480px) and (max-width:720px)  {
DIV.banner-header.profileCoverArea{
    height:75px!important;
} }

@media screen and (max-width:480px)  {
DIV.banner-header.profileCoverArea{
    height:40px!important;
} }


Now just add the four codes to your design studio CSS section and your cell phones, Tablets, Pc's and tv's views will all look great. This is how it should look in the CSS section.

/* start profile Cover Area image mod */

/* #### Desktops & TV's #### */
@media screen and (min-width:970px)  {
DIV.banner-header.profileCoverArea{
    height:265px!important;
} }

/* #### Tablets #### */
@media screen and (min-width:720px) and (max-width:970px)  {
DIV.banner-header.profileCoverArea{
    height:170px!important;
} }

/* #### Mobile Phones #### */
@media screen and (min-width: 480px) and (max-width:720px)  {
DIV.banner-header.profileCoverArea{
    height:75px!important;
} }

@media screen and (max-width:480px)  {
DIV.banner-header.profileCoverArea{
    height:40px!important;
} }

/* End profile Cover Area image mod */

Example 2, basic profile Cover Area image with a network width of 100%.
Now let's say you're using 100% width for your 3.0 network. You may want to use more CSS @media wraps for the larger resolutions. We'll use the same profile Cover Area image just like we did in the previous example.
 
This is how it should look in the CSS section.

/* start profile Cover Area image mod */
/* #### Desktops & TV's #### */
@media screen and (min-width:2000px)  {
DIV.banner-header.profileCoverArea{
    height:530px!important;
} }

@media screen and (min-width:1558px) and (max-width:2000px)  {
DIV.banner-header.profileCoverArea{
    height:445px!important;
} }

@media screen and (min-width:1260px) and (max-width:1558px)  {
DIV.banner-header.profileCoverArea{
    height:350px!important;
} }

@media screen and (min-width:960px) and (max-width:1260px)  {
DIV.banner-header.profileCoverArea{
    height:265px!important;
} }
 
/* #### tablets and smaller portable devices #### */
@media screen and (min-width:720px) and (max-width:960px)  {
DIV.banner-header.profileCoverArea{
    height:170px!important;
} }

/* #### Mobile Phones #### */
@media screen and (min-width: 480px) and (max-width:720px)  {
DIV.banner-header.profileCoverArea{
    height:75px!important;
} }

@media screen and (max-width:480px)  {
DIV.banner-header.profileCoverArea{
    height:40px!important;
} }

/* End profile Cover Area image mod */

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Your design studio CSS section and stylesheets should be set up much like this. That way you always know where to place and find your codes for your different resolutions and devices.

There are a few different types of CSS @media wraps.


/* #### Mobile Phones Portrait #### */
@media screen and (max-device-width: 480px) and (orientation: portrait)  {
  /* some CSS here */ 

}

/* #### Mobile Phones Landscape #### */
@media screen and (max-device-width: 640px) and (orientation: landscape)  {
  /* some CSS here */
}

/* #### Mobile Phones Portrait or Landscape #### */
@media screen and (max-device-width: 640px)  {
  /* some CSS here */
}

/* #### iPhone 4+ Portrait or Landscape #### */
@media screen and (max-device-width: 480px) and (-webkit-min-device-pixel-ratio: 2)  {
  /* some CSS here */
}

/* #### Tablets Portrait or Landscape #### */
@media screen and (min-device-width: 768px) and (max-device-width: 1024px)  {
  /* some CSS here */
}

/* #### Desktops & TV's #### */
@media screen and (min-width: 1024px)  {
  /* some CSS here */
}


A simple ways to learn more about the different CSS @media wraps. Type this query in any search engine "css media query width" ....
There is a whole lot more you can do with the CSS @media wraps to keep your site responsive and looking good on all devices.

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

Join Ning Creators Network

Email me when people reply –

Replies

  • This reply was deleted.
    • You're welcome Jamie. You've been using them! Awesome. I bet your site is one of the ones that look good on cell phones.

      You have a great day. :-)

      • This reply was deleted.
  • Awesome and so glad that you were able to get it to work quickly after we switched to themes 2.

    Blessings

    • Thank you Jim and you're welcome.
      blessings to you as well.

  • Hi George,

    thank you!

    you help me alot.

    • Hello Noémi, I hope you're having a wonderful day. :-)

  • This is confusing for me so far, but i am sure it is easy as pie once i get the hang of it so here is my problem i am having.

    I decided to dive into this and get my site looking responsive. Let's start with my groups for i have not gone outside of the standard layout only just adding my graphics. I have a one column layout with two same size columns at the bottom. I cannot see all of my wallpaper and what i can see is blurred and stretched out. I have my wallpaper set to any size resolution code. The layout fills the screen of my smart phone. I have a 4x2-1/2in. screen viewing area. My header logo is cut off on both sides of the screen. At the bottom columns i have my scroll bar height for my comment wall set to the same height of my tab container and content on the right column, but on my phone it's not the same size, but it is on my PC. Other than that everything else is responsive.

    You can view my group at http://buildingnewworlds2.ning.com/groups/game-on

    • Hi Randy..

      This will fix all those issues, and yes I used @media queries to solve the issues. lol :) Well except for the background image I just change the background attachment, size and repeat options.

      body.page-groups-game-on {
          background-attachment: scroll;
          background-size: inherit!important;    
          background-repeat: repeat;}

      @media screen and (min-width:760px)  {
      .groupHeader.groupHeader-coverPhoto {
          height: 160px;
          } }
      @media screen and (min-width:560px) and (max-width:760px)  {
      .groupHeader.groupHeader-coverPhoto {
          height: 120px;  
          background-size: 100% 100%!important; } }   
      @media screen and (min-width:360px) and (max-width:560px)  {
      .groupHeader.groupHeader-coverPhoto {
          height: 90px;  
          background-size: 100% 100%!important; } }  
      @media screen and (max-width:360px)  {
      .groupHeader.groupHeader-coverPhoto {
          height: 70px;  
          background-size: 100% 100%!important; }   }

      • Thanks George. Now that i see the code and my page in action that's the jump start i needed. It looks great on my phone now. Can't wait to see how it looks on a tablet. Thanks again. :)

        • You're welcome Randy.   
          On the bottom piece of code I meant to change that to 60. I think it looks better at 60px Instead of 70. Feel free to adjust any of that code to your liking.
          I like what you've done to your site it looks great, you're doing an awesome job. And about these media queries I'm sure you'll figure them out quickly.  
          You have a great evening. :-)

This reply was deleted.

Search the Creators Network

Latest Activity

Cat replied to Bryce Rubio's discussion A Follow-Up Message from our CEO
"Jesse, I still have 2.0 and wouldn't switch to 3.0 on a bet, as videos are a big part of putting to…"
1 hour ago
delores (dede ) keene is now a member of Ning Creators Network
5 hours ago
Fehér Gábor is now a member of Tips and advice.
7 hours ago
dave replied to ⚡JFarrow⌁'s discussion Hack Tip to Embed Document Library Bookshelves
"Nice Tip J, thank you for sharing :)"
9 hours ago
Catherine Potter replied to Catherine Potter's discussion 2.0 site transfer question!
"I do not have any ticket number to provide all I have is the transfer code approval for yes and the…"
11 hours ago
Kos replied to Michelle Stern's discussion Paid access & having more than 1 site (2 questions)
"Michelle yes, I imagine if you want different sites on completely different subjects which are unre…"
17 hours ago
Kos replied to Bryce Rubio's discussion A Follow-Up Message from our CEO
"Jesse yeah, Ning never finished building out 3.0 before they laid everyone off and went up for sale…"
18 hours ago
Kos replied to Brian Titus's discussion Facebook "3rd party integration"
"You should still set it up if you want anything 'public' to be liked or if you want members to be a…"
18 hours ago
Kos replied to Kos's discussion Something New Has Appeared
"Mike he's referring to my site.  We call the photos = charts.  We're stock traders"
18 hours ago
Martin Buzz replied to Bryce Rubio's discussion A Follow-Up Message from our CEO
"I have a request I would like to share: On ning 3.0 I am short on space and would need a way to lim…"
20 hours ago
Paul White, Robert Dozier and Fehér Gábor joined Ning Creators Network
20 hours ago
Brian Titus replied to Brian Titus's discussion Facebook "3rd party integration"
"So there is no point in going through the 3rd party integration setup? Sounds like it is a dead-end…"
20 hours ago
Kos replied to Sandor Gal's discussion "New Activities" error
"Uncertain what browser you're using but using Firefox, it takes forever for your page to load (I'm…"
20 hours ago
Kos replied to Brian Titus's discussion Facebook "3rd party integration"
"There is no 'share' button (sadly).  I placed that on my wish list to Nings developers and hope the…"
20 hours ago
Suki Winthrop replied to Michelle Stern's discussion Paid access & having more than 1 site (2 questions)
"Im confused too. I think ? you r talking about building several different sites with different doma…"
20 hours ago
⚡JFarrow⌁ replied to ⚡JFarrow⌁'s discussion Hack Tip to Embed Document Library Bookshelves
"Cool... thanks Kos...let me know if you have questions.."
21 hours ago
Brian Titus replied to Brian Titus's discussion Facebook "3rd party integration"
"Thanks for the reply. I do have a photo section that is publicly viewable. I see a Facebook "Like"…"
22 hours ago
Robert Sheen replied to Robert Sheen's discussion why is my Ning site unavailable?
"Many thanks

Rob"
22 hours ago
Kyryl_Ning_Support replied to Brian Titus's discussion Facebook "3rd party integration"
"Hi Brian,
If you are going to share the contact on the facebook please make sure that the photo/blo…"
23 hours ago
Kyryl_Ning_Support replied to Robert Sheen's discussion why is my Ning site unavailable?
"Hi Robert,
We do apologise for the inconveniences. We have restored your network and it's all set r…"
23 hours ago
More…