Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Atahualpa 3 Wordpress theme (http://forum.bytesforall.com/forumdisplay.php?f=2)
-   -   How to create IDīs and Classes to address specific items in the theme ? (http://forum.bytesforall.com/showthread.php?t=680)

Tigger Mar 7, 2009 10:04 AM

How to create IDīs and Classes to address specific items in the theme ?
 
Hi Flynn,

you recommended me to use firefox with extension to work on your theme css and customize it. That recommendation was super ! Thank you very much ! Without this tool I would be totally lost !

But now comes my latest question:
When I want to edit an item, it does not always has itīs own class or id. So if I edit it, I automaically edit all items in that class or with this id.

Example:
In the right sidebar I have 2 widgets. Each with a headline. Now I only want to have the headline of the upper widget with a border under it. When I add border-bottom to the div.widget-title in styles.css, all titles of widgets get a border.

How can I create for this single title a class or id, so that I can define css only for this specific item ?

That would be very important to know for many situations. Sometimes I also get no class or id shown in firefox. Just element.style (geerbt von p) z.B.

That brigs a lot of headaches to me.

Thank you for support, even if it is not specific for your theme. I am sure many people need such infrmation here.

Flynn Mar 7, 2009 03:27 PM

Atahualpa's sidebars are set up to give each widget 1 unqiue ID, 1 overall "widget" class and 1 unique widget class. You can access the title container inside the widget through the ID or class of the parent container

Your first widget has this as the parent container

HTML Code:

<div id="slideshow" class="widget widget_slideshow">
Since the title container is inside this parent container, you can still access it individually through the unique class or ID of it's parent container:

HTML Code:

div#slideshow div.widget-title {
...
}

The parent doesn't need to be the immediate parent. To style all widget titles in the left column differently

HTML Code:

td#left div.widget-title {
...
}

I am also adding more classes and ID's everywhere in the next version for the remaining items that currently have no unique class or ID and cannot be accesses through their parents either, such as menu bar items, post containers, etc...

Tigger Mar 8, 2009 07:35 AM

Thank you for quick answer ! It works as always. But how do I get a 1 px solid border around the slideshow ? I just do not catch this slideshow with itīs id or class.

Flynn Mar 8, 2009 10:35 AM

You're right, CSS on the SWF object doesn't seem to work.

You can still access it through it's parent, the widget-content container:
HTML Code:

div#slideshow div.widget-content {
...
}

There's a little space between object and border if you apply this.
To avoid that size the widget content container for that specific widget to be the
same size as the swf object

HTML Code:

div#slideshow div.widget-content {
border: 2px solid #003399;
width: 170px;
height: 100px
}


Tigger Mar 11, 2009 02:47 PM

works at a glance ! Thank you !


All times are GMT -6. The time now is 07:43 AM.

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