Start learning with our library of video tutorials taught by experts. Get started

Dreamweaver CS6 Essential Training

Using background graphics


From:

Dreamweaver CS6 Essential Training

with James Williamson

Video: Using background graphics

An alternate way for you to display images on your page is through the use of CSS background images. Every element on your page has the ability to display a background color or image or even both if you prefer. This allows you to display images on the page without using an image tag in your HTML code and creates the opportunity for presentation-only images. This allows you to use images for your design without cluttering up your HTML with unnecessary image tags. In this example, we're going to apply a background image to the page header region and use a background image to replace a textual headline with the school logo.
Expand all | Collapse all
  1. 1m 4s
    1. What is Dreamweaver?
      1m 4s
  2. 5m 44s
    1. Welcome
      1m 4s
    2. Using the exercise files
      2m 17s
    3. Learning web design
      2m 23s
  3. 1h 0m
    1. Looking at the Welcome screen
      5m 9s
    2. Exploring Windows and Mac interface differences
      5m 6s
    3. Arranging panels
      8m 44s
    4. Managing workspaces
      10m 14s
    5. Exploring the Application toolbar
      6m 21s
    6. Exploring the Document toolbar
      8m 47s
    7. Working with the Property inspector
      9m 30s
    8. Using the Insert panel
      6m 30s
  4. 53m 3s
    1. Understanding basic site structure
      3m 46s
    2. Exploring file naming conventions
      2m 10s
    3. Defining a new site
      5m 23s
    4. Managing files and folders
      7m 57s
    5. Adding remote servers
      7m 4s
    6. Uploading files
      12m 46s
    7. Previewing in browsers
      9m 11s
    8. Managing multiple sites
      4m 46s
  5. 36m 41s
    1. Creating new documents
      6m 49s
    2. Setting up new document preferences
      5m 30s
    3. Setting accessibility preferences
      6m 49s
    4. Working with starter pages
      4m 32s
    5. Managing starter pages
      13m 1s
  6. 37m 23s
    1. Getting text into Dreamweaver
      8m 43s
    2. Importing Word documents
      4m 6s
    3. Adding structure to text
      7m 35s
    4. Creating lists
      4m 35s
    5. Creating definition lists
      4m 0s
    6. Using the Quick Tag Editor
      8m 24s
  7. 44m 41s
    1. Exploring the Code toolbar
      5m 41s
    2. Setting code preferences
      7m 19s
    3. Using code hints
      8m 8s
    4. Wrapping tags
      5m 7s
    5. Adding comments
      6m 29s
    6. Using snippets
      7m 32s
    7. Formatting source code
      4m 25s
  8. 1h 19m
    1. Setting CSS preferences
      9m 32s
    2. An overview of the CSS Styles panel
      9m 23s
    3. Creating a new CSS rule
      6m 42s
    4. Using the CSS Rule Definition dialog
      7m 25s
    5. Organizing styles
      7m 22s
    6. Modifying style properties
      6m 17s
    7. Controlling CSS through the Property inspector
      6m 37s
    8. Attaching external style sheets
      5m 54s
    9. Using CSS visual aids
      7m 3s
    10. Using CSS Inspect
      6m 48s
    11. Using the Code Navigator
      6m 39s
  9. 1h 11m
    1. Managing assets in Dreamweaver
      7m 30s
    2. Setting external image editing preferences
      4m 26s
    3. Placing images on the page
      10m 12s
    4. Exploring Photoshop integration
      7m 17s
    5. Modifying Smart Objects
      9m 42s
    6. Modifying image properties
      8m 4s
    7. Styling images with CSS
      6m 45s
    8. Using background graphics
      7m 28s
    9. Positioning background graphics
      10m 10s
  10. 36m 23s
    1. Link basics
      3m 17s
    2. Setting site linking preferences
      2m 19s
    3. Creating links in Dreamweaver
      9m 17s
    4. Using absolute links
      3m 43s
    5. Using named anchors
      6m 41s
    6. Creating an email link
      5m 25s
    7. Creating CSS-based rollovers
      5m 41s
  11. 44m 30s
    1. Reviewing table structure
      5m 20s
    2. Importing tabular data
      6m 46s
    3. Creating accessible tables
      6m 11s
    4. Exploring basic table styling
      9m 42s
    5. Styling alternate rows
      8m 57s
    6. Creating custom table borders
      7m 34s
  12. 59m 15s
    1. Understanding how forms work
      2m 45s
    2. Reviewing form design
      3m 44s
    3. Creating accessible forms
      5m 16s
    4. Setting form properties
      2m 39s
    5. Using the fieldset and legend tags
      2m 52s
    6. Inserting text fields
      6m 56s
    7. Inserting list menu items
      7m 54s
    8. Inserting checkboxes
      4m 14s
    9. Inserting radio button groups
      3m 52s
    10. Inserting submit buttons
      2m 25s
    11. Exploring basic form styling
      8m 2s
    12. Exploring form element styling
      8m 36s
  13. 33m 25s
    1. Adding CSS3 transitions
      8m 29s
    2. Spry overview
      2m 44s
    3. Using Spry widgets
      3m 57s
    4. Adding Spry effects
      8m 1s
    5. Using the Widget Browser
      7m 4s
    6. Extending Dreamweaver
      3m 10s
  14. 1m 2s
    1. Additional resources
      1m 2s

Watch this entire course now—plus get access to every course in the library. Each course includes high-quality videos taught by expert instructors.

Become a member
Please wait...
Dreamweaver CS6 Essential Training
9h 24m Beginner May 07, 2012

Viewers: in countries Watching now:

Discover how to build web sites, prototypes, and more in this course on Adobe Dreamweaver CS6. Author James Williamson shows designers how to take control of their site by properly naming and structuring files and folders; how to create new documents and web pages from scratch or with starter pages; and how to add content such as text, images, tables, and links. James also provides a background on the languages that power projects built in Dreamweaver—HTML and CSS—and introduces the programming features in the application, for developers who want to dig right into the code. The last chapter shows how to finesse your project with interactive content such as CSS3 transitions and Spry widgets.

Topics include:
  • Choosing and customizing a workspace
  • Defining a new site
  • Uploading files to your site
  • Creating new documents and web pages
  • Formatting source code
  • Working with CSS
  • Placing images and background graphics
  • Creating links
  • Styling a basic table
  • Creating a web form with buttons, check boxes, and list menus
  • Adding Spry effects
Subject:
Web
Software:
Dreamweaver
Author:
James Williamson

Using background graphics

An alternate way for you to display images on your page is through the use of CSS background images. Every element on your page has the ability to display a background color or image or even both if you prefer. This allows you to display images on the page without using an image tag in your HTML code and creates the opportunity for presentation-only images. This allows you to use images for your design without cluttering up your HTML with unnecessary image tags. In this example, we're going to apply a background image to the page header region and use a background image to replace a textual headline with the school logo.

So I have the index file open from the 07_08 folder and I can tell even before I hit Live View, but I'm going to go ahead and hit Live View, that some things are missing. So the image of the very starry-eyed young girl who is looking forward to her future at Roux Academy is missing and then the Roux Academy logo itself is missing as well. Now what I want to do, I'm going to turn the Live View off first. I'm going to right-click and I'm going to open up my Style Rendering toolbar and I want to toggle the display of styles off. And the reason I'm doing this is I want to show you a reason why we're using background images here.

First off, for the banner area it's really a presentational image only. There's no reason for me to pass on that information or the fact that that image is being used to any type of a screen reader or any type of a user agent that's just collecting the data. It is purely presentational and that's one of the factors that I use in deciding whether or not to use a background image. The other technique that I'm doing here is you'll notice that there is a headline on the page. At the very top, it's a Heading 1 up in the header and it says Roux Academy of Art and Design.

It's a really good idea not just for search engines, but for people indexing your pages for screen readers, that sort of thing, to have at the very top of your page a Heading 1 that describes what the page is or what's going on. In this case, it's basically just saying, hey, this is Roux Academy of Art and Design. Now I don't necessarily want to display that headline. That headline is really designed for, again, screen readers or anybody that might be indexing the site. I don't necessarily want it to display. I would rather display the logo. So that is another situation that background graphics are perfect for because we can take the text and style the text so that it does not display, but then style it so that; that particular element does display the background image that we want to put in its place.

So this still allows us to use text and have an image in its place instead of basically placing an image on the page, because we want something graphic in the place of text. So this is actually a nice little technique especially when it comes to site branding. So I'm going to toggle my CSS Styles back on and once again I'm going to click on Live View so that I can see the edits that we're going to make to our CSS kind of in a real time if you will. Well, the nice thing about the technique that we're using is it doesn't require a whole lot of effort on our part as designers. The first thing I want to do is put in the banner graphic for the home page.

And to do that, I'm going to go over to the CSS Styles panel and I'm going to scroll down until I find the page specific headers. They're right down here just below the pageHeader styles and I can see I have home, program, about. So these are all corresponding to different pages. I'm going to double-click the homeHeader to open it up and I can click on the Background category. Once I click on the Background category, I can go ahead and select my background image. So I'm just going to browse out to the 07_08 folder, I'm going to go into the images directory, and what I'm looking for is the main_back image.

So main_back, I'm going to go ahead and click OK. Now the next option I have whenever using background images is do you want this image to repeat or tile or not. The default is to have the image tile, but what happens is, is if your image is too small to fit the element, viewers are going to see multiple copies of it tiling. Now for the use of patterns, that's perfect. That's exactly what you want. But in this case, where we just want the image to show up that's not what we want. So I'm going to grab the Background-repeat pulldown menu and I'm going to choose no-repeat. We also have the option of Background-attachment.

One of the things that; that allows us to do is do what they call fixed background images. Those are the background images that are going to stay in place and as you scroll they stay static within the element. So they don't scroll with the page. So that can lead to some pretty interesting effects. Then we also have Background-positioning. So we can move the background image around within the container. That's something that we're going to take a look at in the next movie. So again I'm going to click Apply first to make sure that the image that I want is coming in and it's positioning itself where I want it. Indeed, it is. I'm just going to go ahead and click OK. So I'm going to Save All and now I'm going to focus on that logo.

Now that logo is actually going to be replacing an h1 element. So what I'm going to do is I'm going to go over to my CSS and I'm going to scroll up through my styles a little bit until I find this selector right here, pageHeader h1. So what that does for me is it targets any h1 element within the page header region. Now based upon the way the site is structured that's only going to apply to one element, because that page header only has a single h1 inside of it and that has a Roux Academy text on it. So I'm going to double-click that and before I get too deep into replacing the background image, you may be wondering, well, how are you handling hiding the text? Some people use this method.

They'll go to the Block category and they'll set Display to none. That's a bad idea. The reason that's a bad idea is that many of the screen readers out there are now being told if Display none is set on the element, don't read it. Ignore it, because it's not supposed to be there. So while it does hide the text, it has the negative effect of not allowing the text to be indexed or read by certain devices. The technique I'm using is I want to do a Text-indent of -9000 and that should be ems, I don't know why that's showing up there, but now it is. So -9000 ems, that's going to take the text and it's going end in it to the left by about, I don't know, a city block or so. That's a long way.

Suffices to say there aren't very many monitors that are large enough to actually display that. If your website gets shown on Times Square, people might see the text, but I really doubt it. So the next thing I'm going to do is I'm going to go to Background and this time I'm going to browse out, again into that images directory and what I'm looking for should be down towards the bottom. It's the ralogo.png. So this is a transparent PNG file. I'm going to go ahead and click OK on that and again, Background-repeat, I want no-repeat, I can click Apply to see it come into place, and I notice that that background image is transparent.

So you can see sort of see through it. Now I've got to be honest with you. That doesn't look too bad. I kind of like that. This is pretty cool. But in a way, it's kind of hard to read as well. So what I'm going to do is I'm also going to assign a background color to this. I'm just going to grab the color chip and I'm going to choose black right there and click Apply. One of the nice things about CSS is it allows us to apply both background color and background images to an element. In fact, one of the things that you can do now with CSS3 is apply multiple background images to elements as well. So there's some really cool stuff that you can do with that.

So I'm going to go ahead and click OK, do a Save All, and you can see with two very quick and easy changes to our file we have a background image that's coming in for our branding purposes and we have another background image that's coming in, taking a place of a headline and giving us a visual representation of the logo of the Roux Academy as well, which is really, really cool. Now we're almost done with our background images, but in our next movie I want to explore using the positioning attribute of background images to further enhance our design and to make our site more efficient.

There are currently no FAQs about Dreamweaver CS6 Essential Training.

Share a link to this course
Please wait... Please wait...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.
Upgrade now


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ.

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Upgrade now

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed Dreamweaver CS6 Essential Training.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferencesfrom the dropdown menu.

Continue to classic layout Stay on new layout
Welcome to the redesigned course page.

We’ve moved some things around, and now you can



Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked