Feb 24 2010

Target the first paragraph on a page or section with CSS

ilz

So often I’ll be working on a website that somebody else coded and have to strip out junk styling. There are a lot of different ways to accomplish the same thing with CSS, but so many people have no idea how much time they are wasting by coding something in a “hacky” manner.

Example.
I was working on a site the other day and noticed that every single paragraph in the main content area of every page of the site had a class of “first-paragraph” on it. So I looked in the external sheet and saw that this was simply to remove the top margin on the first paragraph on every page. Ok, so that method worked..great. Except that manually adding a class to every paragraph tag is such a waste of time. Check out the demo where I show an example of targeting the first paragraph in a content area without adding any classes or IDs paragraph tag in the XHTML. Then keep reading to see how to properly code the example above.

View Demo
Continue reading

Feb 20 2010

Add an auto-updating Copyright to your website with Javascript

ilz

Websites need to have the copyrights on them. Usually this is found in the footer of the site. As I was updating a client’s site the other day I noticed his copyright info was still 2009; so I updated it in the template, applied it to the pages, and re-uploaded everything to the live site.

One of the worst things you can do with your website is to not make updates once it’s live. Fresh content is the only thing that will keep your users AND search engines returning. One of the best ways to let users know that you never update your website (saaarcasm), is to have a copyright in the footer of your website from 2003. It really is a pain to have to go in at the first of every year to update all of your client’s websites though. Luckily, Javascript can save us. Using Javascript we can add a copyright to the webpage that will automatically update with the current year. Check out the demo, and then keep reading to grab the code.

View Demo

Continue reading

Jan 3 2010

WebDesign&Such turns 1 years old!

ilz

Happy Birthday to me!

A year ago on January 3rd 2009 WebDesignAndSuch.com was launched. I had a variety of reasons for creating this website. One of the main reasons was to give WordPress a try. There is obviously no better way of learning a new technology than actually using it, so here we are.

Another main reason was the content. As a designer I constantly have topics that I want to write about. One thing I love about the design community is how open everyone is with sharing their knowledge with each other. This helps us all grow as designers and developers; and in turn helps the web grow. I’ve learned a lot from a ton of people over the years, and I’m happy to do what I can to share my knowledge.

CSS has to be one of my favorite things about being a web designer; I’m sort of obsessed. My goals for the next year are to step up my jQuery and Wordpress skills. I also hope to start adding some video tutorials to the site. WebDesignAndSuch will be undergoing a lot of design changes over the next year.. stay tuned!

Dec 26 2009

How to create a Popup with CSS and Javascript

ilz

Popups suck.

The good thing is you don’t see that many of them any more. That’s because browsers recognize that they suck and are most likely spam or ads and so they block the popups. The old way of creating a popup was to force open a new browser window over the current browser window. So this is what browsers block. But what if you actually have a need to use a popup window for something useful and not spammy? This happened to me the other day. A client wanted a popup window on their homepage to wish everyone a Merry Christmas.

Knowing I couldn’t use the old popup method, I went searching. I knew it’d be easy enough to use CSS to put a floating div over the content of the site, which creates a popup effect. The problem was how do you close the popup once it’s open? Javascript would be needed for this. Check out the demo I setup which shows how the CSS popup can be set to open on pageload or by clicking on a link; and then how Javascript allows you to have a “close” button that shuts or hides the popup. Then continue reading for the code and downloadable files.

View Demo

Continue reading

Dec 14 2009

How to create a custom iPhone icon for your website

ilz

Here’s a quick way to further enhance the branding of your website. If you don’t have an iPhone go get one. Then try bookmarking your website; (go to a website in your iPhone Safari browser, hit the + symbol, and hit “Add Bookmark“). What this does is take a small screenshot of the webpage and add it to your iPhone, right net to the other icons you have.

Well forget that, now we can make custom icons, so when somebody bookmarks your website, the icon is one that you actually created! As a designer I might be a little bit TOO excited about this, but hey, this is the stuff I live for. You can see in the above image the two icons I’ve created for my websites, WebDesignAndSuch and BeantownDesign. So now the icons match the favicons of my websites, and I can just touch them to launch my websites on my iPhone.

Keep reading to see how to create your own iPhone icons.
Continue reading

Dec 12 2009

Simple form styling with CSS

ilz

I create a couple of forms a week for client’s websites. Usually they’re very similar in content. First Name, Last Name, Address, Phone Number, Email, Comments, etc. Of course I like to use a little CSS to style these forms up to match the rest of the site. I find myself copying the same basic styles over from the last form I created, and then editing the background colors and borders of the inputs, buttons, etc. I decided it was time to put these base styles online so they would be easy to grab on any project. And of course hopefully this will help other designers realize how simple the process is, and why there should never be an un-styled form on a website.

Check out the demos to see how by changing a couple of CSS rules you can create a completely different looking form to match your website. Then continue reading to see how the CSS code works for this. When viewing the demo forms, try typing in the fields to see how the background color of the fields can be changed, as can the color of the text in the field. Also, try to roll your mouse over the buttons to see how they can have rollover effects put on them.

View Demo 1

View Demo 2

View Demo 3
Continue reading

Dec 9 2009

A look at the CSS Cursor Property

ilz

Recently I was setting up CSS styles for a navigation. One thing I do a lot is change the cursor type with CSS for the link of the current page. So if you are on the About page and you roll over the About link, your cursor will be the default arrow, not the hand pointing the finger which indicates a link. Sure it’s still a link, but I feel this helps distinguish the page you are currently on a little bit further than just changing the color of the current page link.

As I was doing this styling I realized that there are actually quite a number of different cursor types that can be set with the CSS cursor property. Keep reading to see the examples and code for each.
Continue reading

Dec 8 2009

Embed a Twitter Feed on your website with jQuery

ilz

In a previous post I showed possibly the easiest way to embed a Twitter feed on your website. This brought up a couple of questions from some users.

1. Can you make a background behind individual Tweets?
2. Can you put the date on it’s own separate line?

As the case goes with a lot of things these days jQuery to the rescue! Check out the demo to see both of these things in action, and then continue reading to see how to accomplish these things with jQuery and download the source files.

View Demo Continue reading

Dec 6 2009

jQuery Product Slider

ilz

Recently I was put in charge of creating a product slider for a client’s website. There would be four products shown at a time, with one new product being revealed each time as the slider moved from the right to the left. I figured there was a jQuery slider out there that I could manipulate for this, and after a little hunting I found one.

The actual slider and website I created it for isn’t live yet. I used the base slider I created and used a few Apple images to show the general idea in the demo. So check out the demo, and then keep reading to see the details.

View Demo
Continue reading

Nov 23 2009

Using Box-Shadow with CSS3

ilz

I showed in a previous post how to use text-shadow with CSS3. Now it’s time to move on to something that’s just about as exciting, using Box-Shadow with CSS3. Throw it on a div, on a table, on an image.. anything goes! Of course it doesn’t work in every browser, but then again not much I talk about on this site does!

Check out the demo to see some examples and then keep reading to find out how to use Box-Shadow.

View Demo
Continue reading

Nov 16 2009

Using Text-Shadow with CSS3

ilz

Remember the old days when the only way to create a shadow on text was to make it an image? That’s good for search engines..right? Oh sure, just use some image replacement and then the search engines can read it. Not so easy for text edits in the future. Or for changing the color of the text or the background behind the text.

Fastforward to CSS3. Now we can define a shadow behind live text on a website. Wiggity whaaat? That’s right, simply with some good old CSS. Of course you’ll need to use a real browser, as of any other cool CSS technique, but I won’t even begin to go into that topic. So why is this so great?

  • Search engines can read the text
  • Easily change the color of the text
  • Easily change the color, size, or blur of the shadow
  • Easily change the background color or image behind the text
  • Your friends will be like totally impressed

An example of this is the title to every article on this lil website of mine. Do you see the shadow behind the title “Using Text-Shadow with CSS3“? If you don’t for the love of god.. DOWNLOAD FIREFOX! Check out the demo for some more examples of text-shadow created with CSS3, and then continue reading to learn how to write the CSS.

View Demo

Continue reading

Nov 15 2009

Booq Folee 2 Messenger Bag Review

ilz

As a freelance designer I always have a ton of stuff to carry around with me. Recently I decided it was time to get a new messenger bag that could better meet my needs than the leather one I was using. Now, when it comes to making purchases, I’m a little picky. So of course when it was time to look around at bags it was no different. I looked around at just about every company out there. Most of the bags were either too cheap in quality, or just plain ugly. Then I looked into the company Booq. They have bags that are exactly the style I was looking for. They are made with creative professionals in mind. Tons of pockets, and the style of the bags is classy but not boring. I chose to go with the Folee 2 messenger bag. Keep reading for my full review.
Continue reading

Nov 11 2009

Using Smooth Scroll with Page Anchors and Javascript

ilz

Using page anchors is a pretty basic web design technique. If you want to link to a certain part of a page you create an “Anchor” at that part of the page. This anchor is what you point your link at. You can link to an anchor on the current page, or to an anchor on a certain part of another page. Useful, but not all that exciting.

There is, however a quick way to make even the simple act of scrolling up and down a page more visually appealing. It’s called Smooth Scroll. Check out my demo to see this in action, and then keep reading to learn how to add Smooth Scroll to your website.

View Demo
Continue reading

Get Adobe Flash playerPlugin by wpburn.com wordpress themes