Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Writing a style header

From: Managing CSS in Dreamweaver

Video: Writing a style header

Style sheets can be incredibly complex documents, featuring thousands of lines of code. One of the first things you can do to your style sheets to assist you in giving it structure and organization is to write a good style header. Style headers can be as robust as you need them to be, and usually contain information such as copyright data, style reference information and version numbers for team members. We're going to start the organization of the Explore California styles by writing our own style header. So I'm just going to go ahead and create a brand-new CSS document. Now, I've defined the 02_02 as my root directory, but I'm just going to go ahead and create a CSS file from scratch.

Writing a style header

Style sheets can be incredibly complex documents, featuring thousands of lines of code. One of the first things you can do to your style sheets to assist you in giving it structure and organization is to write a good style header. Style headers can be as robust as you need them to be, and usually contain information such as copyright data, style reference information and version numbers for team members. We're going to start the organization of the Explore California styles by writing our own style header. So I'm just going to go ahead and create a brand-new CSS document. Now, I've defined the 02_02 as my root directory, but I'm just going to go ahead and create a CSS file from scratch.

And I'll use the starter screen to do. So create new CSS file. There we go. I'm just going to save this in the 02_02_css folder, and I'm going to save it as main.css. Here we go. So the first thing I'm going to do is just up here I'm just going to write: style sheet for Explore California. Now on the next line, I'm going to type in version 1.2, modified on 04/05/10.

Now that level of organization you don't need, but if you're working in a team environment, that's really handy, because if a team member comes in and makes a change to the site, they can change that one line and everybody knows, okay, this has been modified last week or this hasn't been modified in the month, that sort of thing. I'm going to go down and on the next line, I'm just going to type in copyright 2010 lynda.com for personal educational use only. So if you want to put some restrictions on how your style should be used if people want to repurpose them, that's a good place to put it, as well.

Now this needs to be inside of a comment. This would really mess my CSS up if I didn't have it that way. So let me go ahead and highlight all of this text and when the text is highlighted, I'm just going to come right here to my Code toolbar, click on the Apply Comment, and I'm going to apply the second comment here, which is the /**/Comment. That is a multiline comment in CSS, and I want to choose that. Now you can see that it's grayed, and you can put those comment indicators on either side. You can leave them inline. It's really up to your personal preferences. You can put them wherever you would like. And I'm going to go ahead and save that file again, and there we go. There is our style header.

Now these things can be as robust as you need them to be. Remember, they're entirely optional. You don't even really have to have them. They are a great way to communicate with yourself. If you're like me and you forget why you are doing a certain thing, they are a great way to sort of add a little note to yourself, as well as any team members, what's going on with your styles. And they are also a great way to pass on information to people who might be visiting your site, opening your styles to take a look at them. If you do plan on using them, keep in mind that they should convey information inside of them very clearly and very concisely.

Show transcript

This video is part of

Image for Managing CSS in Dreamweaver
Managing CSS in Dreamweaver

41 video lessons · 20802 viewers

James Williamson
Author

 
Expand all | Collapse all
  1. 4m 12s
    1. Welcome
      1m 10s
    2. Who is this course for?
      1m 5s
    3. Using the exercise files
      1m 57s
  2. 1h 21m
    1. Controlling CSS in Dreamweaver
      2m 34s
    2. Style formatting options
      4m 59s
    3. Controlling shorthand notation
      6m 9s
    4. Building a style-focused workspace
      6m 10s
    5. CSS Styles panel overview
      8m 18s
    6. The Properties Inspector
      6m 39s
    7. Creating styles visually
      11m 32s
    8. Hand-coding styles
      8m 15s
    9. Code hinting and code completion
      7m 11s
    10. Modifying styles visually
      5m 24s
    11. Using the Code Navigator
      4m 47s
    12. Using CSS Inspect
      9m 52s
  3. 1h 14m
    1. Structuring style sheets
      4m 52s
    2. Writing a style header
      2m 40s
    3. Building a color guide
      6m 5s
    4. Writing a style sheet table of contents
      8m 46s
    5. Creating sections for styles
      9m 10s
    6. Using the CSS Styles panel to organize styles
      10m 29s
    7. Resolving conflicts
      7m 3s
    8. Organizing style properties
      9m 33s
    9. Writing a CSS reset
      5m 20s
    10. Writing global classes
      3m 57s
    11. Creating a style guide
      6m 6s
  4. 1h 7m
    1. Preparing custom starter pages
      11m 32s
    2. Building custom starter pages
      10m 8s
    3. Working with code snippets
      9m 54s
    4. Writing snippets
      11m 30s
    5. Importing snippets
      6m 3s
    6. Understanding snippets libraries
      8m 11s
    7. Building a CSS framework using snippets libraries
      10m 36s
  5. 52m 15s
    1. Writing a print style sheet
      10m 3s
    2. Creating print-specific styles
      10m 45s
    3. Preparing modular styles
      4m 33s
    4. Creating modular style sheets
      7m 9s
    5. Checking browser compatibility
      6m 25s
    6. Using conditional comments for Internet Explorer
      6m 58s
    7. Optimizing CSS with Dreamweaver
      6m 22s
  6. 38s
    1. Goodbye
      38s

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

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.


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.

Join now "Already a member? Log in

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 Managing 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
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.

Are you sure you want to delete this note?

No

Your file was successfully uploaded.

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
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.