• google plus

How to Use Adobe Illustrator to Create Website Graphics

Generating web graphics from Illustrator used to be a tedious process that involved creating web slices (pieces) of the art, then saving those slices in a web-optimized format. Adobe has made that process much simpler. A typical workflow when building a website is for a designer to create the look and feel of the site and then hand off the various graphic elements and type specifications to a programmer for assembly in an application such as Dreamweaver, where the HTML code defines the elements that make up the web page, and an associated CSS (Cascading Style Sheet) file defines the appearance of those elements. With Creative Cloud, Illustrator introduced a CSS Properties Panel that streamlines the process for both the designer and programmer.

This technique applies to Illustrator CC versions

  1. We'll start with the graphics. When graphics are exported for web, vector art is rasterized, and converted to a bitmap made up of pixels that will display properly on the screen. Where color transitions occur, such as a black shape against a white background, areas where the black slices through pixels are anti-aliased. This means that those edge pixels wills display as a shade of gray, and it can make the art look fuzzy. While this is unavoidable on curved or diagonal edges, there's no reason for this on vertical and horizontal edges. To see what the art will look like on screen, zoom in, then go to View > Pixel Preview. Note the gray vertical edges in the letter shapes below:
    Pixel Preview
  2. Use the Selection Tool and the Select All command (Ctrl+A) to select everything on the artboard, then go to the Control Panel and click the Align Selected Art to Pixel Grid button.
    Pixel Preview
  3. Now to export the assets. You can see in the screen-shot below that the layers in this file have been organized much like a web page is structured
    Layers Panel
  4. Select a graphic element on the artboard. (In this case, the Header graphic is selected.) Go to Window > CSS Properties and examine the message in the lower portion of the panel.
    CSS Properties
  5. In the Layers Panel, double-click the selected object's name and change it to an appropriate web name, such as "header-bkg", Make sure to press enter to commit the name change.
    Layers Panel
  6. Continue renaming all of the graphic elements in the Layers Panel.
    Layers Panel
  7. Deselect everything in the file. Click the CSS Properties Panel menu and select Export All.
    CSS Properties Panel
  8. Navigate to your correct folder and click Save, then review the options in the next dialog box and click OK.
    CSS Export Options
  9. Go to your desktop and take a look at the folder. You should see PNG image files have been generated for all the elements you renamed, as well as a CSS file.
    File Directory
Author: Kate Cahill

Kate Cahill is a graphic designer, writer, and creative director who has developed content for print and web. As creative director, she has produced award-winning work for agencies focused on the pharmaceutical and health and beauty aid industries. She has also served as production manager, with responsibility for the successful fulfillment of long-run print contracts. Kate has been delivering training for Webucator clients since 2010. Her enthusiasm for cutting-edge technology, combined with hands-on practical experience, brings an added benefit to her classes. Kate teaches real-world techniques and integration of Adobe software, as well as Microsoft PowerPoint, to produce a fully developed and cohesive brand identity.

About Webucator

Webucator provides instructor-led training to students throughout the US and Canada. We have trained over 90,000 students from over 16,000 organizations on technologies such as Microsoft ASP.NET, Microsoft Office, Azure, Windows, Java, Adobe, Python, SQL, JavaScript, Angular and much more. Check out our complete course catalog.