Highlighted

Style not working

New Here ,
Oct 15, 2020

Copy link to clipboard

Copied

Jet5CDF_0-1602745432391.png

So I'm new to dreamweaver and suddenly my style stopped working. Did i turn something on or off? it works in the body part but when i try to write it in a h or p it just comes up as text or am i just being dumb

TOPICS
Code

Views

29

Likes

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

Style not working

New Here ,
Oct 15, 2020

Copy link to clipboard

Copied

Jet5CDF_0-1602745432391.png

So I'm new to dreamweaver and suddenly my style stopped working. Did i turn something on or off? it works in the body part but when i try to write it in a h or p it just comes up as text or am i just being dumb

TOPICS
Code

Views

30

Likes

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
Oct 15, 2020 0
LEGEND ,
Oct 15, 2020

Copy link to clipboard

Copied

You have to write inline css styling like below:

 

<p style="color: red;">Red Text</p>

 

or

 

<h1 style="color: blue;">Blue Text</h1>

 

BUT I would advise against using inline css styles. You should either put the styles in a linked css stylesheet or in the <head></head> section of your pages code, inbetween <style></style> tags:

 

<style>

p {

color: red;

}

h1 {

color: blue;

}

</style>

 

Better still, rather than assigning a generic color to ALL p or h1 tags on your page, you should assign them to specific containers:

 

<div class="product">

<h2>Product 1</h2>

<p>Product description</p>

</div>

 

<style>

.product h2 {

color: red;

}

.product p {

color: blue;

}

</style>

 

Hope that helps. Post back if you have any questions or are trying to do something else.

Likes

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
Reply
Loading...
Oct 15, 2020 0
Adobe Community Professional ,
Oct 15, 2020

Copy link to clipboard

Copied

Take some time to run through these tutorials and make sure you understand the concepts presenteed by using the "Try It Yourself" buttons for each step...

https://www.w3schools.com/html/

https://www.w3schools.com/css/ 

 

...there are a couple of errors within your code that will become very obvious to you after you go through the tutorials. It will also make the code osgood posted make a lot more sense to you.

Likes

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
Reply
Loading...
Oct 15, 2020 0