Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Sidebars & Widgets (http://forum.bytesforall.com/forumdisplay.php?f=14)
-   -   Missing Style in Custom Widget Tables (http://forum.bytesforall.com/showthread.php?t=12997)

pahoehoe Feb 25, 2011 07:35 PM

Missing Style in Custom Widget Tables

I have several custom widgets using php to generate dynamic tables. My problem is that the table in the widget isn't displaying with the theme style. From reading through the ATO, I assume the tables should display with zebra stripe and hover effect for the rows. Instead, the table style is just blank.

So what am I missing? I'd rather not add style definitions to each of my custom widgets, but I will if it's the only way to go.

Thanks in advance. I'm not really a Wordpress or Atahualpa expert, but I've searched around the web and forums and haven't found an answer to this problem.

juggledad Feb 26, 2011 03:48 AM

Styles are applied to HTML elements using

(1) the element name (like 'Table')
(2) an ID assigned to the element (<table id="table1">) ID must be unique on the page
(3) a CLASS assigned to the element (<td class="odd red">

Note you can have both an ID and classes assigned to the same element and any of the three, or combination of the three can be used in the CSS Selector

There is no naming convention.

Different people write different plugin's/widgets

What do you think the odds are that Flynn (the developer of Atahualpa) and plugin developer John Doe used the same 'class's to identify their tables??

This is a place where using FireBug in FireFox is quite handy because you can go look a the elements and see what classes are assigned and construct a CSS Selector and rule to style the area of the page the way you want it.

pahoehoe Feb 26, 2011 10:30 AM

Thanks for the speedy reply. I used the My Custom Widgets plugin to set up my widgets, so I'm looking into the class definitions in my php code. I've tried it with and without defining class="zebra" in the table definition, with no success. I'll keep investigating the css settings further before checking back into this thread with more concrete details (on whether I'm able to solve this or not). Thanks again.

juggledad Feb 27, 2011 04:02 AM

instead of looking into the code, view the source of a generated page and look at what is created for the widget. Using that you may be able to construct the css you need (easier to look at what gets created than the code that does the creating :))

All times are GMT -6. The time now is 01:14 AM.

Powered by vBulletin® Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.