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

Typography with CSS in Dreamweaver

Rotating text with CSS transform


From:

Typography with CSS in Dreamweaver

with Joseph Lowery

Video: Rotating text with CSS transform

As CSS expands its technical proficiency, more dynamic possibilities emerge. With the CSS3 Transform features you can move page elements, scale them and as you're about to see, even rotate them. Web pages aren't just for 90 degree rectangles anymore. Let me demonstrate the type of effect that you can get by switching to the final example page, so keep your eye on these two callouts here. When I switch to the final page, they rotate counterclockwise and I'd even add a little drop shadow just to make them really pop.
Expand all | Collapse all
  1. 3m 52s
    1. Welcome
      1m 19s
    2. Using the exercise files
      2m 33s
  2. 19m 16s
    1. Working with the Property inspector's HTML tab
      2m 0s
    2. Making the most of the Property inspector's CSS tab
      4m 57s
    3. Defining and changing type with the CSS Rule Definition dialog
      6m 16s
    4. Modifying type directly in the CSS Styles panel
      6m 3s
  3. 19m 45s
    1. Understanding type measurement unit options
      2m 50s
    2. Working with pixels
      2m 34s
    3. Defining a percentage-based page with ems
      6m 51s
    4. Letting users set page type size
      7m 30s
  4. 17m 36s
    1. Getting to know the basic font categories
      1m 32s
    2. Employing web-safe fonts
      3m 20s
    3. Defining new font families
      3m 22s
    4. Exploring CSS3 typeface options
      3m 9s
    5. Setting up @font-face
      6m 13s
  5. 9m 39s
    1. Dispelling the myth of web-safe colors
      1m 13s
    2. Applying color to type
      4m 52s
    3. Incorporating semi-transparent type
      3m 34s
  6. 19m 46s
    1. Setting the font-weight
      3m 48s
    2. Mandating font case
      2m 25s
    3. Exploring font variants
      1m 50s
    4. Utilizing white space effectively
      3m 40s
    5. Changing letter and word spacing
      2m 20s
    6. Defining first-line variations
      2m 19s
    7. Inserting drop caps
      3m 24s
  7. 20m 17s
    1. Applying CSS3 text effects
      5m 26s
    2. Designing type gradients
      8m 27s
    3. Rotating text with CSS transform
      6m 24s
  8. 15m 21s
    1. Implementing advanced headings with HTML5
      3m 11s
    2. Preparing CSS3 multiple-column layout
      4m 50s
    3. Future type: Defining CSS Regions
      7m 20s
  9. 24m 51s
    1. Styling unordered lists
      6m 51s
    2. Specifying a sequence with ordered lists
      5m 14s
    3. Applying definition lists
      7m 19s
    4. Targeting list items with CSS3 nth child
      5m 27s
  10. 20s
    1. Next steps
      20s

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...
Typography with CSS in Dreamweaver
2h 30m Intermediate Jul 29, 2011

Viewers: in countries Watching now:

Dive deep into key typographic concepts and learn how to manipulate type in Dreamweaver. Author Joseph Lowery introduces Dreamweaver type tools and shows how to perform basic text modifications, establish the appropriate type unit, integrate custom web fonts, and apply drop shadows, gradients, and other effects. The course also provides in-depth tutorials on structuring text with headings, paragraphs, columns, and lists, and offers a preview of Adobe's proposed CSS Regions.

Topics include:
  • Modifying type in the CSS Styles panel
  • Understanding the different type measurement unit options
  • Allowing users to set page type size
  • Employing web-safe fonts
  • Exploring CSS 3 typeface options
  • Setting up @font-face
  • Applying color and transparency to type
  • Styling the font weight, case, and letter spacing
  • Inserting drop caps
  • Rotating text with CSS transform
  • Laying out text in multiple columns
  • Incorporating ordered and unordered lists
  • Targeting lists items with the nth-child selector
Subjects:
Typography Web Web Design
Software:
Dreamweaver
Author:
Joseph Lowery

Rotating text with CSS transform

As CSS expands its technical proficiency, more dynamic possibilities emerge. With the CSS3 Transform features you can move page elements, scale them and as you're about to see, even rotate them. Web pages aren't just for 90 degree rectangles anymore. Let me demonstrate the type of effect that you can get by switching to the final example page, so keep your eye on these two callouts here. When I switch to the final page, they rotate counterclockwise and I'd even add a little drop shadow just to make them really pop.

Alright, let's take a look and let me show you how it's done. So I do have open here the mission.htm file located in the Chapter 6 > 06_03 folder, and the first thing I want to do is identify my callouts here. So I'll put my cursor in there and I can see I have a callout with an ID of trivia and if I put my cursor in the one on the right, there is also a div with the ID of join. So I'm going to want to create a CSS rule that targets both of these callouts to get them to rotate equally.

So let me close off my Files panel. Okay, we're ready to write out our CSS rules. To do this, it's actually better for us to go right into the main.css and write out the code by hand. So I'm going to put this all the way down at the bottom and move my Split view, so that I can make sure that I'm targeting the correct callout boxes. So the first one is a div with a class of callout and an ID of trivia. So we'll put that in, div.callOut# trivia, so we can add in our second one.

And then let's take a look at what that is, and here we can see that there is also div.callOut, but it has an ID of join. Alright, our open curly brace and let's close off. So now we're going to put in the CSS transform property that will rotate these two divs, and because we're on the cutting edge of browser support for this, we'll need to put in some vendor specific properties first.

We'll start off by doing the Microsoft version, which is -ms, and you can see that the code hints are right there with us helping us. After I put in the second hyphen, I'll see all of the available properties, and I'll put in a tr for transform, and there's my transform. So after I hit Return, Dreamweaver puts in the rest of the word transform and adds a colon and now we want to type in rotate and you can see it right there. So I'll just type the first letter r and then hit Enter or Return, and within the parentheses I want to put the amount that I want to rotate.

In order for me to go counterclockwise, I'll need to put in a negative sign, and I'm just going to a slight amount. I'm just going to 5 degrees, so you enter in the value of 5, and then keyword deg, short for degrees. Okay, let's go to the end of the line and close that out with a semicolon. Next up, let's do one for Safari or WebKit. So -web, and then I hit Return and then it adds Webkit. Similarly we'll do transform.

After I've hit Return, I can type in ro for rotate and it's the same value 5deg, and close out that one. Next, let's do Opera, also transform, also rotate. So this time I'll go ahead and put in my semicolon and then move into position in between the parenthesis and add in the 5deg value. Okay, the last vendor specific one is for Mozilla, so it's a -moz, and again, transform and again rotate.

Now to make sure that we're forward compatible, we're going to go ahead and just enter in the generic version, which is just like all the others; transform:rotate(-5deg). So that should be it. If I click over into Live View, it should immediately update and there you can see my two divs rotating 5 degrees. If you wanted to take a look at a different value for them, you can go ahead and just change the WebKit version, because we are of course working with the WebKit in Live View.

So let's make it 50 degrees negative instead, and when I switch over you can see a much more radical change. That's a little bit too much for this particular client, so let's go back to 5 degrees. Now to really make them stand out, we're going to go ahead and add a drop shadow to this. So after that final transform rotate, hit Return to enter a new line. And we only need to do a couple of vendor prefixes for this, only WebKit and Mozilla. So we'll do WebKit first. -webkit-box-shadow and this is very similar to the text shadow values that you saw in the Applying CSS3 Text Shadows video, also in this chapter.

In this case, let's do an X offset of 2px, and then a Y offset of the same value, 2px. A blur radius of 5px and a dark gray color, #666. Okay, I'll close that off with a semicolon, and let's do the Mozilla version. -moz-box-shadow and then the same values, 2px, 2px, 5px and #666 for the color.

And finally, we'll put in the generic CSS3 version: box-shadow: 2px, 2px, 5px, 666. Now when I click into Live View, you'll see a pretty subtle drop shadow added, and let's get out of Split view, so you can see it fully. You can rotate pretty much any HTML element, whether it's a div containing text as we did here, or a heading, or a paragraph, all by itself.

There are currently no FAQs about Typography with CSS in Dreamweaver.

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 Typography with CSS in Dreamweaver.

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