<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Anna Ullrich : CSS</title><link>http://blogs.msdn.com/anna/archive/tags/CSS/default.aspx</link><description>Tags: CSS</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Give up CSS layouts and use tables</title><link>http://blogs.msdn.com/anna/archive/2009/04/22/give-up-css-layouts-and-use-tables.aspx</link><pubDate>Thu, 23 Apr 2009 05:39:30 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9563829</guid><dc:creator>Anna</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/anna/comments/9563829.aspx</comments><wfw:commentRss>http://blogs.msdn.com/anna/commentrss.aspx?PostID=9563829</wfw:commentRss><wfw:comment>http://blogs.msdn.com/anna/rsscomments.aspx?PostID=9563829</wfw:comment><description>&lt;p&gt;The clock is ticking ….&lt;/p&gt;  &lt;p&gt;&lt;a title="http://giveupandusetables.com/" href="http://giveupandusetables.com/"&gt;http://giveupandusetables.com/&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;( Thanks to &lt;a href="http://www.jankoatwarpspeed.com/" target="_blank"&gt;Janko&lt;/a&gt; Jovanovic for making me aware of this site )&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9563829" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/anna/archive/tags/CSS/default.aspx">CSS</category><category domain="http://blogs.msdn.com/anna/archive/tags/_3F0021003F002100_/default.aspx">?!?!</category><category domain="http://blogs.msdn.com/anna/archive/tags/design/default.aspx">design</category><category domain="http://blogs.msdn.com/anna/archive/tags/development/default.aspx">development</category><category domain="http://blogs.msdn.com/anna/archive/tags/humor/default.aspx">humor</category></item><item><title>HTML, CSS, and JavaScript reference at your fingertips: FireScope add-on for Firefox</title><link>http://blogs.msdn.com/anna/archive/2009/01/27/html-css-and-javascript-reference-at-your-fingertips-firescope-add-on-for-firefox.aspx</link><pubDate>Tue, 27 Jan 2009 22:27:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9378221</guid><dc:creator>Anna</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/anna/comments/9378221.aspx</comments><wfw:commentRss>http://blogs.msdn.com/anna/commentrss.aspx?PostID=9378221</wfw:commentRss><wfw:comment>http://blogs.msdn.com/anna/rsscomments.aspx?PostID=9378221</wfw:comment><description>&lt;P&gt;&lt;A href="http://www.sitepoint.com/" target=_blank mce_href="http://www.sitepoint.com"&gt;SitePoint&lt;/A&gt; has released the “first phase” of &lt;A href="http://reference.sitepoint.com/javascript" target=_blank mce_href="http://reference.sitepoint.com/javascript"&gt;their JavaScript reference&lt;/A&gt;, and they’ve also completely redesigned &lt;A href="http://reference.sitepoint.com/" target=_blank mce_href="http://reference.sitepoint.com/"&gt;their Reference Site&lt;/A&gt; for improved usability. To coincide with the redesign, they’ve released a handy Firefox add-on called &lt;A href="http://tools.sitepoint.com/firescope" target=_blank mce_href="http://tools.sitepoint.com/firescope"&gt;FireScope&lt;/A&gt; to integrate their HTML and CSS reference (sadly not their new JavaScript reference) into &lt;A href="http://getfirebug.com/" target=_blank mce_href="http://getfirebug.com/"&gt;Firebug&lt;/A&gt; and your Firefox browser:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://tools.sitepoint.com/firescope" target=_blank&gt;&lt;IMG title="FireScope logo" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; DISPLAY: inline; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=84 alt="FireScope logo" src="http://blogs.msdn.com/blogfiles/anna/WindowsLiveWriter/HTMLCSSandJavaScriptreferenceatyourfinge_A129/image_3.png" width=244 border=0 mce_src="http://blogs.msdn.com/blogfiles/anna/WindowsLiveWriter/HTMLCSSandJavaScriptreferenceatyourfinge_A129/image_3.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&lt;A href="http://tools.sitepoint.com/firescope" mce_href="http://tools.sitepoint.com/firescope"&gt;http://tools.sitepoint.com/firescope&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Here’s a screenshot of the new Reference panel in Firebug:&lt;/P&gt;
&lt;P&gt;&lt;IMG title="FireScope reference panel in Firebug in Firefox" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; DISPLAY: inline; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=237 alt="FireScope reference panel in Firebug in Firefox" src="http://blogs.msdn.com/blogfiles/anna/WindowsLiveWriter/HTMLCSSandJavaScriptreferenceatyourfinge_A129/image_6.png" width=554 border=0 mce_src="http://blogs.msdn.com/blogfiles/anna/WindowsLiveWriter/HTMLCSSandJavaScriptreferenceatyourfinge_A129/image_6.png"&gt; &lt;/P&gt;
&lt;P&gt;Read the list of features on the SitePoint website to learn more about the tool:&lt;/P&gt;
&lt;P&gt;&lt;A title=http://tools.sitepoint.com/firescope/ href="http://tools.sitepoint.com/firescope/" mce_href="http://tools.sitepoint.com/firescope/"&gt;http://tools.sitepoint.com/firescope/&lt;/A&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9378221" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/anna/archive/tags/CSS/default.aspx">CSS</category><category domain="http://blogs.msdn.com/anna/archive/tags/add-ins/default.aspx">add-ins</category><category domain="http://blogs.msdn.com/anna/archive/tags/browsers/default.aspx">browsers</category><category domain="http://blogs.msdn.com/anna/archive/tags/Firefox/default.aspx">Firefox</category><category domain="http://blogs.msdn.com/anna/archive/tags/JavaScript/default.aspx">JavaScript</category><category domain="http://blogs.msdn.com/anna/archive/tags/HTML/default.aspx">HTML</category></item><item><title>Better error messages “are recommended”</title><link>http://blogs.msdn.com/anna/archive/2009/01/02/better-error-messages-are-recommended.aspx</link><pubDate>Sat, 03 Jan 2009 03:18:18 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9269886</guid><dc:creator>Anna</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/anna/comments/9269886.aspx</comments><wfw:commentRss>http://blogs.msdn.com/anna/commentrss.aspx?PostID=9269886</wfw:commentRss><wfw:comment>http://blogs.msdn.com/anna/rsscomments.aspx?PostID=9269886</wfw:comment><description>&lt;p&gt;A code error tip in Expression Web:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;“The World-Wide-Web Consortium now regards the attribute ‘[&lt;em&gt;html attribute name&lt;/em&gt;]’ as outdated. Newer constructs are recommended.”&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Newer constructs are recommended? Who talks like that?! With all due respect, some developers talk like that, that’s who. Technical writers are typically responsible for grooming the text that appears in the user interface of a software program, but sometimes there’s just not enough time to do a quality check of UI text and so we may end up with error messages like that one.&lt;/p&gt;  &lt;p&gt;That quoted text appears in a floating tip in the Code view in Expression Web when your web page contains a particular HTML Incompatibility error. When you encounter that tooltip, all you need to know is that you should be using CSS instead of the HTML attribute that Expression Web is flagging. I have never encountered that tooltip in any other scenario and offhand can’t think of another scenario where this tip would be appropriate. So just remember, when you see the tooltip “Newer constructs are recommended”, think CSS!&lt;/p&gt;  &lt;p&gt;Perhaps we should change the tooltip to:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;“This attribute has been &lt;a href="http://www.w3.org/conform.html#deprecated"&gt;deprecated&lt;/a&gt; in favor of style sheets...”&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;That’s actually a quote from the W3C’s website, in their entry for the bgcolor attribute: &lt;a title="http://www.w3.org/TR/html401/present/graphics.html#adef-bgcolor" href="http://www.w3.org/TR/html401/present/graphics.html#adef-bgcolor"&gt;http://www.w3.org/TR/html401/present/graphics.html#adef-bgcolor&lt;/a&gt; .&lt;/p&gt;  &lt;h2&gt;HTML Incompatibility errors&lt;/h2&gt;  &lt;p&gt;So what’s an HTML Incompatibility error? It’s code in your page that doesn’t comply with the guidelines set by the DOCTYPE of your page. (For more info about DOCTYPES, check out this recent blog post by Michelle Rosenthal: &lt;a title="http://blogs.msdn.com/xweb/archive/2008/12/17/the-quirkiness-of-quirks-mode.aspx" href="http://blogs.msdn.com/xweb/archive/2008/12/17/the-quirkiness-of-quirks-mode.aspx"&gt;http://blogs.msdn.com/xweb/archive/2008/12/17/the-quirkiness-of-quirks-mode.aspx&lt;/a&gt; .)&lt;/p&gt;  &lt;p&gt;When your web page has an HTML Incompatibility error, the following happens in Expression Web:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;The errant code appears with a red squiggly line underneath it in the Code view of your page. For example, look at the line under &lt;strong&gt;bgcolor=”aqua”&lt;/strong&gt; in this screenshot:      &lt;br /&gt;&lt;img title="HTML Incompatibility error underlined in code" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="29" alt="HTML Incompatibility error underlined in code" src="http://blogs.msdn.com/blogfiles/anna/WindowsLiveWriter/Newerconstructsarerecommended_10253/image_22.png" width="165" border="0" /&gt;       &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;When you move your cursor over the errant code, a floating message (aka “tooltip”) appears with some advice, like so:     &lt;br /&gt;      &lt;br /&gt;&lt;img title="HTML Incompatility error&amp;#39;s tooltip" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="31" alt="HTML Incompatility error&amp;#39;s tooltip" src="http://blogs.msdn.com/blogfiles/anna/WindowsLiveWriter/Newerconstructsarerecommended_10253/image_21.png" width="504" border="0" /&gt;       &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;When an open page contains an HTML Incompatibility error, the following icon appears in the status bar along the bottom of the program:     &lt;br /&gt;      &lt;br /&gt;&lt;a href="http://blogs.msdn.com/blogfiles/anna/WindowsLiveWriter/Newerconstructsarerecommended_10253/image_4.png"&gt;&lt;img title="HTML Incompatibility icon" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="26" alt="HTML Incompatibility icon" src="http://blogs.msdn.com/blogfiles/anna/WindowsLiveWriter/Newerconstructsarerecommended_10253/image_thumb_1.png" width="26" border="0" /&gt;&lt;/a&gt; &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;In addition to those alerts for an open page, you can check your entire website or specified pages for errors by using the Compatibility Checker which is available on the Tools menu:   &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;&lt;img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="325" alt="image" src="http://blogs.msdn.com/blogfiles/anna/WindowsLiveWriter/Newerconstructsarerecommended_10253/image_17.png" width="240" border="0" /&gt;     &lt;br /&gt;    &lt;br /&gt;After you click on&amp;#160; Tools &amp;gt; Compatibility Reports, the Compatibility Checker dialog box appears:&lt;/p&gt;  &lt;p&gt;&lt;img title="Compatibility Checker dialog box" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="264" alt="Compatibility Checker dialog box" src="http://blogs.msdn.com/blogfiles/anna/WindowsLiveWriter/Newerconstructsarerecommended_10253/image_18.png" width="493" border="0" /&gt;&amp;#160; &lt;br /&gt;After you click the Check button in the Compatibility Checker dialog box, the Compatibility task pane lists all the HTML Compatibility problems, CSS Compatibility problems, and also Code Errors of the pages you checked:    &lt;br /&gt;&lt;a href="http://blogs.msdn.com/blogfiles/anna/WindowsLiveWriter/Newerconstructsarerecommended_10253/image_12.png"&gt;&lt;img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="114" alt="image" src="http://blogs.msdn.com/blogfiles/anna/WindowsLiveWriter/Newerconstructsarerecommended_10253/image_thumb_5.png" width="504" border="0" /&gt;&lt;/a&gt;&amp;#160; &lt;br /&gt;It’s a mighty fine tool to run on your website before you unleash your site on the world. But the tool isn’t very useful if you don’t know how to fix the problems that Expression Web has identified for you – a problem that inspired me to write this post.&lt;/p&gt;  &lt;p&gt;There are plenty of other tooltips that appear in Code view when your page contains a code error (code that’s highlighted in color) or code that’s incompatible with the DOCTYPE of your page, and which you may find difficult to decipher. If you encounter any you need help with, comment on this post or send me an email and I’ll do my best to decrypt it for you. For code errors, you’ll need to share the code for your entire page because often the code that is flagged isn’t the problem, it’s code that precedes it that is causing a confusing domino effect!&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9269886" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/anna/archive/tags/Expression+Web/default.aspx">Expression Web</category><category domain="http://blogs.msdn.com/anna/archive/tags/CSS/default.aspx">CSS</category><category domain="http://blogs.msdn.com/anna/archive/tags/Expression+Web+2/default.aspx">Expression Web 2</category></item><item><title>Who's editing your CSS?</title><link>http://blogs.msdn.com/anna/archive/2008/06/22/who-s-editing-your-external-css.aspx</link><pubDate>Mon, 23 Jun 2008 05:21:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8640859</guid><dc:creator>Anna</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/anna/comments/8640859.aspx</comments><wfw:commentRss>http://blogs.msdn.com/anna/commentrss.aspx?PostID=8640859</wfw:commentRss><wfw:comment>http://blogs.msdn.com/anna/rsscomments.aspx?PostID=8640859</wfw:comment><description>&lt;P&gt;The vast majority of front end web developers that I've met prefer to write their own markup in the code editor rather than let the program generate the markup for them. In fact, it's a point of pride to hand code because WYSIWYG programs have gotten a reputation for bloated code, mangled tags, and undesirable formatting. Of course this was never the case with Expression Web (for reals!) but once you've been burned by any markup generator, it's hard to trust any program with your code.&lt;/P&gt;
&lt;P&gt;So when does Expression Web touch your CSS and how can you take control of it (or avoid it all together)? Come, let me show you the ways...&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;A class="" title=when name=when&gt;&lt;/A&gt;WHEN&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Expression Web generates CSS for you &lt;U&gt;&lt;STRONG&gt;only&lt;/STRONG&gt;&lt;/U&gt; when you:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Use the &lt;STRONG&gt;formatting buttons in the toolbars&lt;/STRONG&gt;, for example, these buttons in the Common toolbar: 
&lt;P&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=47 alt="some formatting buttons on the Common toolbar" src="http://blogs.msdn.com/blogfiles/anna/WindowsLiveWriter/EditingyourexternalCSS_1105C/formatting_toolbar_thumb_1.png" width=298 border=0 mce_src="http://blogs.msdn.com/blogfiles/anna/WindowsLiveWriter/EditingyourexternalCSS_1105C/formatting_toolbar_thumb_1.png"&gt;&lt;/P&gt;&lt;BR&gt;&lt;/LI&gt;
&lt;LI&gt;Use the &lt;STRONG&gt;formatting options in dialog boxes&lt;/STRONG&gt;, for example, the Paragraph dialog box that appears when you choose Format &amp;gt; Paragraph: 
&lt;P&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=418 alt="Paragraph dialog box" src="http://blogs.msdn.com/blogfiles/anna/WindowsLiveWriter/EditingyourexternalCSS_1105C/image_thumb_4.png" width=400 border=0 mce_src="http://blogs.msdn.com/blogfiles/anna/WindowsLiveWriter/EditingyourexternalCSS_1105C/image_thumb_4.png"&gt;&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;Drag in Design view to set the margins, padding, or dimensions&lt;/STRONG&gt; of an element, as in the following screenshot in which I'm dragging the shaded area below a heading to set the margin-bottom of the heading: 
&lt;P&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=228 alt="dragging in Design view to set margin-bottom property" src="http://blogs.msdn.com/blogfiles/anna/WindowsLiveWriter/EditingyourexternalCSS_1105C/image_thumb_5.png" width=400 border=0 mce_src="http://blogs.msdn.com/blogfiles/anna/WindowsLiveWriter/EditingyourexternalCSS_1105C/image_thumb_5.png"&gt;&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;Use the &lt;STRONG&gt;New Style&lt;/STRONG&gt; or &lt;STRONG&gt;Modify Style&lt;/STRONG&gt; dialog box: 
&lt;P&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=383 alt="Modify Style dialog box" src="http://blogs.msdn.com/blogfiles/anna/WindowsLiveWriter/EditingyourexternalCSS_1105C/image_thumb.png" width=400 border=0 mce_src="http://blogs.msdn.com/blogfiles/anna/WindowsLiveWriter/EditingyourexternalCSS_1105C/image_thumb.png"&gt;&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;Use the &lt;STRONG&gt;CSS Properties&lt;/STRONG&gt; task pane, &lt;STRONG&gt;Apply Styles&lt;/STRONG&gt; task pane, or &lt;STRONG&gt;Manage Styles&lt;/STRONG&gt; task pane: 
&lt;P&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=497 alt="CSS Properties task pane" src="http://blogs.msdn.com/blogfiles/anna/WindowsLiveWriter/EditingyourexternalCSS_1105C/image_thumb_1.png" width=250 border=0 mce_src="http://blogs.msdn.com/blogfiles/anna/WindowsLiveWriter/EditingyourexternalCSS_1105C/image_thumb_1.png"&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;When you use the features I listed in #4 - 5 (New Style dialog, Modify Style dialog, CSS Properties task pane, Apply Styles task pane, Manage Styles task pane), you are essentially writing CSS by hand, just like in the code editor, and generating whatever CSS you specify. But when you use features #1 - 3 (buttons in toolbar, property dialogs, and setting properties directly in Design view), the CSS that Expression Web generates is subject to options you set in the program.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;WHAT&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;So what kind of CSS does Expression Web generate when you use features #1 - 3? By default, either an inline style or a class, according to the current settings on the CSS tab in the Page Editor Options dialog box (Tools &amp;gt; Page Editor Options):&lt;/P&gt;
&lt;P&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=426 alt=image src="http://blogs.msdn.com/blogfiles/anna/WindowsLiveWriter/EditingyourexternalCSS_1105C/image_thumb_6.png" width=400 border=0 mce_src="http://blogs.msdn.com/blogfiles/anna/WindowsLiveWriter/EditingyourexternalCSS_1105C/image_thumb_6.png"&gt;&lt;/P&gt;
&lt;P&gt;The one exception is the "Page properties on the &amp;lt;body&amp;gt; tag" option, which you can set to either inline styles or "rules". "Rules" means the program will generate a style that uses a tag selector, i.e. the &lt;STRONG&gt;body&lt;/STRONG&gt; tag will be the style's selector. (Note to self, file a suggestion to relabel "rules" to something more meaningful!)&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;WHERE&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;So where does Expression Web place the styles that the program generates for you when you use features #1 - 3? By default, Expression Web is set to Auto mode (aka Auto Style Application mode). In Auto mode, new styles that Expression Web generates are placed in an embedded style sheet in the head of the page.&lt;/P&gt;
&lt;P&gt;What if you want Expression Web to put the new styles in the external CSS file that is attached to your page? I hear a lot of requests for that behavior (and want it myself!) but with versions 1 and 2 of Expression Web there is no way to have new auto-generated styles automatically appear in the external CSS. Keep in mind that this only applies to NEW styles that Expression Web &lt;STRONG&gt;automatically generates for you&lt;/STRONG&gt; when you use features #1 - 3. In contrast, new styles that you create from scratch through the New Style dialog box are written wherever you specify, which can be the current page, a new style sheet, or an existing style sheet that's attached to the current page:&lt;/P&gt;
&lt;P&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=99 alt="Define In drop down menu in New Style dialog box" src="http://blogs.msdn.com/blogfiles/anna/WindowsLiveWriter/EditingyourexternalCSS_1105C/define_in_thumb.png" width=400 border=0 mce_src="http://blogs.msdn.com/blogfiles/anna/WindowsLiveWriter/EditingyourexternalCSS_1105C/define_in_thumb.png"&gt;&lt;/P&gt;
&lt;P&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=387 alt="New Style dialog box" src="http://blogs.msdn.com/blogfiles/anna/WindowsLiveWriter/EditingyourexternalCSS_1105C/image_thumb_7.png" width=404 border=0 mce_src="http://blogs.msdn.com/blogfiles/anna/WindowsLiveWriter/EditingyourexternalCSS_1105C/image_thumb_7.png"&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;REUSE&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;So what do you do if you don't want Expression Web to generate a new style and instead want the program to update an existing style whenever you do anything with features #1 - 3? In that case, use Manual mode (aka Manual Style Application mode). In Manual mode, you can have Expression Web target an existing style that's in either your embedded style sheet or an external CSS file that's attached to the page, provided the style already targets the current element.&lt;/P&gt;
&lt;P&gt;To turn on Manual mode, open a page, then go to the status bar at the bottom of the program window, right-click Style Application, point to Mode, and select Manual.&lt;/P&gt;
&lt;P&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=122 alt="Style Application mode menu in the status bar" src="http://blogs.msdn.com/blogfiles/anna/WindowsLiveWriter/EditingyourexternalCSS_1105C/manual_thumb.png" width=245 border=0 mce_src="http://blogs.msdn.com/blogfiles/anna/WindowsLiveWriter/EditingyourexternalCSS_1105C/manual_thumb.png"&gt; &lt;BR&gt;&lt;/P&gt;
&lt;P&gt;(Or choose Tools &amp;gt; Page Editor Options, click the CSS tab, and select the Manual Style Application option, and click OK.)&lt;/P&gt;
&lt;P&gt;I'll show you how this works using my previous example of dragging in Design view to set the bottom-margin of my heading (h1). &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;MANUAL STYLE APPLICATION MODE&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;With the Style Application set to Manual, and my heading (H1) selected in my page, the Style Application toolbar looks like this:&lt;/P&gt;
&lt;P&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=31 alt="Style Application toolbar set to Manual mode" src="http://blogs.msdn.com/blogfiles/anna/WindowsLiveWriter/EditingyourexternalCSS_1105C/image_thumb_3.png" width=400 border=0 mce_src="http://blogs.msdn.com/blogfiles/anna/WindowsLiveWriter/EditingyourexternalCSS_1105C/image_thumb_3.png"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When the program is in Manual Style Application mode, the critical option in the Style Application toolbar is the Target Rule setting. Whatever style is selected in the Target Rule option is the style that Expression Web updates when you use any of the features I described in #1 - 3. For example, with my h1 selected in my page, by default the style named &lt;STRONG&gt;#column_l h1&lt;/STRONG&gt; is selected for the Target Rule. That style is selected by default because it has the highest precedence of all the styles that affect the selected h1. If I use any of the features #1 - 3 while that h1 is selected, the style &lt;STRONG&gt;#column_l h1&lt;/STRONG&gt; is updated.&lt;/P&gt;
&lt;P&gt;If I want Expression Web to update a different style when I use features #1 - 3 while that h1 is selected, all I need to do is click the Target Rule drop down and select the style I want to update or the type of new style I want created for me. For example, the Target Rule drop down menu lets me select a style named &lt;STRONG&gt;#container h1&lt;/STRONG&gt;, a style named &lt;STRONG&gt;h1&lt;/STRONG&gt;, or I can choose to have Expression Web create either a new class or inline style, or I can launch the New Style dialog box to create a new style from scratch myself:&lt;/P&gt;
&lt;P&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=158 alt=styleapp_targetrule src="http://blogs.msdn.com/blogfiles/anna/WindowsLiveWriter/EditingyourexternalCSS_1105C/styleapp_targetrule_thumb.png" width=400 border=0 mce_src="http://blogs.msdn.com/blogfiles/anna/WindowsLiveWriter/EditingyourexternalCSS_1105C/styleapp_targetrule_thumb.png"&gt; &lt;/P&gt;
&lt;P&gt;In my current example, the styles happen to be in the style sheet embedded in the current page (hence why "Current Page" appears next to each style in the Target Rule drop down menu). If they were in the external CSS attached to my page, the style sheet's name would appear next to the style instead of "Current Page" and I could still target those styles if I desired.&lt;/P&gt;
&lt;P&gt;New users of Expression Web seem to set the program to Manual style application mode because they're under the impression that this mode means that the program will not automatically generate any CSS for them; in fact, Manual mode simply means you can make Expression Web target existing styles that affect the current element instead of generating new styles by default. (Anecdote: during the development of Expression Web version 1, I anticipated that folks would interpret the label "Manual" incorrectly and so suggested it be labeled "Semi-Auto" instead, but that suggestion was rejected in small part because it brings to mind &lt;STRONG&gt;semi-auto&lt;/STRONG&gt;matic weapons. :)&amp;nbsp; Regardless, I still think the label would be more meaningful and accurate if changed to Semi-Auto.) &lt;/P&gt;
&lt;P&gt;To all of you that prefer to generate your CSS by hand, all you need to do is stay away from features #1 - 3 when using Expression Web and you can rest assured that your CSS is all under your control; just stick to using features #4 - 5 as well as, obviously, a page's Code view editor and the code view of a CSS file. For the rest of you, I hope this post helps illuminate how Expression Web generates CSS for you and the options available to you in the program. So who's editing your CSS? If you're using Expression Web, the options I breezed over in this post ensure YOU are in control of your CSS.&lt;/P&gt;
&lt;P&gt;BTW, this post was inspired by Expression Web forum user Bruno Nepomuceno who started a thread to&amp;nbsp;ask how to make Expression Web target his external CSS...thanks Bruno!&lt;/P&gt;
&lt;P&gt;&lt;A title=http://forums.expression.microsoft.com/en-US/web/thread/73c28363-7f12-497f-94e2-aaa04abe904d href="http://forums.expression.microsoft.com/en-US/web/thread/73c28363-7f12-497f-94e2-aaa04abe904d" mce_href="http://forums.expression.microsoft.com/en-US/web/thread/73c28363-7f12-497f-94e2-aaa04abe904d"&gt;http://forums.expression.microsoft.com/en-US/web/thread/73c28363-7f12-497f-94e2-aaa04abe904d&lt;/A&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8640859" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/anna/archive/tags/Expression+Web/default.aspx">Expression Web</category><category domain="http://blogs.msdn.com/anna/archive/tags/CSS/default.aspx">CSS</category><category domain="http://blogs.msdn.com/anna/archive/tags/tutorials/default.aspx">tutorials</category><category domain="http://blogs.msdn.com/anna/archive/tags/Expression+Web+2/default.aspx">Expression Web 2</category></item><item><title>plates overflowing with CSS</title><link>http://blogs.msdn.com/anna/archive/2008/03/04/overflowing-plates.aspx</link><pubDate>Wed, 05 Mar 2008 10:11:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8047624</guid><dc:creator>Anna</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/anna/comments/8047624.aspx</comments><wfw:commentRss>http://blogs.msdn.com/anna/commentrss.aspx?PostID=8047624</wfw:commentRss><wfw:comment>http://blogs.msdn.com/anna/rsscomments.aspx?PostID=8047624</wfw:comment><description>&lt;P&gt;I think I'm the only person at Microsoft who brings her own plate to the cafeterias on campus here in Redmond. I've gotten a lot of positive encouragement from other people who notice me and my plate, but I've yet to see anyone else doing this in my two years here. I do this because in many ways, including aesthetically, it's more pleasurable to eat off a ceramic plate than a styrofoam plate, and more importantly, because it's less wasteful. Bringing my own plate to work is a good habit I got into while working at Adobe in Seattle, after seeing a few guys doing this there.&lt;/P&gt;
&lt;P&gt;And I don't bring just any ol' plate...I bring a nice green ceramic plate that's divided like a tv dinner plate is (complete with a little circle to put&amp;nbsp;the matching&amp;nbsp;drinking cup on) and that was designed by &lt;A class="" title="Biography of Belle Kogan" href="http://www.idsa.org/whatsnew/sections/dh/personal_rec_awards/1994_Kogan.html" target=_blank mce_href="http://www.idsa.org/whatsnew/sections/dh/personal_rec_awards/1994_Kogan.html"&gt;Belle Kogan&lt;/A&gt;.&amp;nbsp;Here's an image of my plate, waiting for its grilled tofu salad at my favorite Microsoft cafeteria:&lt;/P&gt;
&lt;P&gt;&lt;IMG title="Belle Kogan tv dinner plate" style="WIDTH: 400px; HEIGHT: 533px" height=533 alt="Belle Kogan tv dinner plate" src="http://blogs.msdn.com/photos/posts/images/8047697/original.aspx" width=400 mce_src="http://blogs.msdn.com/photos/posts/images/8047697/original.aspx"&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;I started working at Microsoft in January of 2006, and so I estimate that by bringing my own plate to the cafeteria, I've avoided using 490 disposable styrofoam plates! Four hundred and ninety styrofoam plates!&amp;nbsp; What do 490 styrofoam plates look like? Well, I wish I had an image to show you that's&amp;nbsp;as impressive as the photographs of &lt;A class="" title="Chris Jordan's photographic series: Running the Numbers, An American self portrait" href="http://www.chrisjordan.com/current_set2.php?id=7" target=_blank mce_href="http://www.chrisjordan.com/current_set2.php?id=7"&gt;Chris Jordan&lt;/A&gt;,&amp;nbsp;but what I can do is show you a stack of 70 styrofoam plates that I photographed at the cafeteria and then cloned 7 times in Photoshop. &lt;/P&gt;
&lt;P mce_keep="true"&gt;Rather than make you scroll the entire web page to view the image, I've instead used&amp;nbsp;the &lt;A class="" title="Beta version of Expression Web 2" href="http://www.microsoft.com/expression/products/download.aspx?key=web2beta" target=_blank mce_href="http://www.microsoft.com/expression/products/download.aspx?key=web2beta"&gt;BETA version&amp;nbsp;of Expression Web &lt;SPAN style="FONT-SIZE: 1.25em"&gt;2&lt;/SPAN&gt; &lt;/A&gt;to put the image into a &lt;STRONG&gt;&amp;lt;div&amp;gt;&lt;/STRONG&gt; container, set the height of the div to a much shorter height than the image, and then set the CSS&amp;nbsp;&lt;STRONG&gt;overflow&lt;/STRONG&gt; property to &lt;STRONG&gt;scroll.&lt;/STRONG&gt;&amp;nbsp;The scroll value masks out the areas of the image that extend beyond the div's dimensions and provides scroll bars so users can scroll the div container without&amp;nbsp;having to&amp;nbsp;scroll the entire web page. &lt;/P&gt;
&lt;P mce_keep="true"&gt;Here it is in action...scroll baby scroll! &lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV style="OVERFLOW: scroll; WIDTH: 450px; HEIGHT: 375px; BACKGROUND-COLOR: #ffffff; TEXT-ALIGN: center"&gt;&lt;IMG height=2109 alt="490 styrofoam plates" src="http://blogs.msdn.com/photos/posts/images/8047665/original.aspx" width=400 mce_src="http://blogs.msdn.com/photos/posts/images/8047665/original.aspx"&gt;&lt;/DIV&gt;
&lt;P&gt;Now if you setup your own overflowing div in the first version of Expression Web, you'll discover that the Design view does not&amp;nbsp;render the overflow property correctly. To see the results, you had to preview your page in&amp;nbsp;a browser that supports the property. I'm pleased to report that the&amp;nbsp;Design view of&amp;nbsp;&lt;A class="" title="Beta of Expression Web 2" href="http://www.microsoft.com/expression/products/download.aspx?key=web2beta" target=_blank mce_href="http://www.microsoft.com/expression/products/download.aspx?key=web2beta"&gt;Expression Web &lt;SPAN style="FONT-SIZE: 1.25em"&gt;2&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/A&gt;&amp;nbsp; does properly render the overflow property.&lt;/P&gt;
&lt;P&gt;Here's how to setup an overflowing div like my example above using any tool you want:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Put your content (image, text, whatever you want...) between a set of &amp;lt;div&amp;gt; &amp;lt;/div&amp;gt; tags. &lt;BR&gt;Tip for Expression Web users: if the content is already in your page, and you need to wrap the content with a set of &amp;lt;div&amp;gt; &amp;lt;/div&amp;gt; tags, then with your content selected,&amp;nbsp;press CTRL + Q to open the Quick Tag Editor, and type &amp;lt;div&amp;gt; and click the Enter button.&lt;BR&gt;&lt;/LI&gt;
&lt;LI&gt;Use CSS to set the width and height of the div to the desired dimensions. For example, here's an inline style applied to a div: &amp;lt;div style="width: 450px; height: 375px;"&amp;gt; .&lt;BR&gt;&lt;BR&gt;To set these dimensions in the Design view of Expression Web, click the &lt;STRONG&gt;&amp;lt;div&amp;gt;&lt;/STRONG&gt; tag in the quick tag selector bar that lies along the top of your page (see image that follows&amp;nbsp;)...this makes sure your &amp;lt;div&amp;gt; tag is selected and not your &amp;lt;img&amp;gt; tag - very important! And then to set the width of the div,&amp;nbsp;drag the square handle (see image that follows)&amp;nbsp;that's in the middle of the right edge of the div, and then to set the height, drag the square handle that's in the middle of the bottom edge of the div. Again, it's important that you do this while the div is selected, otherwise you'll resize the image instead. And it's very important to drag the handle of a side and not to drag the edge on either side of the handle...if you drag the edge then you'll set the margin of the div&amp;nbsp;instead of the dimension.&lt;BR&gt;&lt;IMG title="dragging in Design view to set the div's dimensions" style="WIDTH: 400px; HEIGHT: 182px" height=182 alt="dragging in Design view to set the div's dimensions" src="http://blogs.msdn.com/photos/posts/images/8048974/original.aspx" width=400 mce_src="http://blogs.msdn.com/photos/posts/images/8048974/original.aspx"&gt; 
&lt;P&gt;After you've set the size of the div so that it's smaller than your content, the Design view of your page&amp;nbsp;will show the content extending out of,&amp;nbsp;or overflowing, the div like this:&lt;/P&gt;
&lt;P&gt;&lt;IMG title="Design view showing content overflowing out of a div" style="WIDTH: 400px; HEIGHT: 672px" height=672 alt="Design view showing content overflowing out of a div" src="http://blogs.msdn.com/photos/posts/images/8049128/original.aspx" width=400 mce_src="http://blogs.msdn.com/photos/posts/images/8049128/original.aspx"&gt;&lt;BR&gt;&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;Now to mask the photograph so that you can only see the portion of it that is showing within the outline of the div, you need to add the &lt;STRONG&gt;overflow&lt;/STRONG&gt; property to&amp;nbsp;the style you've applied to your&amp;nbsp;div, and set the property's value to &lt;STRONG&gt;scroll&lt;/STRONG&gt; (or to "hidden" if you don't want to provide the user with the option to scroll in the div). To do this in Expression Web, select your div, and then in the &lt;STRONG&gt;CSS Properties&lt;/STRONG&gt; task pane, with the inline style (or your own style) selected under &lt;STRONG&gt;Applied Rules&lt;/STRONG&gt; in the task pane, locate the &lt;STRONG&gt;overflow&lt;/STRONG&gt; property and set it to &lt;STRONG&gt;scroll&lt;/STRONG&gt;.&lt;BR&gt;&lt;BR&gt;&lt;IMG title="overflow property in the CSS Properties task pane" style="WIDTH: 227px; HEIGHT: 433px" height=433 alt="overflow property in the CSS Properties task pane" src="http://blogs.msdn.com/photos/posts/images/8049302/original.aspx" width=227 mce_src="http://blogs.msdn.com/photos/posts/images/8049302/original.aspx"&gt;&lt;BR&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;With the overflow property set to scroll, the Design view in &lt;A class="" title="BETA version of Expression Web 2" href="http://www.microsoft.com/expression/products/download.aspx?key=web2beta" target=_blank mce_href="http://www.microsoft.com/expression/products/download.aspx?key=web2beta"&gt;Expression Web &lt;SPAN style="FONT-SIZE: 1.25em"&gt;2&lt;/SPAN&gt;&lt;/A&gt; masks the area of the photograph that goes beyond the area of the div and shows a scroll bar. The&amp;nbsp;scrollbars don't function in Expression Web...you'll have to preview in your browser to test those out. And the Design view shows an outline of whatever content is overflowing outside of your div. For example, look at the white vertical lines extending downward below the selected div...those lines represent the photograph that is being masked by the div.&lt;/P&gt;
&lt;P&gt;&lt;IMG title="Design view showing div with overflow property set to scroll" style="WIDTH: 400px; HEIGHT: 505px" height=505 alt="Design view showing div with overflow property set to scroll" src="http://blogs.msdn.com/photos/posts/images/8049446/original.aspx" width=400 mce_src="http://blogs.msdn.com/photos/posts/images/8049446/original.aspx"&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Power Expression Web user tip:&lt;/STRONG&gt;&amp;nbsp;If you want to avoid inline styles, such as the inline style that was created and applied to the div when you dragged the edges of&amp;nbsp;the div in Design view, then change your CSS settings in the Page Editor Options like this:&amp;nbsp;choose &lt;STRONG&gt;Tools&lt;/STRONG&gt; &amp;gt; &lt;STRONG&gt;Page Editor Options&lt;/STRONG&gt;. In the Page Editor Options dialog box, click the &lt;STRONG&gt;CSS&lt;/STRONG&gt; tab, and change the &lt;STRONG&gt;Sizing, positioning, and floating&lt;/STRONG&gt; option to &lt;STRONG&gt;CSS (classes)&lt;/STRONG&gt;. Then next time you drag the square handles of a selected element in Design view, Expression Web will generate a class for you instead of an inline style.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8047624" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/anna/archive/tags/CSS/default.aspx">CSS</category><category domain="http://blogs.msdn.com/anna/archive/tags/tutorials/default.aspx">tutorials</category><category domain="http://blogs.msdn.com/anna/archive/tags/Expression+Web+2/default.aspx">Expression Web 2</category><category domain="http://blogs.msdn.com/anna/archive/tags/BETA/default.aspx">BETA</category></item><item><title>Center a page (horizontally) by using CSS</title><link>http://blogs.msdn.com/anna/archive/2008/02/19/center-a-page-horizontally-by-using-css.aspx</link><pubDate>Wed, 20 Feb 2008 03:53:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7797308</guid><dc:creator>Anna</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/anna/comments/7797308.aspx</comments><wfw:commentRss>http://blogs.msdn.com/anna/commentrss.aspx?PostID=7797308</wfw:commentRss><wfw:comment>http://blogs.msdn.com/anna/rsscomments.aspx?PostID=7797308</wfw:comment><description>&lt;P&gt;I often see posts in the&amp;nbsp;Microsoft Expression Web discussion forum, asking how to make a web page appear centered in the web browser. One simple method is to surround the contents of your page with a div (if it isn't already), set the div's width, and then set the div's left and right margins to auto. This tutorial shows you how to do all that step-by-step by using the design surface in Expression Web and CSS. The final markup appears at the very end.&lt;/P&gt;
&lt;P&gt;[ Note: after posting this tutorial, a colleague pointed out that this solution may not work in Internet Explorer 6. I'll look into this in a few weeks, when I have more time, and either update this post or post a&amp;nbsp;separate&amp;nbsp;addendum. ]&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;If your entire page is already wrapped by a div tag that has a defined width, then you can&amp;nbsp;jump to&amp;nbsp;step 9.&lt;/LI&gt;
&lt;LI&gt;Put your cursor in your page in &lt;STRONG&gt;Design&lt;/STRONG&gt; view.&lt;/LI&gt;
&lt;LI&gt;In the quick tag selector bar that lies along the top of your page, right-click the &lt;STRONG&gt;&amp;lt;body&amp;gt;&lt;/STRONG&gt; tag and click &lt;STRONG&gt;Select Tag Contents&lt;/STRONG&gt;. This ensures you've got everything in the body of your page selected, including tags. 
&lt;P&gt;&lt;IMG title="Select Tag Contents command in quick tag selector bar's context menu" style="WIDTH: 163px; HEIGHT: 212px" height=212 alt="Select Tag Contents command in quick tag selector bar's context menu" src="http://blogs.msdn.com/photos/posts/images/7798990/original.aspx" width=163 mce_src="http://blogs.msdn.com/photos/posts/images/7798990/original.aspx"&gt;&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;Do one of the following to wrap your page&amp;nbsp;contents&amp;nbsp;in a &amp;lt;div&amp;gt; tag:&lt;/LI&gt;
&lt;UL&gt;
&lt;LI&gt;In the &lt;STRONG&gt;Toolbox&lt;/STRONG&gt; task pane, under &lt;STRONG&gt;HTML&lt;/STRONG&gt; &amp;gt; &lt;STRONG&gt;Tags&lt;/STRONG&gt;, right-click &lt;STRONG&gt;&amp;lt;div&amp;gt;&lt;/STRONG&gt; and click &lt;STRONG&gt;Wrap&lt;/STRONG&gt;. 
&lt;P&gt;&lt;IMG title="context menu of &lt;div&gt; tag in Toolbox task pane" style="WIDTH: 186px; HEIGHT: 275px" height=275 alt="context menu of &lt;div&gt; tag in Toolbox task pane" src="http://blogs.msdn.com/photos/posts/images/7799086/original.aspx" width=186 mce_src="http://blogs.msdn.com/photos/posts/images/7799086/original.aspx"&gt; &lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;Press CTRL+Q to display the &lt;STRONG&gt;Quick Tag Editor&lt;/STRONG&gt; dialog box. In the dialog box, set the pull down menu to &lt;STRONG&gt;Wrap Tag&lt;/STRONG&gt;, type &lt;STRONG&gt;&amp;lt;div&amp;gt;&lt;/STRONG&gt; on the right, and press Enter to accept your changes and close the dialog. 
&lt;P&gt;&lt;IMG title="Quick Tag Editor dialog box" style="WIDTH: 400px; HEIGHT: 45px" height=45 alt="Quick Tag Editor dialog box" src="http://blogs.msdn.com/photos/posts/images/7799215/original.aspx" width=400 mce_src="http://blogs.msdn.com/photos/posts/images/7799215/original.aspx"&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;LI&gt;In the status bar that lies along the bottom of the program window, make sure &lt;STRONG&gt;Visual Aids&lt;/STRONG&gt; is set to &lt;STRONG&gt;On&lt;/STRONG&gt;. If Visual Aids&amp;nbsp;is set to &lt;STRONG&gt;Off&lt;/STRONG&gt;, then double-click &lt;STRONG&gt;Visual Aids&lt;/STRONG&gt; in the status bar to turn them on. 
&lt;P&gt;&lt;IMG title="Visual Aids setting in the status bar" style="WIDTH: 99px; HEIGHT: 21px" height=21 alt="Visual Aids setting in the status bar" src="http://blogs.msdn.com/photos/posts/images/7799266/original.aspx" width=99 mce_src="http://blogs.msdn.com/photos/posts/images/7799266/original.aspx"&gt;&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;In the status bar, right-click &lt;STRONG&gt;Visual Aids&lt;/STRONG&gt; and make sure the&amp;nbsp;&lt;STRONG&gt;Block Selection&lt;/STRONG&gt; visual aid is selected. When a visual aid is selected, its icon&amp;nbsp;appears orange in the list of visual aids. 
&lt;P&gt;&lt;IMG title="Visual Aids menu in Status Bar" style="WIDTH: 216px; HEIGHT: 253px" height=253 alt="Visual Aids menu in Status Bar" src="http://blogs.msdn.com/photos/posts/images/7798810/original.aspx" width=216 mce_src="http://blogs.msdn.com/photos/posts/images/7798810/original.aspx"&gt;&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;In the quick tag selector bar, click the &amp;lt;div&amp;gt; that's directly to the right of the &amp;lt;body&amp;gt; tag, just to make sure it's selected. 
&lt;P&gt;&lt;IMG title="div tag selected in quick tag selector bar" style="WIDTH: 89px; HEIGHT: 45px" height=45 alt="div tag selected in quick tag selector bar" src="http://blogs.msdn.com/photos/posts/images/7799550/original.aspx" width=89 mce_src="http://blogs.msdn.com/photos/posts/images/7799550/original.aspx"&gt; &lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;In the &lt;STRONG&gt;Design&lt;/STRONG&gt; view of your page, on the right edge of your selected div, a square handle appears in the middle. Drag this handle to the left until the div is the desired width. Be careful to drag the square handle and NOT the edge of your div; if you drag the edge of your div you will set the margin of your div instead of its width and that's not what we want to do here. As you drag, the dimensions of the div appear in a floating box. I stopped dragging when the width was 395px...not a practical size for a web page but it's a good size for a screen capture that will fit in this blog post. :) 
&lt;P&gt;&lt;IMG title="Dragging to set a div's width in Design view" style="WIDTH: 425px; HEIGHT: 248px" height=248 alt="Dragging to set a div's width in Design view" src="http://blogs.msdn.com/photos/posts/images/7809808/original.aspx" width=425 mce_src="http://blogs.msdn.com/photos/posts/images/7809808/original.aspx"&gt; &lt;/P&gt;
&lt;P&gt;If you're having trouble getting the precise width you want, with your &amp;lt;div&amp;gt; still selected, go to the CSS Properties task pane, and set the &lt;STRONG&gt;width&lt;/STRONG&gt; for the selected style. When you drag in Design view to set the width of an element, you set the width in pixel dimensions, but you could set the width of your div to a % value instead if you want&amp;nbsp;the page's width to change relative to the browser window's width.&amp;nbsp;(Note - by default, the selected style will be an inline style on the &amp;lt;div&amp;gt; tag, but if you've modified your CSS options in the Page Editor Options, the selected style&amp;nbsp;is&amp;nbsp;a class. Or if your Style Application mode is set to Manual (not recommended for novices!), you might have a class or tag selector selected.)&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;Make sure your outer &amp;lt;div&amp;gt; is still selected (in the quick tag selector bar, click the &amp;lt;div&amp;gt; that's to the right of the &amp;lt;body&amp;gt; tag), and not a different &amp;lt;div&amp;gt; or anything else within it.&lt;/LI&gt;
&lt;LI&gt;In the &lt;STRONG&gt;CSS Properties&lt;/STRONG&gt; task pane, find the &lt;STRONG&gt;margin-left&lt;/STRONG&gt; and &lt;STRONG&gt;margin-right&lt;/STRONG&gt; attributes and set both to &lt;STRONG&gt;auto&lt;/STRONG&gt;. If you preview your page in your browser, the page should appear centered no matter the width of your browser window.&lt;BR&gt;&lt;BR&gt;&lt;IMG title="margin-left and margin-right attributes set to auto in the CSS Properties task pane" style="WIDTH: 272px; HEIGHT: 286px" height=286 alt="margin-left and margin-right attributes set to auto in the CSS Properties task pane" src="http://blogs.msdn.com/photos/posts/images/7800142/original.aspx" width=272 mce_src="http://blogs.msdn.com/photos/posts/images/7800142/original.aspx"&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;&lt;IMG title="web page centered in Internet Explorer" style="WIDTH: 500px; HEIGHT: 409px" height=409 alt="web page centered in Internet Explorer" src="http://blogs.msdn.com/photos/posts/images/7799719/original.aspx" width=500 mce_src="http://blogs.msdn.com/photos/posts/images/7799719/original.aspx"&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's the final markup of my page:&lt;/P&gt;&lt;PRE&gt;&amp;lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&amp;gt;
&amp;lt;html xmlns="http://www.w3.org/1999/xhtml"&amp;gt;
&amp;lt;head&amp;gt;
&amp;lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&amp;gt;
&amp;lt;title&amp;gt;Untitled 1&amp;lt;/title&amp;gt;&lt;BR&gt;&amp;lt;style type="text/css"&amp;gt;
.style1 {
&amp;nbsp;background-color: #CC0066;
}
&amp;lt;/style&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body style="background-color: #CCCCFF"&amp;gt;
&amp;lt;div style="width: 395px; margin-left: auto; margin-right: auto;"&amp;gt;
&amp;nbsp;&amp;lt;p class="style1"&amp;gt;
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut nonummy. 
Suspendisse mi risus, dignissim id, ornare ultricies, venenatis in, 
sapien. Praesent quis nunc. Sed dapibus. Pellentesque elementum blandit
 dui. Curabitur elit. Aenean auctor euismod sem. Etiam quis justo id lectus
 commodo interdum. Maecenas suscipit, ligula ut adipiscing ullamcorper,
 augue diam suscipit est, et tristique neque nunc quis nulla. Nunc eu mi 
facilisis lacus cursus elementum. Morbi risus ipsum, dictum non, iaculis 
imperdiet, ultricies id, neque. Curabitur ac mauris. Nulla sit amet diam.
 Duis porttitor. &amp;lt;/p&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/PRE&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=7797308" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/anna/archive/tags/Expression+Web/default.aspx">Expression Web</category><category domain="http://blogs.msdn.com/anna/archive/tags/CSS/default.aspx">CSS</category><category domain="http://blogs.msdn.com/anna/archive/tags/tutorials/default.aspx">tutorials</category></item><item><title>Interactive buttons - a better way using CSS</title><link>http://blogs.msdn.com/anna/archive/2008/02/17/interactive-buttons-a-better-way-with-css.aspx</link><pubDate>Mon, 18 Feb 2008 05:33:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7757148</guid><dc:creator>Anna</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/anna/comments/7757148.aspx</comments><wfw:commentRss>http://blogs.msdn.com/anna/commentrss.aspx?PostID=7757148</wfw:commentRss><wfw:comment>http://blogs.msdn.com/anna/rsscomments.aspx?PostID=7757148</wfw:comment><description>&lt;P&gt;My inaugural blog post is a tutorial that I promised to create for an Expression Web user a long (too long!) while ago. I promised to show him how easy it is to use CSS instead of the Interactive Buttons feature he relies on in Expression Web. The Interactive Buttons feature generates simple button images and JavaScript for you, and lets you select the font properties, size, color, and interactive behavior of your buttons. But why bother with images and all that script when you can get the same results with HTML and CSS?&lt;/P&gt;
&lt;P&gt;Using HTML and CSS instead of the Interactive Buttons feature has many advantages, including:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;More control over and options for the appearance of your buttons&lt;/LI&gt;
&lt;LI&gt;Browsers don't need to download images for each button and button state&lt;/LI&gt;
&lt;LI&gt;Easily reuse the buttons throughout an entire website by attaching a single CSS file to each page&lt;/LI&gt;
&lt;LI&gt;Easily change the appearance of your buttons by editing that one CSS file&lt;/LI&gt;
&lt;LI&gt;The markup has semantic value (&lt;A href="http://www.alistapart.com/articles/grokwebstandards/" target=_blank&gt;http://www.alistapart.com/articles/grokwebstandards/&lt;/A&gt;)&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;If you're new to CSS or to using Expression Web, this tutorial should be useful. Please let me know what you think and if you encounter any problems. If you're not new to CSS, I'd love to hear from you too...what do you think of the CSS I'm using? If you don't want to follow all the steps and just want the final results, you can see the final markup at the end of the tutorial.&lt;/P&gt;
&lt;P&gt;Here's what we're going to create: 
&lt;STYLE type=text/css&gt;
#nav_menu li {
	border: 2px solid #000000;
	list-style-type: none;
	float: left;
	width: 4em;
	background-color: #800080;
	text-align: center;
	margin-right: 1px;
	margin-left: 1px;
}
#nav_menu a {
	font-family: Arial, Helvetica, sans-serif;
	color: #FFFFFF;
	text-decoration: none;
	display: block;
}
#nav_menu li:hover {
	background-color: #FF0066;
}
&lt;/STYLE&gt;

&lt;UL id=nav_menu&gt;
&lt;LI&gt;&lt;A href="http://blogs.msdn.com/anna" target=_blank&gt;one&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://blogs.msdn.com/anna" target=_blank&gt;two&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://blogs.msdn.com/anna" target=_blank&gt;three&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Start by creating a bulleted list for your menu.&lt;BR&gt;&lt;BR&gt;&lt;IMG title="bulleted list" style="WIDTH: 271px; HEIGHT: 187px" height=187 alt="bulleted list" src="http://blogs.msdn.com/photos/posts/images/7767521/original.aspx" width=271 mce_src="http://blogs.msdn.com/photos/posts/images/7767521/original.aspx"&gt;&lt;BR&gt;&lt;BR&gt;&lt;/LI&gt;
&lt;LI&gt;Display the Style toolbar: &lt;STRONG&gt;View&lt;/STRONG&gt; &amp;gt; &lt;STRONG&gt;Toolbars&lt;/STRONG&gt; &amp;gt; &lt;STRONG&gt;Style&lt;/STRONG&gt;. The Style toolbar provides an easy way to both create and assign classes and ids to elements in your page or apply existing classes and ids to elements.&lt;BR&gt;&lt;BR&gt;&lt;IMG title="Style toolbar" style="WIDTH: 342px; HEIGHT: 48px" height=48 alt="Style toolbar" src="http://blogs.msdn.com/photos/posts/images/7767618/original.aspx" width=342 mce_src="http://blogs.msdn.com/photos/posts/images/7767618/original.aspx"&gt;&lt;BR&gt;&lt;/LI&gt;
&lt;LI&gt;With your cursor in your bulleted list, click the &lt;STRONG&gt;&amp;lt;ul&amp;gt;&lt;/STRONG&gt; tag in the quick tag selector bar that lies along the top of your page. This ensures the ID that we assign in the next step is applied to the entire list instead of to only a single list item.&lt;BR&gt;&lt;BR&gt;&lt;IMG title="quick tag selector bar" style="WIDTH: 224px; HEIGHT: 84px" height=84 alt="quick tag selector bar" src="http://blogs.msdn.com/photos/posts/images/7767599/original.aspx" width=224 mce_src="http://blogs.msdn.com/photos/posts/images/7767599/original.aspx"&gt;&lt;BR&gt;&lt;/LI&gt;
&lt;LI&gt;In the &lt;STRONG&gt;Style&lt;/STRONG&gt; toolbar, in the &lt;STRONG&gt;ID&lt;/STRONG&gt; text box, type a name for your menu, and press &lt;STRONG&gt;Enter&lt;/STRONG&gt;. I typed &lt;STRONG&gt;nav_menu&lt;/STRONG&gt;. The ID should now&amp;nbsp;be applied to the selected list (i.e. to the ul tag). 
&lt;P&gt;&lt;IMG title="Style toolbar" style="WIDTH: 341px; HEIGHT: 48px" height=48 alt="Style toolbar" src="http://blogs.msdn.com/photos/posts/images/7767531/original.aspx" width=341 mce_src="http://blogs.msdn.com/photos/posts/images/7767531/original.aspx"&gt;&lt;/P&gt;
&lt;P&gt;&lt;IMG title="bulleted list with ID" style="WIDTH: 201px; HEIGHT: 201px" height=201 alt="bulleted list with ID" src="http://blogs.msdn.com/photos/posts/images/7767614/original.aspx" width=201 mce_src="http://blogs.msdn.com/photos/posts/images/7767614/original.aspx"&gt;&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;On the &lt;STRONG&gt;Format&lt;/STRONG&gt; menu, click &lt;STRONG&gt;New Style&lt;/STRONG&gt;. (You can also select this command by clicking the New Style button on either the Apply Styles task pane or the Manage Styles task pane, or in the CSS Properties task pane by right-clicking in a blank area in the Applied Rules area.)&lt;BR&gt;&lt;/LI&gt;
&lt;LI&gt;In the New Style dialog box, delete everything in the &lt;B&gt;Selector&lt;/B&gt; text box, and then type a &lt;B&gt;#&lt;/B&gt; sign and then the name that you gave your list in step 4, followed by a space and the tag &lt;STRONG&gt;li&lt;/STRONG&gt;. For my example, I typed &lt;STRONG&gt;#nav_menu li&lt;/STRONG&gt; in the Selector text box. By using this selector, the style we create will affect any li tag (the tag for a single&amp;nbsp;list item) that is within an element that uses the ID &lt;STRONG&gt;nav_menu&lt;/STRONG&gt; but won't affect any list items that are elsewhere on the page.&lt;BR&gt;&lt;BR&gt;&lt;IMG title="Selector box in New Style dialog box" style="WIDTH: 231px; HEIGHT: 94px" height=94 alt="Selector box in New Style dialog box" src="http://blogs.msdn.com/photos/posts/images/7767537/original.aspx" width=231 mce_src="http://blogs.msdn.com/photos/posts/images/7767537/original.aspx"&gt;&lt;BR&gt;&lt;/LI&gt;
&lt;LI&gt;In the New Style dialog box, under &lt;B&gt;Category&lt;/B&gt;, select &lt;B&gt;List&lt;/B&gt;. On the right, set &lt;B&gt;list-style-type&lt;/B&gt; to &lt;B&gt;none&lt;/B&gt;, and then click &lt;B&gt;Apply&lt;/B&gt; to see the results in your page but without leaving the dialog. By setting the list-style-type to none, we get rid of the bullets next to each list item.&lt;BR&gt;&lt;BR&gt;&lt;IMG title="List category in New Style dialog box" style="WIDTH: 400px; HEIGHT: 449px" height=449 alt="List category in New Style dialog box" src="http://blogs.msdn.com/photos/posts/images/7767542/original.aspx" width=400 mce_src="http://blogs.msdn.com/photos/posts/images/7767542/original.aspx"&gt;&lt;BR&gt;&lt;/LI&gt;
&lt;LI&gt;To make the navigation menu lie horizontally instead of vertically, under &lt;B&gt;Category&lt;/B&gt;, select &lt;B&gt;Layout&lt;/B&gt;, and then on the right, set &lt;B&gt;float&lt;/B&gt; to &lt;B&gt;left&lt;/B&gt;. Click &lt;B&gt;Apply&lt;/B&gt; to see the results. You'll notice that the list items have no space between them now, but we'll fix that next. 
&lt;P&gt;&lt;IMG title="Layout category in New Style dialog box" style="WIDTH: 400px; HEIGHT: 423px" height=423 alt="Layout category in New Style dialog box" src="http://blogs.msdn.com/photos/posts/images/7767544/original.aspx" width=400 mce_src="http://blogs.msdn.com/photos/posts/images/7767544/original.aspx"&gt;&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;Under &lt;B&gt;Category&lt;/B&gt;, select &lt;B&gt;Position&lt;/B&gt;. On the right, set &lt;B&gt;width&lt;/B&gt; to the desired width for your buttons. I set the value to 4 and the units to em. I used em for units so that if a user changes the text size in their browser, the buttons will expand in size along with the text. Click &lt;B&gt;Apply&lt;/B&gt; to see the results.&lt;BR&gt;&lt;BR&gt;&lt;IMG title="Position category in New Style dialog box" style="WIDTH: 400px; HEIGHT: 425px" height=425 alt="Position category in New Style dialog box" src="http://blogs.msdn.com/photos/posts/images/7767549/original.aspx" width=400 mce_src="http://blogs.msdn.com/photos/posts/images/7767549/original.aspx"&gt; 
&lt;P&gt;Time to give the buttons some color and jazz things up...&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;Under &lt;STRONG&gt;Category&lt;/STRONG&gt;, select &lt;STRONG&gt;Background&lt;/STRONG&gt;, and then set &lt;STRONG&gt;background-color&lt;/STRONG&gt; to the color you want your buttons to be. I set the color to a purple hue: #800080. Click &lt;STRONG&gt;Apply&lt;/STRONG&gt; to see the results. 
&lt;P&gt;&lt;IMG title="Background category in New Style dailog box" style="WIDTH: 400px; HEIGHT: 424px" height=424 alt="Background category in New Style dialog box" src="http://blogs.msdn.com/photos/posts/images/7767564/original.aspx" width=400 mce_src="http://blogs.msdn.com/photos/posts/images/7767564/original.aspx"&gt; &lt;/P&gt;
&lt;P&gt;Next, we'll make the text appear centered within each button.&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;Under &lt;STRONG&gt;Category&lt;/STRONG&gt;, select &lt;STRONG&gt;Block&lt;/STRONG&gt;. On the right, set &lt;STRONG&gt;text-align&lt;/STRONG&gt; to &lt;STRONG&gt;center&lt;/STRONG&gt;.&lt;BR&gt;&lt;BR&gt;&lt;IMG title="Block category in New Style dialog box" style="WIDTH: 400px; HEIGHT: 425px" height=425 alt="Block category in New Style dialog box" src="http://blogs.msdn.com/photos/posts/images/7767571/original.aspx" width=400 mce_src="http://blogs.msdn.com/photos/posts/images/7767571/original.aspx"&gt;&lt;BR&gt;&lt;/LI&gt;
&lt;LI&gt;If you want space between your buttons, in the &lt;STRONG&gt;Box&lt;/STRONG&gt; category, next to &lt;STRONG&gt;margin&lt;/STRONG&gt;, clear the box next to &lt;STRONG&gt;Same for all&lt;/STRONG&gt;, and then set &lt;STRONG&gt;right&lt;/STRONG&gt; and &lt;STRONG&gt;left&lt;/STRONG&gt; to the values you want. I set each value to &lt;STRONG&gt;1&lt;/STRONG&gt; and the units to &lt;STRONG&gt;px&lt;/STRONG&gt;. Click &lt;STRONG&gt;Apply&lt;/STRONG&gt; to see the results.&lt;BR&gt;&lt;BR&gt;&lt;IMG title="Box category in New Style dialog box" style="WIDTH: 400px; HEIGHT: 422px" height=422 alt="Box category in New Style dialog box" src="http://blogs.msdn.com/photos/posts/images/7767575/original.aspx" width=400 mce_src="http://blogs.msdn.com/photos/posts/images/7767575/original.aspx"&gt;&lt;BR&gt;&lt;/LI&gt;
&lt;LI&gt;If you want a border around the buttons, select the &lt;STRONG&gt;Border&lt;/STRONG&gt; category on the left, and set the properties you want on the right. I set &lt;STRONG&gt;border-style&lt;/STRONG&gt; to &lt;STRONG&gt;solid&lt;/STRONG&gt;, &lt;STRONG&gt;border-width&lt;/STRONG&gt; to &lt;STRONG&gt;2px&lt;/STRONG&gt;, and &lt;STRONG&gt;border-color&lt;/STRONG&gt; to &lt;STRONG&gt;#000000&lt;/STRONG&gt;.&lt;BR&gt;&lt;BR&gt;&lt;IMG title="Border category in New Style dialog box" style="WIDTH: 400px; HEIGHT: 429px" height=429 alt="Border category in New Style dialog box" src="http://blogs.msdn.com/photos/posts/images/7767582/original.aspx" width=400 mce_src="http://blogs.msdn.com/photos/posts/images/7767582/original.aspx"&gt;&lt;BR&gt;&lt;/LI&gt;
&lt;LI&gt;We're done with that style, so click &lt;STRONG&gt;OK&lt;/STRONG&gt; to close the dialog box. 
&lt;P&gt;Next, we'll make hyperlinks out of the buttons.&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;Select the text of one of your buttons, press CTRL+K to open the Insert Hyperlink dialog box, enter the URL you want in the &lt;STRONG&gt;Address&lt;/STRONG&gt; text box, and click &lt;STRONG&gt;OK&lt;/STRONG&gt;. Repeat for each button in your navigation menu. Now your text probably looks pretty horrible like mine...we'll fix that next. 
&lt;P&gt;&lt;IMG title="Default appearance of hyperlink text " style="WIDTH: 239px; HEIGHT: 39px" height=39 alt="Default appearance of hyperlink text " src="http://blogs.msdn.com/photos/posts/images/7767589/original.aspx" width=239 mce_src="http://blogs.msdn.com/photos/posts/images/7767589/original.aspx"&gt;&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;On the &lt;STRONG&gt;Format&lt;/STRONG&gt; menu, click &lt;STRONG&gt;New Style&lt;/STRONG&gt;.&lt;BR&gt;&lt;/LI&gt;
&lt;LI&gt;In the New Style dialog box, in the &lt;STRONG&gt;Selector&lt;/STRONG&gt; text box, type &lt;STRONG&gt;#&lt;/STRONG&gt; and the ID of your navigation menu (named in step 4), followed by a space and the letter &lt;STRONG&gt;a&lt;/STRONG&gt; (i.e. for the anchor tag.) For example, I entered &lt;STRONG&gt;#nav_menu a&lt;/STRONG&gt;. With this selector, our style will affect hyperlinks that are within an element with the id nav_menu and won't affect hyperlinks anywhere else in the page.&lt;BR&gt;&lt;/LI&gt;
&lt;LI&gt;Under &lt;STRONG&gt;Category&lt;/STRONG&gt;, select &lt;STRONG&gt;Font&lt;/STRONG&gt;, and then set all the properties you want on the right. I set &lt;STRONG&gt;font-family&lt;/STRONG&gt; to &lt;STRONG&gt;Arial, Helvetica, sans-serif&lt;/STRONG&gt;, &lt;STRONG&gt;color&lt;/STRONG&gt; to &lt;STRONG&gt;#FFFFFF&lt;/STRONG&gt;, and then so the text in my menu isn't underlined, I set &lt;STRONG&gt;text-decoration&lt;/STRONG&gt; to &lt;STRONG&gt;none&lt;/STRONG&gt;.&lt;BR&gt;&lt;BR&gt;&lt;IMG title="Font category in the New Style dialog box" style="WIDTH: 400px; HEIGHT: 428px" height=428 alt="Font category in the New Style dialog box" src="http://blogs.msdn.com/photos/posts/images/7767592/original.aspx" width=400 mce_src="http://blogs.msdn.com/photos/posts/images/7767592/original.aspx"&gt;&lt;BR&gt;&lt;/LI&gt;
&lt;LI&gt;Click &lt;STRONG&gt;OK&lt;/STRONG&gt;. &lt;BR&gt;&lt;BR&gt;Now it's time to create a hover effect so when someone puts their pointer over one of the buttons, the button changes color.&lt;BR&gt;&lt;/LI&gt;
&lt;LI&gt;On the &lt;STRONG&gt;Format&lt;/STRONG&gt; menu, click &lt;STRONG&gt;New Style&lt;/STRONG&gt;.&lt;BR&gt;&lt;/LI&gt;
&lt;LI&gt;In the New Style dialog box, next to &lt;STRONG&gt;Selector&lt;/STRONG&gt;, type &lt;STRONG&gt;# &lt;/STRONG&gt;and the ID of your navigation menu, followed by a space and then &lt;STRONG&gt;li:hover&lt;/STRONG&gt;. In my example, I typed &lt;STRONG&gt;#nav_menu li:hover&lt;/STRONG&gt;.&amp;nbsp;With this selector, the style we create affects any list item (i.e. the li tag) the visitor's pointer is hovering over but only if the list item is in an element that uses the ID "nav_menu". Any other list items on the page&amp;nbsp;aren't affected.&lt;BR&gt;&lt;/LI&gt;
&lt;LI&gt;Select the &lt;STRONG&gt;Background&lt;/STRONG&gt; category, and set the background-color to a different color than the background color of your buttons. I set the &lt;STRONG&gt;background-color&lt;/STRONG&gt; to a pink hue: &lt;STRONG&gt;#FF0066&lt;/STRONG&gt;. You can set other properties too if you want them to change when someone hovers over a button, such as the text color or font.&lt;BR&gt;&lt;BR&gt;&lt;IMG title="Background category in New Style dialog box" style="WIDTH: 400px; HEIGHT: 424px" height=424 alt="Background category in New Style dialog box" src="http://blogs.msdn.com/photos/posts/images/7767595/original.aspx" width=400 mce_src="http://blogs.msdn.com/photos/posts/images/7767595/original.aspx"&gt;&lt;BR&gt;&lt;/LI&gt;
&lt;LI&gt;Click &lt;STRONG&gt;OK&lt;/STRONG&gt;.&lt;BR&gt;&lt;BR&gt;Let's test this in the browser and see what we have...&lt;BR&gt;&lt;/LI&gt;
&lt;LI&gt;Either click the Preview in Browser button in the toolbar or press F12. If you're prompted to save your page, click &lt;STRONG&gt;Yes&lt;/STRONG&gt; to save it. (Here's a bonus tip: if you want to prevent that dialog prompt from appearing and&amp;nbsp;want to automatically save your page whenever you click the Preview in Browser button, then choose &lt;STRONG&gt;File&lt;/STRONG&gt; &amp;gt; &lt;STRONG&gt;Preview in Browser&lt;/STRONG&gt; &amp;gt; &lt;STRONG&gt;Edit Browser List&lt;/STRONG&gt;. In the Edit Browser List dialog box, select the option &lt;B&gt;Automatically save page before previewing&lt;/B&gt; and click &lt;B&gt;OK&lt;/B&gt;.) 
&lt;P&gt;In your browser, notice that when you put your pointer over any of your buttons, the background color changes no matter where your pointer is on the button...this is by design, BUT you can't click the hyperlink unless your pointer is directly over text in a button. We'll fix that next...&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;Open&amp;nbsp;the &lt;STRONG&gt;CSS Properties&lt;/STRONG&gt; task pane. Put your cursor in one of your buttons in your page, and then in the CSS Properties task pane,&amp;nbsp;under &lt;STRONG&gt;Applied Rules&lt;/STRONG&gt;, click the style you created in step 16-17. In my example, the style is &lt;STRONG&gt;#nav_menu a&lt;/STRONG&gt;.&lt;BR&gt;&lt;BR&gt;&lt;IMG title="CSS Properties task pane" style="WIDTH: 272px; HEIGHT: 390px" height=390 alt="CSS Properties task pane" src="http://blogs.msdn.com/photos/posts/images/7767603/original.aspx" width=272 mce_src="http://blogs.msdn.com/photos/posts/images/7767603/original.aspx"&gt;&lt;BR&gt;&lt;/LI&gt;
&lt;LI&gt;In the CSS Properties task pane, locate the property named &lt;STRONG&gt;display&lt;/STRONG&gt; and then set its value to &lt;STRONG&gt;block&lt;/STRONG&gt;. 
&lt;P&gt;&lt;IMG title="CSS Properties task pane" style="WIDTH: 272px; HEIGHT: 389px" height=389 alt="CSS Properties task pane" src="http://blogs.msdn.com/photos/posts/images/7767624/original.aspx" width=272 mce_src="http://blogs.msdn.com/photos/posts/images/7767624/original.aspx"&gt;&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;Save your changes and preview your page in the browser. Each button should now respond as a hyperlink no matter where your pointer is on the button.&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;Here's the final markup from this tutorial:&lt;/P&gt;&lt;PRE&gt;&amp;lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&amp;gt;
&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;
&amp;lt;meta http-equiv="Content-Language" content="en-us" /&amp;gt;
&amp;lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&amp;gt;
&amp;lt;title&amp;gt;Untitled 1&amp;lt;/title&amp;gt;
&amp;lt;style type="text/css"&amp;gt;
#nav_menu li {
&amp;nbsp;border: 2px solid #000000;
&amp;nbsp;list-style-type: none;
&amp;nbsp;float: left;
&amp;nbsp;width: 4em;
&amp;nbsp;background-color: #800080;
&amp;nbsp;text-align: center;
&amp;nbsp;margin-right: 1px;
&amp;nbsp;margin-left: 1px;
}
#nav_menu a {
&amp;nbsp;font-family: Arial, Helvetica, sans-serif;
&amp;nbsp;color: #FFFFFF;
&amp;nbsp;text-decoration: none;
&amp;nbsp;display: block;
}
#nav_menu li:hover {
&amp;nbsp;background-color: #FF0066;
}
&amp;lt;/style&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
&amp;lt;ul id="nav_menu"&amp;gt;
&amp;nbsp; &amp;lt;li&amp;gt; &amp;lt;a target="_blank" href="http://blogs.msdn.com/anna"&amp;gt;one&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt; 
&amp;nbsp; &amp;lt;li&amp;gt; &amp;lt;a target="_blank" href="http://blogs.msdn.com/anna"&amp;gt;two&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt; 
&amp;nbsp; &amp;lt;li&amp;gt; &amp;lt;a target="_blank" href="http://blogs.msdn.com/anna"&amp;gt;three&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt; 
&amp;lt;/ul&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/PRE&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=7757148" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/anna/archive/tags/Expression+Web/default.aspx">Expression Web</category><category domain="http://blogs.msdn.com/anna/archive/tags/CSS/default.aspx">CSS</category><category domain="http://blogs.msdn.com/anna/archive/tags/tutorials/default.aspx">tutorials</category></item></channel></rss>