You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<metaname="description" content="Full Stack Python shows how an entire Python web application is built and deployed. Each section of the guide explains a different key concept, from the server through the Python WSGI web framework to the front end JavaScript.">
<p>A Cascading Style Sheet (CSS) files contain rules for how to display and
78
+
lay out the HTML content when it is rendered by a web browser.</p>
79
+
<h2>Why is CSS necessary?</h2>
80
+
<p>CSS separates content contained in the HTML file from how the content
81
+
should be displayed. That separation between content and how to display it
82
+
enables devices to render the content differently based on factors such as
83
+
screen size. For example, a mobile device does not have as much space to
84
+
display a navigation bar on the side of a page so it is often pushed down
85
+
below the main content. The
86
+
<ahref="http://getbootstrap.com/examples/blog/">Bootstrap Blog example</a>
87
+
shows that scenario when you resize the browser width.</p>
88
+
<h2>How is CSS retrieved from the web server?</h2>
89
+
<p>The HTML file sent by the web server contains a reference to the CSS file(s)
90
+
needed to render the content. The web browser requests the CSS file after the
91
+
HTML file as shown below in a screenshot captured of the Chrome Web Developer
92
+
Tools network traffic.</p>
93
+
<p><imgsrc="theme/img/css-chrome-dev-tools.jpg" width="100%" alt="Google Chrome Web Developer Tools shows how CSS is separate from the HTML content." class="technical-diagram" /></p>
94
+
<p>That request for the fsp.css file is made because the HTML file for Full
95
+
Stack Python contains a reference to <code>theme/css/fsp.css</code> which is shown
96
+
in the view source screenshot below.</p>
97
+
<p><imgsrc="theme/img/fsp-css-source.jpg" width="100%" alt="View source screenshot for the fsp.css file in index.html." class="technical-diagram" /></p>
0 commit comments