<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Brendan </title>
    <description>The latest articles on DEV Community by Brendan  (@brendan_frasser).</description>
    <link>https://dev.to/brendan_frasser</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1190213%2F0774edfd-5201-46f1-ab6a-5ca179d509b3.png</url>
      <title>DEV Community: Brendan </title>
      <link>https://dev.to/brendan_frasser</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/brendan_frasser"/>
    <language>en</language>
    <item>
      <title>Understanding CSS: Advantages and Disadvantages of Inline, Internal, and External Styles</title>
      <dc:creator>Brendan </dc:creator>
      <pubDate>Sat, 22 Jun 2024 12:56:48 +0000</pubDate>
      <link>https://dev.to/brendan_frasser/understanding-css-advantages-and-disadvantages-of-inline-internal-and-external-styles-glk</link>
      <guid>https://dev.to/brendan_frasser/understanding-css-advantages-and-disadvantages-of-inline-internal-and-external-styles-glk</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What is CSS
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;CSS, also known as cascading style sheet, is one of the core technologies of the web.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;CSS is used to describe the visual style and presentation of the page. It consists of countless properties that developers can use to format (edit) the content of a web page.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can write CSS in three places: inline CSS, internal CSS, and external CSS. Today, we'll look at their advantages and disadvantages.&lt;/p&gt;

&lt;h2&gt;
  
  
  Inline CSS
&lt;/h2&gt;

&lt;p&gt;Inline CSS applies CSS styles directly into the HTML code using the style attribute. For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;p&lt;/span&gt; &lt;span class="na"&gt;style=&lt;/span&gt;&lt;span class="s"&gt;"color: blue; font-size: 14px;"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;This is a styled paragraph.&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Advantages of Inline CSS
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;An advantage of using inline CSS is the ease with which you can style a particular web page component, or, in other words, specificity. This ability to change the styling of any specific element ties into its next advantage.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Inline CSS makes testing a style or changing a particular style on a webpage effortless.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;One of the most significant advantages of inline CSS is that it doesn't require external files or links. This advantage means you can streamline the development process as all the code is within the HTML code. This feature makes it very useful when working on small projects.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Disadvantages of Inline CSS
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;A significant disadvantage of using inline CSS is managing the code as a project gets bigger and bigger. With different styles scattered throughout the HTML, editing the webpage or making global changes becomes more complicated and bug-prone because each element that needs a style change/update must be searched for and changed manually.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Another disadvantage is increased repetition when multiple elements in the HTML need the same styling. Since developers have to style each component manually, they repeat the same CSS code, making the code large and complex to read, increasing the likelihood of bugs.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Internal CSS
&lt;/h2&gt;

&lt;p&gt;Internal CSS is a way of applying CSS to a webpage that involves using a style tag in the head section of the HTML file. For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;  
&lt;span class="nt"&gt;&amp;lt;html&lt;/span&gt; &lt;span class="na"&gt;lang=&lt;/span&gt;&lt;span class="s"&gt;"en"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;  
&lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;  
&lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;charset=&lt;/span&gt;&lt;span class="s"&gt;"UTF-8"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;  
&lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"viewport"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"width=device-width, initial-scale=1.0"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;  
&lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;Internal CSS Example&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;  
&lt;span class="nt"&gt;&amp;lt;style&amp;gt;&lt;/span&gt;  
&lt;span class="nt"&gt;body&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;  
&lt;span class="nl"&gt;font-family&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Arial&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;sans-serif&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;  
&lt;span class="p"&gt;}&lt;/span&gt;  
&lt;span class="nt"&gt;h1&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;  
&lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;blue&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;  
&lt;span class="p"&gt;}&lt;/span&gt;  
&lt;span class="nt"&gt;p&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;  
&lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;14px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;  
&lt;span class="p"&gt;}&lt;/span&gt;  
&lt;span class="nt"&gt;&amp;lt;/style&amp;gt;&lt;/span&gt;  
&lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;  
&lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;  
&lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;Welcome to My Website&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;  
&lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;This is an example of internal CSS.&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;  
&lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;  
&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This method allows you to edit and modify the style and feel of the page without needing an external file for the CSS.&lt;/p&gt;

&lt;h3&gt;
  
  
  Advantages of Internal CSS
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;When using internal CSS, the styles are confined to the specific page, which helps avoid conflicts with styles on other pages. This approach guarantees that the CSS rules defined within the style tag in the head section apply only to that document. As a result, developers can specify the styling of individual pages without worrying about unintended side effects on other parts of the website, making internal CSS a convenient choice for page-specific customizations.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Another advantage of internal CSS that ties into the previous one is it provides greater control and customization of the individual pages of a website.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Another advantage of internal CSS is that it can contribute to faster page loading times, as no additional HTTP requests are needed to fetch an external stylesheet.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Disadvantages of Inline CSS
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;A significant disadvantage of internal CSS is the duplication of styles across multiple HTML files. Each HTML file must have a separate style section with the same CSS code when different pages need the same style. This repetition not only increases the overall size of the website but also complicates maintenance since any changes to the styles must be done manually in every file. This disadvantage can lead to inconsistencies and a higher chance of errors, making internal CSS less efficient for larger websites that require uniform styling across multiple pages.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Another notable disadvantage of internal CSS is the increased HTML file size. Adding styles directly within the style tag in each HTML document's head section increases the overall file size, especially if there are large or complex styles. This disadvantage can lead to longer load times for users with slower internet connections.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  External CSS
&lt;/h2&gt;

&lt;p&gt;External CSS involves styling in a separate .css file and linking it to an HTML document using the link tag in the head section. This way of writing CSS promotes the reusability of styles and better organization across multiple pages. An example of what your HTML code will look like is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;  
&lt;span class="nt"&gt;&amp;lt;html&lt;/span&gt; &lt;span class="na"&gt;lang=&lt;/span&gt;&lt;span class="s"&gt;"en"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;  
&lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;  
&lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;charset=&lt;/span&gt;&lt;span class="s"&gt;"UTF-8"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;  
&lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"viewport"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"width=device-width, initial-scale=1.0"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;  
&lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;External CSS Example&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;  
&lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"stylesheet"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"styles.css"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;  
&lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;  
&lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;  
&lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;Welcome to My Website&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;  
&lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;This is an example of external CSS.&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;  
&lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;  
&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;



&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;An&lt;/span&gt; &lt;span class="nt"&gt;example&lt;/span&gt; &lt;span class="nt"&gt;of&lt;/span&gt; &lt;span class="nt"&gt;the&lt;/span&gt; &lt;span class="nt"&gt;CSS&lt;/span&gt; &lt;span class="nt"&gt;is&lt;/span&gt; &lt;span class="o"&gt;:&lt;/span&gt;

&lt;span class="nt"&gt;body&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;  
&lt;span class="nl"&gt;font-family&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Arial&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;sans-serif&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;  
&lt;span class="p"&gt;}&lt;/span&gt;  
&lt;span class="nt"&gt;h1&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;  
&lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;blue&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;  
&lt;span class="p"&gt;}&lt;/span&gt;  
&lt;span class="nt"&gt;p&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;  
&lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;14px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;  
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Advantages of external CSS
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;A significant advantage of external CSS is its reusability, as a single stylesheet can be linked across multiple web pages, significantly reducing repetition and redundancy. This means that common styles only need to be defined once in an external .css file, which you can then link to any number of HTML documents. This advantage makes development more streamlined and makes things like site-wide updates much more straightforward and efficient.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A vital performance advantage of external CSS is that it uses browser caching to improve loading times after the initial visit. When a user first visits a website, the external stylesheet is downloaded and stored in the browser cache. On subsequent visits, the browser can quickly retrieve the cached CSS file rather than downloading it again, significantly reducing load times.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Disadvantages of Inline CSS
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;  A disadvantage of external CSS is its reliance on additional HTTP requests to load the stylesheet. Each time a web page is accessed, the browser must fetch the external CSS file, which can cause a delay, especially on slower networks or if the server hosting the stylesheet is under heavy load. The webpage may render without styles if the CSS file fails to load due to network issues or server errors.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Choosing The Right Approach
&lt;/h2&gt;

&lt;p&gt;There are multiple factors to consider when considering what CSS type to use when working on a project, as there is no one-size-fits-all way of looking at it. Some of these factors are&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Project Size:&lt;br&gt;&lt;br&gt;
More extensive projects benefit from external CSS for better management and scalability.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Complexity:&lt;br&gt;&lt;br&gt;
Complex designs are easier to handle with external CSS due to all the styling taking place in one place.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Performance Needs:&lt;br&gt;&lt;br&gt;
Inline and internal CSS can be quicker for small, simple pages, while external CSS leverages caching for repeated visits.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The appropriate type of CSS depends on the project's size and specific needs. For small web pages, inline or internal CSS is enough. External CSS, however, is best for large, multi-page websites.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Implementing a Responsive Navigation Menu for an E-commerce Website with CSS Flexbox</title>
      <dc:creator>Brendan </dc:creator>
      <pubDate>Fri, 29 Dec 2023 22:09:46 +0000</pubDate>
      <link>https://dev.to/brendan_frasser/implementing-a-responsive-navigation-menu-for-an-e-commerce-website-with-css-flexbox-3ak9</link>
      <guid>https://dev.to/brendan_frasser/implementing-a-responsive-navigation-menu-for-an-e-commerce-website-with-css-flexbox-3ak9</guid>
      <description>&lt;h2&gt;
  
  
  &lt;strong&gt;Prerequisites&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;To follow along with this tutorial, you need to have:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;An understanding of &lt;a href="https://www.w3schools.com/html/html_editors.asp"&gt;how to set up a html file&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;An understanding of &lt;a href="https://blog.hubspot.com/website/what-is-css-class"&gt;class names and pseudo-selectors&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;An understanding of the &lt;a href="https://www.w3schools.com/css/css_link.asp"&gt;four states of a link&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Introduction: An Overview of CSS Flexbox&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Before we get started on how to build responsive navigation, we need to define what Flexbox is, some of its essential terminologies, and finally, a critical overview of some of its properties.&lt;/p&gt;

&lt;p&gt;Flexbox is a set of related CSS properties used in building one-dimensional layouts. The main idea is that the space inside of a container element can be automatically divided by its child elements. Flexbox makes it easy to align items inside a parent container vertically and horizontally. With this, it solves some widespread CSS problems, such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;vertical centering&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;creating equal-height columns&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Some Important Terminologies in Flexbox:&lt;/strong&gt;
&lt;/h3&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Flex Container:&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;This is the element on which we want to use Flexbox. All that’s needed to turn an element into the flex container is to set its display properties to flex, i.e., &lt;strong&gt;display: flex.&lt;/strong&gt;. When this is done, all the direct child components are elements within the flex container. It will become &lt;strong&gt;flex-items&lt;/strong&gt;. Also, it is essential to note that the flex container and flex items have different properties that can be applied to them.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Main Axis:&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;This is referred to as the direction in which the flex items are laid out. It is usually in a horizontal direction, going from left to right.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Cross Axis:&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;It is the alignment of flex items perpendicular to the central axis. For context, it goes from top to bottom. It is important to remember these names and their definitions since the direction of the central and cross-axis can be changed.&lt;/p&gt;

&lt;p&gt;Before we move to creating the Nav, I'll give you an overview of some properties of both the flex container and the flex items.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Flex Container Properties:&lt;/strong&gt;
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Gap: This is to create space between the flex items without using a margin.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Justify-content: This is to align flex items along the main axis (horizontally by default).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Align-items: This aligns items along the cross-axis (vertically by default).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Flex direction: This defines the direction of the main axis.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Flex items properties:&lt;/strong&gt;
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Align-self: is to overwrite align items for individual flex items&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Flex grow: This is used to allow an element to grow.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Flex-shrink: It is used to make an element shrink.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;HTML Structure of the Navigation bar&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;You must do a few things in HTML to create a navigation menu. The first thing is to use the nav elements &lt;code&gt;&amp;lt;nav&amp;gt;&amp;lt;/nav&amp;gt;&lt;/code&gt; (with class name “main-nav”) as this is where your navigation menu would be found. Then, the next step and the most semantically sound way of building a navigation would be to use a list with the navigation links side to side. So for the list, we will create an unordered list using the ul element ( &lt;code&gt;&amp;lt;ul&amp;gt;&amp;lt;/ul&amp;gt;&lt;/code&gt; ) with the class name &lt;code&gt;main-nav-list&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;If done correctly, it would look like this: &lt;code&gt;&amp;lt;ul class="main-nav-list"&amp;gt;&amp;lt;/ul&amp;gt;&lt;/code&gt;. After this is done, you will fill the list element with list item elements (&lt;code&gt;&amp;lt;li&amp;gt;&amp;lt;/li&amp;gt;&lt;/code&gt;), each containing an anchor element (&lt;code&gt;&amp;lt;a&amp;gt;&amp;lt;/a&amp;gt;&lt;/code&gt;). To understand, it would look like &lt;code&gt;&amp;lt;ul class="main-nav-list"&amp;gt; &amp;lt;li&amp;gt; &amp;lt;a href="#"&amp;gt; &amp;lt;a/&amp;gt; Section 1 &amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The # in the previous code indicates that the link leads nowhere, and the content of section one is for a single navigation item; more often than not, the navigation usually has multiple links.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;After writing the first li item, you would copy and paste the code as often as needed. when done, your list will look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;li&amp;gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"main-nav-link"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"#"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt; Section 1&lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;li&amp;gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"main-nav-link"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"#"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt; Section 2&lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;li&amp;gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"main-nav-link"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"#"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt; Section 2&lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;li&amp;gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"main-nav-link"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"#"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt; Section 3&lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;li&amp;gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"main-nav-link"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"#"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt; Section 4&lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;li&amp;gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"main-nav-link nav-cta"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"#"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt; Section 5&lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;/ul&amp;gt;&lt;/span&gt;.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, you need to remove the bullet points and make each li element appear side by side.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;CSS Structure of the Navigation bar&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;After setting up the HTML, it's time to code the CSS of the navigation bar. So the first thing to do in your CSS file is to select the &lt;code&gt;class="main-nav-link&lt;/code&gt;. This is done by adding a dot to the class name, i.e., &lt;code&gt;.main-nav-link&lt;/code&gt;. And now, to remove the list styling or the dots at the back of the nav list items, you simply use the list-style formatting in CSS and specify none. This should look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.main-nav-list&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

&lt;span class="nl"&gt;list-style&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;none&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After this, to make them appear side by side, you need to use flexbox, in this case, the &lt;code&gt;display:flex&lt;/code&gt; property. This would look like this :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.main-nav-list&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="nl"&gt;list-style&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;none&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;flex&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now that the two major problems have been solved, it's time to focus on some styling. The first thing would be to use the gap property to create space between the list items. An ideal gap between the list items would be 32 px(pixels). The updated code should look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.main-nav-list&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="nl"&gt;list-style&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;none&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;flex&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="py"&gt;gap&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;32px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And now, to style the link or anchor (a) elements in the list, you need to give each of them the same class name that would be used in CSS, which would be the ‘main-nav-link’. So the anchor elements would look like this:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;a class="main-nav-link" href="#"&amp;gt; Section 1&amp;lt;/a&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;After adding class names to the Li elements, the first step is to select the link and the visited states of the link using pseudo-classes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.main-nav-link&lt;/span&gt; &lt;span class="nd"&gt;:link&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;
&lt;span class="nc"&gt;.main-nav-link&lt;/span&gt; &lt;span class="nd"&gt;:visited&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Start by removing the text decorations, and do this by using text-decoration set to none. That is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.main-nav-link&lt;/span&gt;&lt;span class="nd"&gt;:link&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;
&lt;span class="nc"&gt;.main-nav-link&lt;/span&gt;&lt;span class="nd"&gt;:visited&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="nl"&gt;text-decoration&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;none&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The next step would be to set the color of the text to any one of your choice using a "color" selector and then specify whatever color you want. Then, you choose the size of the fonts using the "font-size" selector:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.main-nav-link&lt;/span&gt;&lt;span class="nd"&gt;:link&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;
&lt;span class="nc"&gt;.main-nav-link&lt;/span&gt;&lt;span class="nd"&gt;:visited&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="nl"&gt;text-decoration&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;none&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#333&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;18px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Since you are building a navigation bar for an e-commerce website, you need it to be as appealing as possible. Thus, you need the navigation to draw some attention. An easy way to do this would be to bolden the text on the navigation using the "font-weight" selector and, from personal preference, set it to 500. That is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.main-nav-link&lt;/span&gt;&lt;span class="nd"&gt;:link&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;
&lt;span class="nc"&gt;.main-nav-link&lt;/span&gt;&lt;span class="nd"&gt;:visited&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="nl"&gt;text-decoration&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;none&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nl"&gt;font-weight&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="m"&gt;500&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#333&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;18px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Another trick to increase the appeal of the navigation would be to use the "transition" selector to specify how long it would take to switch from the styling of the link and visited states to the styling of the hover and active state:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.main-nav-link&lt;/span&gt;&lt;span class="nd"&gt;:link&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;
&lt;span class="nc"&gt;.main-nav-link&lt;/span&gt;&lt;span class="nd"&gt;:visited&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="nl"&gt;text-decoration&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;none&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nl"&gt;font-weight&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="m"&gt;500&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#333&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;18px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nl"&gt;transition&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;all&lt;/span&gt; &lt;span class="m"&gt;0.3s&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;The 'all' used in the transition property indicates you want all elements with the class name where the transition property is put to transition in the stated amount of time.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;After this is done, the next step is to select the hover and active states using pseudo-classes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.main-nav-link&lt;/span&gt;&lt;span class="nd"&gt;:hover&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;
&lt;span class="nc"&gt;.main-nav-link&lt;/span&gt;&lt;span class="nd"&gt;:active&lt;/span&gt;&lt;span class="p"&gt;{}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These states can then be styled depending on what you need for your projects. For example, we can give its hover state a different color entirely (basically, when the mouse hovers above the link, it changes color to what you set it to be). It would look something like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.main-nav-link&lt;/span&gt;&lt;span class="nd"&gt;:hover&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;
&lt;span class="nc"&gt;.main-nav-link&lt;/span&gt;&lt;span class="nd"&gt;:active&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#cf711f&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is all you need to build a navigation, but for e-commerce websites, you should add this trick to push traffic, which is to add a call to action button in the navigation.&lt;/p&gt;

&lt;p&gt;So, to do this, firstly, you will need to add a new class name to one of the links in the nav. It is advisable to make the last link the call to action button. So this would look something like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;li&amp;gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"main-nav-link nav-cta"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"#"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt; Section 5&lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, in the CSS, you would select the nav-cta class and style it to be a button and to do that. You give it some padding, a background color, some border radius to make the edges look a little rounded (do this based on preference) and a few other things.&lt;/p&gt;

&lt;p&gt;Here it is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.nav-cta&lt;/span&gt;&lt;span class="nd"&gt;:link&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;
&lt;span class="nc"&gt;.nav-cta&lt;/span&gt;&lt;span class="nd"&gt;:visited&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1.2rem&lt;/span&gt; &lt;span class="m"&gt;2.4rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nl"&gt;border-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;9px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#fff&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#e67e22&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Since the padding needs to be applied, you must make the nav elements into in-line block elements. For this, you need to add the &lt;code&gt;display:in-line block&lt;/code&gt; to the CSS code of the nav, basically:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.main-nav-link&lt;/span&gt;&lt;span class="nd"&gt;:link&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;
&lt;span class="nc"&gt;.main-nav-link&lt;/span&gt;&lt;span class="nd"&gt;:visited&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="n"&gt;in-line&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nl"&gt;text-decoration&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;none&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nl"&gt;font-weight&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="m"&gt;500&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#333&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;18px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nl"&gt;transition&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;all&lt;/span&gt; &lt;span class="m"&gt;0.3s&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And lastly, as with the links in the nav, you need to style the hover and active states of the button.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.nav-cta&lt;/span&gt;&lt;span class="nd"&gt;:hover&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;
&lt;span class="nc"&gt;.nav-cta&lt;/span&gt;&lt;span class="nd"&gt;:active&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#cf711f&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As for the colors used, the two colors for the button are different shades of orange. The link and visited are lighter, and the hover and active states have darker shades.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;In this tutorial, you created a navigation bar for an E-commerce website and learned a trick for making it generate more traffic by adding a call to action button on one of the links. If you follow through correctly, this will teach you everything you need to know about navigation bars.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
