Tag Archives: CSS

30 CSS Selectors You Must Memorize from Tuts Plus

So you learned the base idclass, and descendant selectors – and then called it a day? If so, you’re missing out on an enormous level of flexibility. While many of the selectors mentioned in this article are part of the CSS3 spec, and are, consequently, only available in modern browsers, you owe it to yourself to commit these to memory.

http://net.tutsplus.com/tutorials/html-css-techniques/the-30-css-selectors-you-must-memorize/

WordPress – Custom Fields To Change Hypertext Link Color

Scenario: Client wants hypertext links to be white on only one of the Website’s pages, so they display nicely on the dark back ground. The hypertext links for the rest of the site are fuchsia, via CSS.

Problem: Adding hypertext to a WordPress page in Edit Page view, then changing it’s color to white (so it displays nicely on a dark back ground on the front-end of the site) makes it impossible to actually see when you’re trying to edit it in the Edit Page view. Unless you switch to HTML mode – which is a pain in the ass for the client.

Solution: WordPress Custom Fields just on that one page.

NOTE: This only works for a WordPress “page.”

Here’s exactly what I did:

1. Add the below PHP to the header.php file, anywhere between the <head> and </head> tags:

<?php if (is_page()) {
$css = get_post_meta($post->ID, ‘css’, true);
if (!empty($css)) { ?>
<style type=”text/css”>
<?php echo $css; ?>
</style>
<?php }
} ?>

2. Then, in the Custom Fields in your Edit Page view, add the following info:

In the “Name” field type: css
In the “Value” field type: a:link, a:visited {color: #FFFFFF;} a:hover, a:active {color: #FF00FF; text-decoration: underline;}

WordPress Custom Fields

WordPress Custom Fields

3. Working examples:

Website Design – CSS Resource – Smashing Magazine

Smashing Magazine is one of the best Website design resources out there!

I’m currently researching CSS techniques and Smashing Magazine is consistently a great resource for Web design, CSS, jQuery, javascript.

45 Powerful CSS/JavaScript-Techniques
http://www.smashingmagazine.com/2010/01/12/45-powerful-css-javascript-techniques/

Site: http://www.smashingmagazine.com/

Follow them on Twitter: @smashingmag