Share via


Tip #68 Did you know… How simple it is to attach an existing style sheet to your web page?

Open an existing web site in VWD. Open the page by double clicking on it in solution explorer to which you want to attach the existing style sheet in your web site.

Now, switch to Design View of the page and bring up Select Style Sheet dialog by clicking on menu: Format –> Attach Style Sheet  as shown below.

Attach StyleSheet

Click the OK button and this will add a link to the Style sheet that you selected in the Select Style Sheet dialog. Now you can make use of all the styles described in this style sheet.

 <head runat="server">
    <title>Untitled Page</title>
    <link href="StyleSheet.css" rel="stylesheet" type="text/css" />
</head></PRE< P> 

Alternatively, you can just switch the page to which you want to add the link and Drag Drop the style sheet from solution explorer to the page in which you want to make use of the styles. The drag drop action adds the above piece of code to source view.

Reshmi Mangalore

SDET, Visual Web Developer

Comments

  • Anonymous
    May 31, 2009
    PingBack from http://www.anith.com/?p=43130

  • Anonymous
    May 31, 2009
    Thank you for submitting this cool story - Trackback from DotNetShoutout