• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Color selection for backgrounds

Participant ,
Dec 16, 2020 Dec 16, 2020

Copy link to clipboard

Copied

Is there an easy way to select a custom color for a page or table background?  I'm not getting a color selector no matter what I do.  What am I missing?

Thanks!

TOPICS
Code , How to

Views

328

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Dec 16, 2020 Dec 16, 2020

The much simpler way would be to just hand code the CSS...

1. Give your table a CSS class or id
2. In the <style> tag of your page, or in your extenal CSS file, add that class or id to a CSS selector
3. Give the selector the "background-color" property
4. When you hit the : between the property and value of your CSS, DWs Code Hinting will give a Color Picker as the first option
5. Choose a color and hit Enter

Votes

Translate

Translate
Community Expert ,
Dec 16, 2020 Dec 16, 2020

Copy link to clipboard

Copied

Background colors in DW are handled with CSS.

There are multiple way to enter them (I prefer to do it right in the code), but this is how you would do it with the CSS Designer built into the UI...

1. Click the element (in this case, your table) in Design view
2. Open the CSS Designer if it's not already (Window > CSS Designer)
3. In the Sources section of the CSSD, choose <style> or your external stylesheet
4. In the Selectors section of the CSSD, click the + icon to create a new selector based on the element you have chosen
5. In the Properties section of the CSSD, click the Background tab 
6. Click on the color chip (probably a white box with a red line through it to start) next to "background-color" to bring up the Color Picker
7. Select a color from the Color Picker and hit Enter

All tables that share the Selector you created on that page (if you used <style>) or in your site (if you chose an external style sheet) will now use the background color you have chosen.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 16, 2020 Dec 16, 2020

Copy link to clipboard

Copied

The much simpler way would be to just hand code the CSS...

1. Give your table a CSS class or id
2. In the <style> tag of your page, or in your extenal CSS file, add that class or id to a CSS selector
3. Give the selector the "background-color" property
4. When you hit the : between the property and value of your CSS, DWs Code Hinting will give a Color Picker as the first option
5. Choose a color and hit Enter

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Dec 17, 2020 Dec 17, 2020

Copy link to clipboard

Copied

LATEST

Thank you so much!  That's what I used to do, and it wasn't working.  I went into Dreamweaver Preferences & discovered that Code Hints was deselected.  I turned back on, and voila, the color picker returned.  Maybe this happened in the upgrade to the 2021 version.  I appreciate your help.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines