Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Header configuration & styling (http://forum.bytesforall.com/forumdisplay.php?f=15)
-   -   [SOLVED] Classes added to style.css seem to be ignored (http://forum.bytesforall.com/showthread.php?t=3742)

kostermw Oct 6, 2009 05:15 AM

[SOLVED] Classes added to style.css seem to be ignored
 
For some content I like to use my own ccustom table style and thus I added a class (derived from table) to the 'styles.css' file like;

table.mytable {
border-width: 0px;
border-spacing: 0px;
border-style: none;
border-color: gray;
border-collapse: collapse;
background-color: white;


However, when I apply the class in my content (using html edit) it is completely ignored. Is this by design or am I making a mistake?

juggledad Oct 6, 2009 05:30 AM

you should put this in the theme options at ATO->HTML/CSS Inserts->CSS Inserts

tis way they will be applied last and you won't have to re add them when you upgrade the theme since they are now a theme option and not a change to the code.

kostermw Oct 6, 2009 07:07 AM

Makes sense, however it does not work either.
See http://www.elefantin.nl/?p=5 for the result.
It seems the style is not applied or overruled.
I would expect something like this; http://www.elefantin.nl/test/

I have added the following CSS insert into your theme in Wordpress;


table.photoblog {
border-width: 0px;
border-spacing: 0px;
border-style: none;
border-color: gray;
border-collapse: collapse;
background-color: white;
}
table.photoblog th {
border-width: 0px;
padding: 0px;
border-style: none;
border-color: gray;
background-color: white;
}
table.photoblog td {
padding: 0px 0px;
background-color: #ffffff;
border-style: none;
}


and in my post (html edited) I then use;

<table class="photoblog" border="0">
<tbody>
<tr>
<td><img src="blogged/blog_effarc2009/eff1.jpg" alt="p1" width="180" height="135" /></td>
<td><img src="blogged/blog_effarc2009/eff2.jpg" alt="p2" width="100" height="135" /></td>
<td><img src="blogged/blog_effarc2009/eff3.jpg" alt="p3" width="180" height="135" /></td>
<td><img src="blogged/blog_effarc2009/eff4.jpg" alt="p4" width="180" height="135" /></td>
<td><img src="blogged/blog_effarc2009/eff5.jpg" alt="p5" width="100" height="135" /></td>
</tr>
</tbody></table>

juggledad Oct 6, 2009 07:34 AM

try this instead of what you have
HTML Code:

table.photoblog tr td,
table.photoblog tr td img {
margin:0;
padding:0;
background-color:#ffffff;
border-width:0px;
border-style:none;
}

the theme has settings for almost every level and since you weren't specific enough, the theme settings came into play - for example there is a '.post img {...} set of settings the you were not overriding, so they were applied.

kostermw Oct 6, 2009 10:20 AM

Ah, yes indeed ... that does the trick :). And what a nice compact way to (re)define the custon style. (typically lack of knowledge from my side)

Let me send you some kudo's as a token of appreciation for your swift reply.


All times are GMT -6. The time now is 02:12 AM.

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