Skip to main content
Known Participant
May 18, 2019
Question

Re: Styling CSS [Branched from Problems with css-designer Panel]

  • May 18, 2019
  • 1 reply
  • 2469 views

I have the newest version of Dreamweaver. I just installed it last week and I'm having the same problems where the selector panel is greyed out but it doesn't happen all the time. I am trying to learn how to create a webpage in Bootstrap and successfully created a new CSS file along with 2 new styles. When I added a new row to my html file and then tried to add some style to it, the selector panel won't work. It's greyed out and my css file isn't showing as being my current file.

This has been happening to me ever since I installed the program so I gave up on Bootstrap for awhile and tried a different method for creating web pages.

I'm back to trying to figure this program out only it's now impossible to add any style using the selector panel.

Also, I see some people have said there was a problem with a font. I don't have a Font folder. Was one supposed to have installed when I installed the program?

This topic has been closed for replies.

1 reply

Nancy OShea
Adobe Expert
May 18, 2019

Hi sheryltoo.

I have branched this to a new discussion because the old one you posted to is from 2013 and no longer relevant.

I want you to go to Site > New Site and create  a new project folder.  For example, C:\MyTestSite\

Next, go to Files > New > Starter Templates. 

Click on Bootstrap Templates and pick any Sample Page you like.  This is mainly for demonstration purposes so it doesn't matter which one you pick.

Hit the CREATE button.

Immediately save your newly created page as index.html

Your Files Panel should look something like this.

Now go to File > New > New Document and under document type, click on CSS.

Hit the CREATE button.

Paste the following CSS code into your  CSS file.  So all total it should look like this:

@charset "utf-8";

/* CSS Document */

body {

margin: 0 auto;

width: 80%;

font-family:  Calibri, Candara, Segoe, Segoe UI, Optima, Arial, sans-serif;

font-size: calc(16px + 1vw);

line-height: calc(1.1em + 0.5vw);

}

Save your new CSS file to your css folder as custom.css.  Close custom.css

In index.html,  place your cursor underneath  the link to Bootstrap CSS.  

Go to Tools > CSS > Attach style sheet.  See screenshot for settings and hit OK.

Your index page should resemble this.  Hit Ctrl+S to save.

Now scroll down a bit and click on the first <h1> tag and hit Ctrl+E to open the Quick Edit panel.

Hit New Rule and select custom.css  Remember, Bootstrap is a read only file and we never edit Bootstrap.  From now on, every new style rule goes into the custom.css file.

Now let's create a style rule for the <h1> tag.

h1 {color: indianred

}

Hit Ctrl+S to save.

Close the Quick Edit Panel.

Switch to the custom.css tab  to confirm that your new style rule is in your css file.

Switch back to Source Code tab.

If you scroll down the document, all <h1> tags should be indianred.

Repeat this a few more times with other selectors to get a feel for it.

Hit Ctrl+S often to save work in HTML and CSS files.

Nancy O'Shea— Product User, Community Expert &amp; Moderator
Nancy OShea
Adobe Expert
May 18, 2019

Next Lesson. 

I want you to highlight the entire <h1>Lorem ipsum dolor...</h1> string of code.

And hit the CSS and CSS Designer buttons from the Properties panel.

Double-click in the add property field. 

Type background-color: #343a40 and hit Enter.

OK so you have learned 2 ways to add global CSS styles to your <h1> tags with Quick Edit and the CSS Designer panel.    But what if you don't want all <h1> tags to look the same?

The wonderful thing about Bootstrap is it has hundreds of built-in classes that can help you avoid writing new code.   You can remove the custom color and background-color styles by clicking  the trash can icon and close out the  CSS Designer panel.

With just 2 Bootstrap classes applied  to your <h1> tag, you can achieve the same results without writing any CSS code.   And this is not applied to all <h1> tags the way CSS styles are so you can pick & choose when and where to use classes.

<h1 class="text-danger bg-dark">

See below for more on Bootstrap's contextual classes.

Bootstrap 4 Colors

The key to using Bootstrap effectively is to use classes wherever possible instead of writing new CSS code.   Bootstrap already contains just about everything except the kitchen sink.  So the less new  code you write, the better.

.

Nancy O'Shea— Product User, Community Expert &amp; Moderator
sheryltooAuthor
Known Participant
May 20, 2019

Ctrl+S saves the current document only.

Use File > Save All.


I'm trying to go back through your instructions and make a change to an H3 tag but the editor shows I'd be changing it with the 4.3.1 read only css file. How do I get it to show my custom css file?