O'Reilly / Buy 2 books, get the 3rd free
I have mentioned this to my readers before but they are doing it again. O'Reilly is easily my favorite publisher when it comes to technical books. Buy two books direct from O'Reilly and get the third free by using code OPC10 in our shopping cart. You can click on the link below to learn more about it. If I were you I would take advantage of the offer and pick up a couple books you need and one you may not have purchased. Another great incentive is that any books over 29.95 qualify for free shipping.
CSS Fun: Highlighting different types of links
I am in the middle of reading the book CSS Mastery by Andy Budd. First off what a great book for everyone. I am by no means a designer but this book has helped out big time. Using CSS day to day is one thing but once you really start to understand why things happen (i always blame IE) then you are much better off. You may periodically see a CSS tip from me, most of which you can see on my site.
The first tip I am going to share with you is using how to highlight different types of links. This makes it easier for users to understand what they are clicking on. We will use this for external links and email links. The easiest way to do this is to add a class to any external links and then apply that class to all external links. The problem with that method is you have to go around to each link and add a class. An easier way of doing that is using attribute selectors.
Attribute selectors allow you to target an element based on the existence or value of an attribute. This technique works by first targeting any links that start with the text http: using the [att^=val] selector. This will highlight all external but it will also pickup any internal links using absolute paths. To fix this we can reset any links that match our domain name. In the code below we are setting the background image for all external links, resetting links that are absolute internal and finally giving some style to mail links. Below the code is examples of each.
1: /* show users that links are external */ 2: a[href^="http:"] { 3: background: url(../images/externalLink.gif) no-repeat right top; 4: padding-right:10px; 5: } 6: a[href^="http://www.danvega.org"] { 7: background-image:none; 8: padding-right:0px; 9: } 10: /* show users that this is an email link */ 11: a[href^="mailto:"] { 12: background: url(../images/email.png) no-repeat right center; 13: padding-right:15px; 14: }
This is an external Link To Google
This is an absolute link to my about page
This is a link to email me
My 3 New Books & Concept over Code
Well besides being very busy lately I got 3 new books sent to me. Most of you have read them and I am learning quickly that two of these are must have reads for any programmer.
- Head First Design Patterns
- The Pragmatic Programmer
- Pragmatic version control using SubVersion
Head First OOA&D Code Downloads
The source for the examples in the new Object-Oriented Analysis and design book I am reading are now posted. If you are reading the book and want to get your hands on the source just follow the link below. For those of you not reading the book I suggest you pick up a copy immediately.
