🚨 Heads up! This course is no longer supported. We recommend checking out our Webflow Essentials course.

How to create, edit & style your first CSS style sheet in using Dreamweaver.

Course contents

Questions

0
You are not following this thread

Course info

38 lessons / 4 hours

Overview

Hi there, my name is Dan and together we’re going to build a portfolio website using Adobe Dreamweaver.

We’ll use Dreamweaver's handy templating tools to make updates to our site super easy. We’ll create our very own mobile 'burger menu' from scratch learning some basic Javascript & jQuery.

I am an Adobe Certified Instructor and better yet I work closely with Adobe themselves to develop their own online help videos. I am also a Dreamweaver speaker at the huge Adobe Max conference in Las Vegas 2017. I’m even inside your version of Dreamweaver right now... go on try it... open Dreamweaver > Go to Help > quick tutorial - I’m right there!This course is for beginners. You do not need any previous knowledge in Dreamweaver or web design experience. We will use Dreamweaver ‘split’ view so we can use all the good visual tools as well as doing some simple amends down here in the code as well.

In this series we will take this static design from either Illustrator or Photoshop and together, step by step, build everything in HTML, CSS & Javascript. We will make our own navigation. We will make adjustments so that everything looks great on different mobile devices.We will work with beautiful fonts & colours & even add Google Analytics to our site to get amazing information about exactly who visits your site.
 Now web design can sometimes be tricky so I am here to help - just message me if you get stuck. There are also exercise files so you can follow along. I even save a full copy of the website at the end of every video so that you can check yours again mine if you’re is not working quite right.

Check out this link here www.byolisawesome.com, for the site we build together. Let's get excited about finally being able to build a website like a professional web designer. See you in class.


What are the requirements?

  • You will need a copy of Adobe Dreamweaver CC 2017 or above. A free trial can be downloaded from Adobe.
  • No previous web design skills are needed.
  • No previous Dreamweaver skills are needed.

What am I going to get from this course?

  • 39 lectures 3+ hours of well-structured content!
  • You'll learn to build a responsive portfolio website from scratch.
  • Learn how to take a design from Illustrator & create a professional website.
  • How to use templates in Dreamweaver.
  • Create mobile, tablet & desktop versions of the website.
  • Build our own custom responsive navigation with burger menu.
  • Introduction to Javascript & jQuery.
  • How to publish your website to the internet.
  • Ways to preview your designs straight to your mobile device.
  • How to get the most from your portfolio Images.
  • How to use beautiful web fonts in your designs.
  • You will get the finished files so you never fall behind.
  • Downloadable exercise files & cheat sheet.
  • Forum support from me and the rest of the BYOL crew.
  • All the techniques used by professional website designers.

What is the target audience?

  • YES: This course is for beginners. Aimed at people new to the world of web design. No previous Dreamweaver experience is necessary.
  • NO: This course is NOT suited to people experienced in using HTML & CSS.

Course duration approx 4 hours + your study.
Daniel Walter Scott

Daniel Walter Scott

Founder of Bring Your Own Laptop & Chief Instructor

I discovered the world of design as an art student when I stumbled upon a lab full of green & blue iMac G3’s. My initial curiosity around using the computer to create ‘art’ developed into a full-blown passion, eventually leading me to become a digital designer and founder of Bring Your Own Laptop.

Sharing and teaching are a huge part of who I am. As a certified Adobe instructor, I've had the honor of winning multiple Adobe teaching awards at their annual MAX conference. I see Bring Your Own Laptop as the supportive community I wished for when I was first starting out and intimidated by design. Through teaching, I hope to bring others along for the ride and empower my students to bring their stories, labors of love, and art into the world.

True to my Kiwi roots, I've lived in many places, and currently, I reside in Ireland with my wife and kids.

Downloads & Exercise files

Transcript

Hi there, in this tutorial we’re going to create our very first css sheet. You can see in there. We're actually going to Style our Header. Don't worry, it's not going to always stay this awful green. And we're going to add some Padding and some awesome css-ness. So get ready to make your very first css sheet.

So far we've created a HTML page. It's 'index.html'. Got a bit of html going, not much. Now we need to go and Style this Header. And we Style it using css, with cascading Style sheets. To create a Style sheet, we go to our 'CSS Designer' panel - I'll close down the DOM from the last tutorial - and in here if you can't see your CSS Designer, there he is there. If yours doesn't look like mine, you've got to drag it out. And what we want to do is, under 'Sources', we're going to click the '+' button. And we're going to go to 'Create New CSS File'. You can give it any name you like, but everyone calls it 'styles.css'. I'm going to click 'OK'. And a couple of things happen. First of all, on my 'Desktop', in my 'Dan's Awesome Portfolio', that got created. It's just a separate Style sheet. There's the index.html file made, and there's this other guy. There's nothing in there. It's just where we put all our Styles, and keep them separated.

So back into Dreamweaver. The other thing you'll notice is that my html updated a little bit. Can you see, Dreamweaver has linked the two. So that's how that index file knows that styles.css exists. Because at the moment they're separate files and in here, in the Head, Dreamweaver says, "Link to the Style sheet please" and that's what it does. Also handy thing for Dreamweaver is this thing called the Related Documents Bar. You can see at the top here, it links to it because this is a separate sheet, watch this, I can click on it. And there it is there, there's that styles.css, this down the bottom. It's showing you at the top, my Index, but down the bottom it's showing you this separate sheet. That's what Source Code is. They should just call that html. So think, when you see Source Code, think html. And this here is another document. Back to the html.

So that is how you create and link a Style sheet, super easy. Now we're going to go and Style our Header. To do it, you got to make sure that-- you might be set to 'Current'. Current is awesome when you know what you're doing. We'll do it a little bit later in the course but stick to 'All'; 'All' makes life easier. So what we're going to do is, we're going to click in here. It doesn't really matter where you click actually, but we're going to create our very first Style. So we kind of work through these procedures here, we work through all these boxes. So first of all we say, "I want the Style to go inside styles.css" It's really uncommon to have more than one Style sheet. Occasionally we can to have two if you're using like a Template, like Bootstrap. But we're just going to have one css for this whole document.

Media Queries, we're going to get into later on when we look at mobiles and tablets. You can skip that for now, we're going to stick it inside and call Global. And we're going to create this thing called Selector. We're going to be doing lots of Selectors. And this selects the thing we want to Style, so I'm going to hit '+'. And in here, it's defaulted to whatever I've selected. But all I really want is, I'm going to-- I don't want the Image that's inside the a-tag, that's inside the Header. I just want to Style my Header. You can just type it in. It's up to you whether you get it by default or whether you just want to type in Header. So I'm styling this thing here called Header. So, what do I want to do to this Header? So, I'm going to click on Header over here. And what I would like to do is first of all, just change the background color, nice simple one. Got this really big long line of things that we can style in css.

What Dreamweaver does is, along the top here, it puts it into little groups. This one here is Layout, you can see it there. Then there's 'Type', Type starts there. So what I do is I just click on these to jump through that list. You can slide up and down, totally up to you. I'm going to jump to this one, called Background, because it is background color, we're going to pick big naff green. To pick colors, you just slide this thing up and down until you get the Hue right. And then click, hold, and drag the little circle around till you find the color you like. There is the dark and light version. Or just move it around in here, and that's how transparent it is. We're going to pick a big naff green for the moment I'm going to change it in a minute. Then I click 'return' on my keyboard. Now, we have a Header that has some css. And that my friends is all css is. It's a separate sheet, that you add some Styles to. You just make sure you use the right naming.

We've matched the word Header here in my html with the Style here in my Selectors. And yes, it's gone and colored it. Now let's have a look at our css sheet. Let's go to styles.css, there he is. That's what a css sheet looks like. In terms of coding for the internet, css sheets are the most simple to look at. There's the word Header, that matches completely the word and the syntax here in my html. And, it says background-color: # equals, and that's the color. If we hover above it, that's the color there. And it always ends in a semi-colon. It's all wrapped up in these curly braces. So those are the syntax things. So you can type css, perfectly fine. A lot of web designers do. But what we're doing in Dreamweaver is we're using this CSS Designer panel to do the heavy lifting. This character set at the top here just says I'm using an English keyboard.

Let's jump back to Source Code. And what I want to do is put a little space at the top and left of this Logo so that it's not just jammed up against the side. I'll make sure I'm working on my styles.css on the Global version, I'm on my Header. You can see here, we got Padding and Margin. Padding and Margin is a good one to explain now. Padding is the inside of this box. If I click, hold, and drag that to the right, it gives me Padding. So it moves a little bit down, at the moment, 36 pixels. I'll undo that. Margin does a similar thing, it pushes down from the top but it pushes from the outside of the box. If I didn't have a colored box in here, if it wasn't green, you wouldn't notice the difference, the Logo still moves down that certain amount of pixels. So sometimes it doesn't really matter whether you're using Margins or Padding. Sometimes, obviously in our case it does, because I want the Padding inside the green box.

Now where do I get my measurements from? Now, if you're working with a designer they should have sent you some specs. How detailed are these specs? It's probably not going to have how far the Logo was from the top. But you will get a visual. And we can measure it. Now, if you are the designer of both the visual, and doing the Coding side, it's going to be even easier because you're going to be able to just jump out to your file. Now it doesn't really matter whether you've designed this in Photoshop or Adobe Illustrator. They both have very good web design tools. I've got courses on both of those. If you want to do the design stage, go check out those. In this case, we're designing something we designed in another video tutorial series in Illustrator.

We're going to open up the finished design from that. It's in your 'Exercise Files', open up 'Illustrator Layout' and open up this one called 'Portfolio Website.ai'. So where have we ended up? Here it is, this is my design. Now I want to start pulling measurements from it. So I'm going to zoom in, have a little look at this guy. I want the height and the sides here. Now the official way is, there is a Ruler tool. So Eyedropper tool, Measurement tool. And you click once there, and click once there. And it gives you the width, so it's 19 from the side. And you can click once here, click once there. You can see, it's 10, the height, so about 20 and 10, it's never exact. So just stick the whole pixels, they're tiny measurements anyway so just stick the whole pixels. And so that's the official way.

What I tend to do is grab the Rectangle tool, and use this. Why? Because it snaps, which is really cool. Can you see, it just kind of joins up and really wants to snap to the edge of things. If yours doesn't, go to 'View', make sure 'Smart Guides' is turned on. That one there, that will stick to the edges. The other nice thing is, watch this I can click here, and it snaps right to the corner. You can see there, there's my height. You can see, this is kind of intersecting so I know my height and width in one go. You can see, it's 19 from the side, and it's a height of 10 pixels. So that's what I'm going to use to translate into Dreamweaver.

So when I'm building a site, and I've got my design here in either Photoshop or Illustrator, it doesn't really matter. I pull my measurements from-- I'm going back and forth between these two programs, so Dreamweaver and Illustrator, in our case. So what I want to do is, I'd like to have a height of 10. And I would like this left hand side of 19. And you can see, it pushed it, 10 down, 19 across. And what I'll do is, I'll do on the right hand side as well because we'll have some navigation on it eventually. The same for the bottom, I want 10 at the bottom just so that there's a gap that matches the top.

All right my friends, so that is how to create a css sheet, styles.css and we've done some basic styling using our CSS Designer panel. If you're using a version of Dreamweaver like CS6 or earlier, you're not going to have the Designer panel. That sucks because this course is all based around the CSS Designer panel, and it's awesome. So you might have to look at upgrading. Can you get on in this course without it? Probably not. You might want to check out my Coding version of Dreamweaver course. So go check that out.

All right, let's get into the next tutorial where we look at editing css rules.

Written Guide

How do I create and link a CSS file in Dreamweaver?

Open the CSS Designer panel, click the plus button under Sources, and choose Create New CSS File. Name it styles.css and confirm. Dreamweaver creates the separate style sheet and links it to your HTML document, so you can start adding selectors, background colours and spacing through the CSS Designer panel.

How to Create Your First CSS Style Sheet in Dreamweaver


Key Takeaways

  • Create an external CSS file and understand how it connects to your HTML.

  • Use the CSS Designer panel to target and style a header.

  • Understand the difference between padding and margin.

  • Measure spacing in an Illustrator design and apply it in Dreamweaver.

  • Recognise the basic syntax Dreamweaver generates for you.

An HTML page gives us the structure. CSS, short for Cascading Style Sheets, gives us control over how that structure looks. We’ll start with an existing index.html page containing a header and a logo, then give that header a background colour and a little breathing room.

The background will be a rather awful bright green for now. Don’t worry, it isn’t a permanent design decision. It simply makes the header’s boundaries easy to see while we work out the spacing.


1. Create a Separate CSS File

With index.html open in Dreamweaver, find the CSS Designer panel. If it isn’t visible, open it from the Window menu. You can also drag the panel wider if its controls feel a bit cramped.

  1. Find the Sources section in CSS Designer.

  2. Click the plus button.

  3. Choose Create New CSS File.

  4. Enter styles.css as the filename.

  5. Click OK.

Dreamweaver interface showing the Create a New CSS File modal dialog with File / URL set to styles and the Link radio button selected over a blank Split view canvas.

Create a separate style sheet to hold the page’s visual rules.

You can choose another filename, but styles.css is a straightforward, conventional choice.

Two things happen when you confirm. First, Dreamweaver creates a CSS file in your project folder, alongside the existing HTML file in this example. The new style sheet has no styling rules yet. It is simply where we’ll put them.

Second, Dreamweaver updates the HTML by adding a style sheet link inside the document’s head. That link is important: the HTML and CSS are separate files, and the HTML needs to know which style sheet to use.


Switch between HTML and CSS with the related documents bar

Near the top of the document window, the related documents bar gives you access to the linked files. Click styles.css to inspect the style sheet without leaving the page you’re working on.

In Split view, the page preview can remain above while the code area below changes to show the CSS. Click Source Code to return to the HTML for index.html. For this workflow, think of Source Code as your HTML and styles.css as the separate styling document.


2. Create a Selector for the Header

Before adding a style, set CSS Designer to All rather than Current. Current is useful once you’re comfortable with the panel, but All makes the first few rules easier to manage.

Work through the panel in this order:

  1. Under Sources, select styles.css.

  2. Under @Media, select GLOBAL.

  3. Under Selectors, click the plus button.

  4. Enter header as the selector.

We’re keeping all the rules for this exercise in one style sheet. Leave media queries alone for now. Those become useful when you start creating different layouts for mobiles and tablets.

A selector identifies the thing you want to style. Here, the selector header targets the HTML header element.

There is one little trap worth catching early. Dreamweaver may suggest a selector based on whatever is selected in the page. If you clicked the logo, it might suggest a longer selector targeting the image inside a link inside the header. That isn’t what we want. Replace the suggestion with just header.

Dreamweaver workspace focusing on the CSS Designer panel's Selectors section, where the user is typing header into the new selector input field.

Use header on its own to style the container rather than the logo inside it.

3. Give the Header a Background Colour

Select your new header rule. The Properties area contains a long list of CSS settings, grouped into categories such as Layout, Text and Background.

You can scroll through the list, but the category icons at the top are handy shortcuts. Click Background, then find background-color.

  1. Open the background colour picker.

  2. Move the hue control to choose a colour family.

  3. Drag the selection circle within the colour area to adjust the shade.

  4. Leave the colour opaque for this exercise.

  5. Press Return to apply it.

I’m choosing a big, bright green. It’s not subtle, but that is rather the point: we can now see exactly where the header starts and ends.

This is the basic connection behind the styling. The selector identifies the header, and the background colour property changes its appearance. Dreamweaver’s CSS Designer panel writes the rule into styles.css for us.


4. Understand the CSS Dreamweaver Generates

Click styles.css in the related documents bar. You’ll now see the header rule in the code area.

Dreamweaver Split view displaying a bright neon-green header bar reading Daniel Walter Scott Portfolio.

The visual change comes from a small rule in the linked CSS file.

The structure is quite approachable:

  • Selector: header identifies the element being styled.

  • Curly braces: the opening and closing braces contain the declarations for that selector.

  • Property: background-color names the setting being changed.

  • Colon: separates the property from its value.

  • Value: the chosen colour appears as a hexadecimal value beginning with #.

  • Semicolon: ends the declaration.

Hovering over the colour value in Dreamweaver can display a colour swatch, which is a handy way to check what that value represents.

You can type CSS directly, and plenty of web designers do. We’re using CSS Designer to do the heavy lifting, but it’s still useful to recognise what it produces.

You may also see a character encoding declaration at the top of the file. That describes the text encoding used by the style sheet, not the header’s appearance.


5. Understand Padding Versus Margin

At the moment, the logo is jammed up against the header’s edges. We need some space, and CSS Designer gives us two related controls: padding and margin.

Make sure you’re still working on styles.css, under GLOBAL, with the header selector selected. Then return to the Layout properties.


Padding adds space inside the box

Padding creates space between the header’s edge and its content. Try dragging the top padding value to the right. The logo moves down, but the extra space remains inside the green background.

Dreamweaver Split view showing the green header bar with increased top padding, alongside the CSS Designer Layout panel on the right.

Padding gives the logo breathing room inside the coloured header.

Margin adds space outside the box

Undo that test and try increasing the top margin instead. This creates space outside the header, moving the green box down rather than adding green space above its contents.

Without a coloured background, the results can look similar because the logo moves down in either case. The background makes the distinction clear.

For this header, use padding. We want the logo inset within the coloured container, not the container pushed away from the content around it. Undo the temporary margin change before applying the final measurements.


6. Measure the Spacing in Illustrator

Where do the numbers come from? Ideally, from the design rather than a guess.

If you’re working with a designer, they may supply detailed measurements. If they’ve supplied a visual layout instead, you can measure the gaps yourself. The same back-and-forth approach works when you’ve designed the page yourself in Illustrator or Photoshop.

For this example, open the Illustrator layout file, Portfolio Website.ai, and zoom in on the header and logo.


Use the Measure tool

Illustrator’s Measure tool is grouped with the Eyedropper tool. Measure from the header’s left edge to the logo, then from the header’s top edge to the logo.

The example gives us approximately 19 pixels from the left and 10 pixels from the top. Keep these small spacing measurements to whole pixels for this exercise.


Use a temporary rectangle for a quick measurement

My preferred approach is to grab the Rectangle tool and draw a temporary rectangle across the gap. It’s quick because the rectangle can snap to the edges you’re measuring.

If snapping isn’t helping, check that View > Smart Guides is enabled. Draw from the header’s corner towards the logo’s corner, then inspect the rectangle’s width and height. This lets you check both dimensions in one go.

Illustrator interface zoomed on a dark website header mockup, showing a small white measurement rectangle selected above the DANIEL WALTER SCOTT logo.

A temporary rectangle helps measure the horizontal and vertical gaps around the logo.

The measurements confirm the spacing we need: 19 pixels across and 10 pixels down.


7. Apply the Final Header Padding

Return to Dreamweaver and select the same global header rule. Set the padding values to:

  • Top: 10px

  • Right: 19px

  • Bottom: 10px

  • Left: 19px

The top and left values position the logo according to the design. Matching the bottom padding gives it an even gap vertically. Matching the right padding also prepares the header for navigation on that side later.

That’s our first CSS style sheet working: a separate file linked to the HTML, a selector targeting the header, a background colour, and spacing taken from the design. The green can change later. The important part is that the structure and styling are now connected properly.


A Note About Older Dreamweaver Versions

This workflow depends on the CSS Designer panel. Dreamweaver CS6 and earlier do not have that panel, so the same interface steps won’t be available.

The CSS concepts still apply, but you’ll need either a version with CSS Designer or a code-based workflow to create and edit the rules directly.


Key Terms

CSS

Cascading Style Sheets describes how HTML elements should look, including their colours and spacing.

External style sheet

A separate CSS file linked to an HTML document. Here, styles.css holds the styling for index.html.

Selector

The part of a CSS rule that identifies which elements to style. The header selector targets header elements.

Declaration

A property and value inside a CSS rule, such as a background colour setting.

Padding

Space inside an element’s box, between its content and its edge.

Margin

Space outside an element’s box.

Global rules

Styles created outside a specific media query. We use these for the basic header styling.


FAQs

Does my CSS file have to be called styles.css?

No. You can choose another filename. What matters is that the HTML links to the correct file; styles.css is simply a clear, conventional name.

Why is Dreamweaver suggesting a selector longer than header?

Dreamweaver can build a suggestion from the selected element and its surrounding HTML. If you selected the logo, the suggestion may target that image rather than the whole header. Enter header manually for this exercise.

Should I use padding or margin around the logo?

Use padding on the header when you want space inside its background, around the logo. Margin on the header adds space outside the coloured box instead.

Do I need to write CSS by hand?

Not for this workflow. CSS Designer generates the rules from the settings you choose. You can inspect those rules in styles.css to learn how the visual controls translate into CSS.

Daniel Walter Scott

Written by Daniel Walter Scott — Founder of Bring Your Own Laptop & Chief Instructor

  • Powered by Marvin
  • Terms of use
  • Privacy policy
  • Cookie policy
  • © Bring your Own Laptop Ltd 2026