Subscribe To RSS Feed

Amber Taylor's SharpBlog

IE Is My Nemisis – Adventures in Hack-land

Posts Tagged ‘css’

Web Design “Best Practices” for Print Designers

- Friday, March 12th, 2010 -

Over the years as a designer and web monkey, I have witnessed the situation where a print designer creates a website. Not understanding the technical limitations, and other nuances of this medium the print designer usually creates a layout that has technical issues that the developer has to code up. In the case where the designer does it all, the websites mark up usually has many issues that impact, S.E.O., usability, accessibility and a host of other problems. The web is a relatively new medium to design for and always has some new way to do something, but that being said it is now time for print designers to come up to speed with the web.

I would like to note this is just a starting point and there are a lot of points to cover, some that won’t make it into this post and multiple posts will follow. If you have something to add please fell free to leave a comment.

For the Print Designer Creating the Design and HTML

  1. Don’t Export HTML from Photoshop
    I have seen this time and time again, and with the “occasional” exception of HTML emails, this is not what you should do. There are multiple issues with this method of creating web pages. First: The search engines (and site visitors) only see big pictures held in place by a convoluted set of tables. The web’s purpose is to present multiple types of content on a page like images, body text, headlines, lists, video, flash, and all kinds of media. when Photoshop creates html it sticks all of your design’s text into images which essentially hides the content from the search engines. Also by using tables to hold the page together it obstructs the mark up and makes it harder for search engines to find any text on your pages (if there is any). Some may say “We’ll just add alt tags with the content”. Alt tags are for image descriptions not body copy or any kind of content. This still hurts you page rank. if you have not learned enough to code up your own page yet, build your site in Dreamweaver’s design mode. This will get you started to bridge the gap and eventually be able to code your own html, and css.
  2. Tables are Tables, not Div’s
    Tables used as structural elements on the web page had their day when CSS was far from being implemented. However CSS is here and it empowers the designer to new levels. Where do you use tables? When the deign has a data table of course. One thing that really helps to code up pure css designs are CSS frameworks like 960 and Blueprint. They have PSD and IA templates to help design as well as HTML generators to make your life easier.
  3. I Don’t Know How To Code HTML and CSS
    It is time to learn, the future is the web, heck the present is the web! It is really not that hard once you get going, there are a million places to learn on the net. Here are a couple of them:

Tags: , ,
Posted in Design, Resources, css, html | 2 Comments »

Adding CSS Resets in Your Drupal Zen Theme

- Thursday, March 4th, 2010 -

THE QUICK ANSWER: Put your resets at the very beginning of your html-elements.css file

We at Sharpdot recently completed a large series of websites using Drupal. After months of designing comps, coding them up, adding all of the special functionality, we discovered some style issues (and it wasn’t just IE problems this time!) After quite some time of trying to figure out what was going on, we discovered it was that the Zen theme does not add reset styles to there theme!

Unfortunately there has been an argument to not add reset styles in the Drupal Zen theme. This is quite concerning, mainly because our mission as a web shop is to code our sites up to be pixel perfect to the PSD’s and comps of the project. The arguments I have seen against resets are that they want the ability to style things quickly without being hampered by having to restyle all of the typographical elements and just let the browser do the work with it’s defaults. Well this can create many problems especially between  Windows and Mac platforms and the differences in the way they render their text. Our standard operating procedure is to have resets at the beginning of all styles them restore defaults to the page elements. This approach normally works great, however we are dealing with Drupal here, and Zen’s sub-theme approach.

So where do you start? Well my first thoughts were to add a new resets.css file to the theme and include it using the .info file in the sub-theme like you are supposed to do for JavaScripts and IE hack stylesheets. Well after doing this the styles kept on being added after other elements I was trying to reset first in the stylesheet order. After more research and trial and error, I found that reset styles are supposed to go into your html-elements.css file at the beginning of the code. For some reason this is the way the Zen Drupal theme people made it work. I am sure there is some argument out there for it, but there you go it’s Drupal, where nothing is that simple, but it can do just about anything.

One thing we have built here at Sharpdot is a library of starting themes, boilerplate’s and functionality which we can use to streamline our development as well as keep a consistency on all projects. One of the next things I have on my list is to make a Drupal Zen theme boilerplate with our edits available (with CSS resets!), check back for that.

Tags: , , , ,
Posted in Drupal, css | 1 Comment »

960 grid-system Zen sub theme for Drupal 6

- Wednesday, October 7th, 2009 -

Yes! I have found a Zen sub-theme for Drupal based on the 960 grid system. I have not checked it out quite yet, but I am going to give it a whirl soon.

Here is the link:

For those of you not familiar with grids here is a link to the 960 css grid system. This one is my favorite, I have tried other like Google’s Blueprint and have even created my own. 960 looks the best from a design standpoint giving 20px gutters as the default. Designs as well as HTML build will shine with this grid added in, and make it a whole lot easier when a client wants to change something in the build/after launch phase.

960 Grid System:

Google’s Blueprint Grid System:

Tags: , , , ,
Posted in Resources | No Comments »

IE Hack – Hide Text on your Submit Buttons

- Sunday, February 1st, 2009 -

A New Way To Style Your Buttons

Recently, I designed a website and I decided to do a unique style on the search field. I added a background image to the input field and then a background image to the submit button. Everything looked great until I viewed it in Internet Destroyer (Internet Explorer). That’s when the sky fell on my head…as usual.

The Issue:

I was not able to hide the text from the button, letting the underlying image to show it’s text. Normally my preferred image replacement technique is to have text in the background image and then use a negative text-indent at a high number like this:

background-image: url('my-picture-with-text.jpg');
text-indent: -9999px;

This works fine with submit buttons on most browsers, except IE.

The fix:

Add 2 extra lines to your css file:

color: transparent;
text-transform: capitalize;

For some reason the text indent doesn’t work by itself in IE, so after adding these 2 lines it works. It is a hack within a hack though, the color:transparent property should work by itself, but it doesn’t. For some odd reason setting the text-transform to anything (in this case I chose capitalize because I don’t use it very often) makes it magically work. Anyhow if anyone finds this useful please leave a comment below.


Thanks to a comment by Chris Mahon I learned of another (better) method for hiding text on your submits. Instead of adding color: transparent; and text-transform capitalize; (the above method) add the lines below. The above method can mess up layouts where lots of absolute positioning is happening on the page. Thanks again Chris!

background-image: url('my-picture-with-text.jpg');
line-height: 999px; /* Set it higher than your image height */
overflow: hidden; /* Hide the text */
font-size: 0; /* FF2 doesn’t like the above */

Tags: , , , ,
Posted in Hacks, Tutorials | 35 Comments »