Expression Web help

Join our community

Visit our Expression Web Forum

.style1

Why does Expression Web add news styles to my web site?

So you are seeing

.style1
.style2
.style3

This is a frequently asked question in Expression Web.

If you are working on a web page and decide that you want to have a paragraph with red text instead of say black, you might highlight the text and use the formatting tool bar colour pallet to colour the text red. (Many FP users will have done it like that) If you do it this way, Expression web creates a new style called .style1. If you then go onto change another paragraph of text and say colour it red and also change the text size, expression web creates .style2 this increment increase with each formatting change you make in this way!

There is nothing wrong with this method, except, each style is added between the <head> tags of your html document, which again, I say there is nothing wrong with that until you have say 12 .class styles embedded into each page on your site, with just a simple 15 page web site, you will spend a lot of time editing the embedded styles! Which is why we always suggest you use external style sheets.

In the Apply styles task pane, select manage styles, now where you see the .style1 just click and hold and drag it to the panel below. (which is your external style sheet) Drop the style where you want it and right click and select rename class. Call your style something meaningful like 'redtext' 'redtextlarge'

Doing it this way removes the embedded style from your html document automatically, which when you do come to update your web site means you change everything from within the external CSS file. These changes will be site wide where as embedded styles apply only to the page they are embedded in.

Expression web designer tutorial - .style1. Click here for a flash tutorial (4.40 long)

Discuss this in our expression web forum?

 

Microsoft MVP

RSS Icon  RSS

Our forum feed can be found here

Reader not listed? Click here for more options

Expression Web Help RSS
Expression Web Help. Tips and Tricks and tutorials Get our feed now