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

Forum

NC for Hire

As we all know this is the generation of mobiles and mobiles are taking over other devices. So by having a non-responsive table element on your web-page you are letting down your visitor.

Here are some CSS tips on how to make a table or grid responsive.

Step 1:  First we will go with a basic HTML table format. Simply copy and paste this code into website's HTML.

<table class="altrowstable" id="alternatecolor">
<tr>
<th>Heading example 1</th><th>Heading example 2</th><th>Heading example 3</th>
</tr>
<tr>
<td>Example 1A</td><td>Example 1B</td><td>Example 1C</td>
</tr>
<tr>
<td>Text 2A</td><td>Example 2B</td><td>Example 2C</td>
</tr>
</tr>
<tr>
<td>Example 3A</td><td>Example 3B</td><td>Example 3C</td>
</tr>
<tr>
<td>Example 4A</td><td>Example 4B</td><td>Example 4C</td>
</tr>
<tr>
<td>Example 5A</td><td>Example 5B</td><td>Example 5C</td>
</tr>
</table>

Step 2 Now copy and paste the javascript and CSS code into CUSTOM CODE (End of Page Code). This CSS table uses Javascript to automatically alternate row colors. 

That's it.

<!-- GRID TABLE STYLE  bernardmax2@gmail.com -->
<script type="text/javascript">
function altRows(id){
if(document.getElementsByTagName){

var table = document.getElementById(id);
var rows = table.getElementsByTagName("tr");

for(i = 0; i < rows.length; i++){
if(i % 2 == 0){
rows[i].className = "evenrowcolor";
}else{
rows[i].className = "oddrowcolor";
}
}
}
}
window.onload=function(){
altRows('alternatecolor');
}
</script>

<style type="text/css">
table.altrowstable {
font-family: verdana,arial,sans-serif;
font-size:11px;
color:#333333;
border-width: 1px;
border-color: #a9c6c9;
border-collapse: collapse;
}
table.altrowstable th {
border-width: 1px;
padding: 8px;
border-style: solid;
border-color: #a9c6c9;
font-weight: bold;
}
table.altrowstable td {
border-width: 1px;
padding: 8px;
border-style: solid;
border-color: #a9c6c9;
}
.oddrowcolor{
background-color:#d4e3e5;
}
.evenrowcolor{
background-color:#c3dde0;
}
</style>

Example 

Live Example  Click here 

If you have any questions or want me to help you for any kind of Ning custom job or ning re-designing jobs, feel free to contact me @ bernardmax2@gmail.com

Follow us on facebook https://www.facebook.com/ningtips

.

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

Join Ning Creators Network

Email me when people reply –

Replies

  • NC for Hire

    Nice tip Bernard!  Happy New Year!

  • Sweet!  Thank you Bernard

  • NC for Hire

    Thank you Jfarrow and KOS. Wishing you a happy new year....

  • The tables adjust on phone.

    Is anyway it can add colums/rows automatically 

    Thx

    • NC for Hire

      Hi Sam, in this tip you need to add columns and rows manually.However, there is a way to do so.

      Best

      Bernard

This reply was deleted.

Search the Creators Network

Latest Activity

Suki Winthrop replied to Fabricio Giugni's discussion Ning 2.0 or Ning 3.0 ?
"Seems familiar.
Nothing much happenig in months,
little communication, still soo  outdated and lack…"
8 hours ago
Tom Whelan replied to David Carr's discussion Being a Ning Network could ruin the deal
"I agree George,
When it comes to actual livelihood and business professionalism, I need stability a…"
8 hours ago
Phil replied to Anna Ning Support's discussion Announcing Events for Ning 3.0
"I like to disable RSVPs because members rarely bother to RSVP. It gives a bad impression when you s…"
9 hours ago
Arman and Tom Whelan joined Ning Creators Network
11 hours ago
⚡JFarrow⌁ replied to Fabricio Giugni's discussion Ning 2.0 or Ning 3.0 ?
"Everything is starting to pick back up as best I can tell.  You are correct in thinking that you sh…"
yesterday
⚡JFarrow⌁ replied to David Carr's discussion Being a Ning Network could ruin the deal
"We can work this in several ways. Give me a call back to discuss..."
yesterday
Fabricio Giugni replied to Fabricio Giugni's discussion Ning 2.0 or Ning 3.0 ?
"How can we trust Ning now? Seems to be everything bad. "
yesterday
Beverly is now a member of Ning Creators Network
yesterday
Kyryl_Ning_Support replied to Fabricio Giugni's discussion Can we see and show member statics?
"Hi there,
Unfortunately, the leaderboards are not available on 3.0 platform.
However, we have fille…"
yesterday
Kyryl_Ning_Support replied to Yana Ning Support's discussion CAPTCHA - NO BOTS AND SPAMMY CONTENT
"Hi Dan,
As we can see you have resolved your issue the same day with our CS representative.
Best re…"
yesterday
Fire-Tech replied to Fire-Tech's discussion 3.0 Tip: Insert Image Into Signin Page
"Yeah, I'm still here in the shadows. Been working on other projects until Ning gets their act toget…"
yesterday
⚡JFarrow⌁ replied to Fire-Tech's discussion 3.0 Tip: Insert Image Into Signin Page
"time to reboot, homey!"
Tuesday
George Swann replied to Fabricio Giugni's discussion Ning 2.0 or Ning 3.0 ?
"All newly created Ning networks are 3.0 by default. You cannot create a new 2.0.
You can however bu…"
Monday
George Swann replied to David Carr's discussion Being a Ning Network could ruin the deal
"My question is this, can my network be moved off the Ning platform to another, one that would not b…"
Monday
Kyryl_Ning_Support replied to Fabricio Giugni's discussion What a special Member can DO?
"Hi Fabricio,
Unfortunately, the options that you have mentioned are not available on our platform.…"
Monday
Deb Della Piana is now a member of Ning Creators Network
Monday
Bizz ( John ) replied to Bizz ( John )'s discussion Re-size Avatars In Messages Table And Messages Detail
"You can adjust the sizes for the ningbar text and icons with just a little css. Just don't go to bi…"
Monday
Bizz ( John ) replied to Bizz ( John )'s discussion Adding Your Friends, Email notifications and SignOut,Sign in To Your Profile Page ( updated so these and the options, social links all inline to the left )
"That's great news your site is backup, any ideas what happened ?"
Sunday
More…