03.11.2016 Views

Beginning ASP.NET 4.5 in CSharp and VB Opsylum

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Work<strong>in</strong>g with CSS <strong>in</strong> Visual Studio x 101<br />

FIGURE 3-27<br />

7. From the ma<strong>in</strong> menu, choose View Í Manage Styles. Aga<strong>in</strong>,<br />

make sure the w<strong>in</strong>dow is placed beside the Document<br />

W<strong>in</strong>dow <strong>and</strong> not docked <strong>in</strong> the Document W<strong>in</strong>dow. Under the<br />

Current Page item, locate the .Introduction selector.<br />

8. Click the .Introduction selector once, <strong>and</strong> then drag it <strong>in</strong>to<br />

the area for Styles.css, for example dropp<strong>in</strong>g it after the h1<br />

selector. Note that VS draws l<strong>in</strong>es between the selectors as you<br />

hover over them to <strong>in</strong>dicate the po<strong>in</strong>t where the selector will<br />

end up. Figure 3-28 shows how the .Introduction selector is<br />

dragged from the current page <strong>in</strong>to Styles.css, between the<br />

h1 <strong>and</strong> #PageWrapper selectors.<br />

9. Once you drop the selector <strong>in</strong> the Styles.css section of the<br />

Manage Styles w<strong>in</strong>dow, the associated style is removed from<br />

your current page, <strong>and</strong> then <strong>in</strong>serted <strong>in</strong> Styles.css. Because<br />

that CSS file is <strong>in</strong>cluded <strong>in</strong> your current page us<strong>in</strong>g the element, you won’t see a difference <strong>in</strong> Design View. You<br />

can now remove the empty element from Default<br />

.aspx, because it’s not needed anymore.<br />

FIGURE 3-28

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!