[ 3 posts ]

HUR

  • Username: hafeezr
  • Joined: Tue Jun 14, 2011 3:17 pm
  • Posts: 2
  • IRC: HR
  • Offline
  • Profile
Tags:

datatable CSS not working

Post Posted: Tue Jun 14, 2011 3:26 pm
+0-
Hi

I am new to YUI and need help. I am trying to render a datatable into my page and it render fine but for some reasons datatable CSS is not working, the rendered table is not nice looking datatable it's a rough html table. any idea?

Thanks.

HR

Jenny Donnelly

YUI Developer

  • Username: jenny
  • Joined: Tue Dec 09, 2008 5:00 pm
  • Posts: 58
  • GitHub: jenny
  • Gists: jenny
  • YUI Developer
  • Offline
  • Profile

Re: datatable CSS not working

Post Posted: Tue Jun 14, 2011 4:08 pm
+0-
Hi HR,

Are you sure you added the proper "class" value to a containing element? For instance

<body class="yui-skin-sam"> for YUI 2

or

<body class="yui3-skin-sam"> for YUI 3

Cheers,
Jenny

HUR

  • Username: hafeezr
  • Joined: Tue Jun 14, 2011 3:17 pm
  • Posts: 2
  • IRC: HR
  • Offline
  • Profile

Re: datatable CSS not working

Post Posted: Tue Jun 14, 2011 11:33 pm
+0-
Hi Jenny

Thanks for reply. Yes I have added <body class="yui3-skin-sam">. even I have copy & paste an working example into my page same behavior. Table renders fine but raw html no CSS loaded.

Steps I did.
<script src="http://yui.yahooapis.com/3.3.0/build/yui/yui-min.js" charset="utf-8"></script> added.
Body has class <body class="yui3-skin-sam">
Div for datatable <div id="contactsPreview"></div>

code to render the table.

YUI().use("datatable-base", "json", function(Y) {

var cols = Y.JSON.parse(getElementValue("columns"));
var conts = Y.JSON.parse(getElementValue("contacts"));
var dt = new Y.DataTable.Base({
columnset: cols,
recordset: conts,
summary: "Sample Summary",
caption: "sample caption"
}).render("#contactsPreview");
});
  [ 3 posts ]
Display posts from previous:  Sort by  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum