Posted by The Doctor on Apr 15, 2010 with
No Comments |
Short Link
in
Tips
as
CSS,
del,
how-to,
HTML,
strikethrough
A simple how-to for creating a strike-through text effect with an HTML tag or CSS.
Strike-through text using the <del> tag.
OK, that was really easy. Here is a reference at W3Schools that goes into all the details.
If you are using WordPress you will find the del button on the HTML editor screen. Of course the editor button conveniently drops a date and time stamp attribute into the <del> tag as well, so the above line looks like this under the page:
<del datetime="2010-04-15T13:41:32+00:00">Strike-through text</del>
The ABC button of the visual editor uses inline CSS to create the strike-through effect. Here is an example of what the above line would look like under the page:
<span style="text-decoration: line-through;">Strike-through text</span>
To see an example of how strike-through text can be used feel free to read the latest revision of WordPress 3.0 Navigation Menu Styles.
Posted by The Doctor on Mar 17, 2010 with
No Comments |
Short Link
Last modified by The Doctor on April 15, 2010
in
Functions,
Tips
as
CSS,
register_sidebar,
settings,
widget,
WordPress,
wp_nav_menu
Let’s jump right in …
Using the default definition from the register_sidebar() function found in ../wp-includes/widgets.php of WordPress version 3.0-alpha 3.0-beta12 (see below):
$defaults = array(
'name' => sprintf(__('Sidebar %d'), $i ),
'id' => "sidebar-$i",
'description' => '',
'before_widget' => '<li id="%1$s" class="widget %2$s">',
'after_widget' => "</li>\n",
'before_title' => '<h2 class="widgettitle">',
'after_title' => "</h2>\n",
);
… and the default Navigation Menu widget, the following CSS style elements are generated:
- #nav-menu-<widget instance>
- .widget
- .widget_nav_menu
- .widgettitle
… with these elements generated specifically by the wp_nav_menu() function found in ../wp-includes/default-widgets.php of WordPress version 3.0-alpha 3.0-beta12:
- .menu-<menu name>-container2
- #menu-<menu name>
- .menu
- #menu-item-<unique identifier*>
.menu-item-type-<types: page, category, Custom>1
- .menu-item2
- .menu-item-type-<post_type, custom, or taxonomy>2
- .menu-item-object-<page, or category>2
- .current_page_item
- .sub-menu1
This is just an initial listing of my observations as of the March 16, 2010 3.0-alpha version of WordPress. Look for future updates; and, please feel free to make note of your own observations below.
Bonus – A suggested addition to style.css for theme developers:
/* WordPress 3.0 Navigation Menu default widget */
.widget_nav_menu .menu {margin: 0;}
.widget_nav_menu .menu li {
display: block;
float: none;
/* text-align: left; */
}
*N.B. – each new menu item generates its own post ID in the WordPress database ‘posts’ table. This appears to be in a similar fashion to post revisions.