Bootstrap FreeKB - Visual Studio - CSS
Visual Studio - CSS

Updated:   |  Visual Studio articles

Follow these directions to create the CSS folder and styles.css file.

  1. In Visual Studio, on the right (solution explorer) hover over the name of our site, right-click and select Add > New Folder
  2. Name the new folder CSS
  3. With the CSS folder highlighted press Ctrl + Shift + A (or right click and select Add > New Item)
  4. In the Add New Item pop-up box, select Style Sheet. Name the style sheet (ex. styles.css).  Click Add.
  5. The top menu of Visual Studio should now have a styes.css tab. 

For the purpose of this demonstration, add the following to the styles.css tab.

.text-style {
    font-size: 16px;
    color: #ddd;
    font-weight: 600;
}

 

Follow these directions to apply the text-style CSS to some text on your site.

  1. On a page which you want to use CSS, add the following to the HEAD.
<link href="css/styles.css" rel="stylesheet" type="text/css" media="screen" />
  1. Add text-style to a div.
<div class="text-style">This is a test</div>

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 52a11b in the box below so that we can be sure you are a human.