Bootstrap One-Page Web Design #Part9 [Tutorial]

in #utopian-io7 years ago (edited)

Bootstrap

Build responsive, mobile-first projects on the web with the world's most popular front-end component library. Bootstrap is an open source toolkit for developing with HTML, CSS, and JS. Quickly prototype your ideas or build your entire app with our Sass variables and mixins, responsive grid system, extensive prebuilt components, and powerful plugins built on jQuery.

Source



Bootstrap Logo
Image Source


What Will I Learn?
- We will be informed about font awesome.
- We will code our services section appropriately to our design.

Requirements
- Brackets (Website)
- Intermediate code knowledge
- Basic HTML and CSS knowledge

Difficulty
- Intermediate

Curriculum

Part 1: Bootstrap One-Page Web Design #Part1 [Turkish Tutorial]
Part 2: Bootstrap One-Page Web Design #Part2 [Turkish Tutorial]
Part 3: Bootstrap One-Page Web Design #Part3 [Turkish Tutorial]
Part 4: Bootstrap One-Page Web Design #Part4 [Turkish Tutorial]
Part 5: Bootstrap One-Page Web Design #Part5 [Turkish Tutorial]
Part 6: Bootstrap One-Page Web Design #Part6 [Turkish Tutorial]
Part 7: Bootstrap One-Page Web Design #Part7 [Turkish Tutorial]
Part 8: Bootstrap One-Page Web Design #Part8 [Tutorial]
Part 9: You are now here.




Tutorial Contents


In our previous lesson, we added a slide section to our design. While adding the slide section, we used Bootstrap's Documentation page effectively.

What Have We Learned?

  • We learned to add a simple slide that consists of image transitions.
  • By adding an indicator to our slide, we learned to switch between images manually.
  • We learned to add captions to each image on the slide.
  • We created our slide and put it in a container and changed the background color to black.

Now let's start coding our services section of our design.
Our services section looks like this:

1.png

Let's start by coding our index.html page.

Create a section tag containing our Services section.

<section id="services">
</section>

Here we have defined the section id. As we mentioned in our previous lesson, with this id, we will link the Services section to the navigation menu.

Let's keep coding. Now we have to create a container inside the section tag.

<section id="services">
      <div class="container">
      </div>
</section>

When we look at our design, our Services section is made up of two parts. In the first part we have our Services headline and subtitle. In the second part, we see a structure consisting of three columns.

How can we code these two parts?


Method 1: We create two rows in the container. We can divide the second row into three columns.


Method 2: We can code the first part and the second part in separate div classes.


In this lesson we will apply the second method.


Let's write the following code inside the container class:

<section id="services">
      <div class="container">
          <div class="services-top">
                <h3>SERVICES</h3>
                <p>Proin iaculis purus consequat sem cure.</p>
            </div>
      </div>
</section>

Here we have created the first part. We have added a header and a paragraph into the services-top class.

Let's save our codes and check our page.

2.png

If you want, we can delete the services-top class and look at the view of our page.
Change the codes like this.

<section id="services">
      <div class="container">
                <h3>SERVICES</h3>
                <p>Proin iaculis purus consequat sem cure.</p>
            </div>
</section>

Let's save our codes and check our page.

3.png

There was no change as you see it. Why did we define our header and our paragraph in the services-top class? The answer is simple.

When you look at our design you can see the headings and paragraphs at many different points. Even in the Services section, where we are now coding, you can see headings and paragraphs in the marked parts of the photo.

4.png

When coding our design, we first define the div class, so we will assign different properties to different headings and paragraphs. For example, in Services section, we want the paragraph under the heading to be italic, while we do not want it in the paragraphs below. To provide this, we will define it in a different div class. Let's make our old code and save it.

Let's coding the second part of our Services section.

5.png

We will start by creating a div class called services-content and define a row class inside it.
As you can see in the photo, we will split a row into three equal columns and fill each column with similar content.

<section id="services">
      <div class="container">
          <div class="services-top">
                <h3>SERVICES</h3>
                <p>Proin iaculis purus consequat sem cure.</p>
           </div>
          <div class="services-content">
                <div class="row">
                </div>
           </div>
      </div>
</section>

We have created our row class. Using the information we learned in our previous lessons, we will divide a row into three columns. As you will remember, a row in Bootstrap consists of twelve columns. We will use the col-md-4 class for the three columns we want. (12/3 = 4)
Let's add our codes.

<section id="services">
      <div class="container">
          <div class="services-top">
                <h3>SERVICES</h3>
                <p>Proin iaculis purus consequat sem cure.</p>
           </div>
          <div class="services-content">
                <div class="row">
                   <div class="col-md-4">
                   </div>
                   <div class="col-md-4">
                   </div>
                   <div class="col-md-4">
                   </div>
                </div>
           </div>
      </div>
</section>

Our general code structure was formed. Now let's get our content. Note that each section has one icon, one title and one paragraph. We'll get the icons from Font Awesome. We will coding the circle which they are in.

Let's start by getting our icons and placing them. We click the Font Awesome web page.

Font Awesome Free is free, open source, and GPL friendly. You can use it for commercial projects, open source projects, or really almost whatever you want. Source

In the page that opens, we click on the Icons link.

6.png

This is our first icon:

Screenshot_3.png

You will see the code we need to add if you scroll on the page.

Screenshot_4.png

Let's start coding our first column.

<div class="item-circle">
</div>

We added our first div tag. Let's paste the code of our icon in the picture above.

<div class="item-circle">
    <i class="fas fa-shopping-cart"></i>
</div>

Then let's code our heading and paragraph. Place these codes right under our icon codes.

<h4>E-Commerce</h4>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Minima maxime quam architecto quo inventore harum ex magni, dicta impedit.</p>

The final version of our codes should be as follows:

<section id="services">
          <div class="container">
            <div class="services-top">
                <h3>SERVICES</h3>
                <p>Proin iaculis purus consequat sem cure.</p>
            </div>
              
            <div class="services-content">
                <div class="row">
                    <div class="col-md-4">
                        <div class="item-circle">
                            <i class="fas fa-shopping-cart"></i>
                        </div>
                        <h4>E-Commerce</h4>
                        <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Minima maxime quam architecto quo inventore harum ex magni, dicta impedit.</p>
                    </div>
                    
                    <div class="col-md-4">
                        
                    </div>
                    
                    <div class="col-md-4">
                        
                    </div> 
                </div>
            </div>
          </div>     
      </section>

Let's save our codes and check our page.

Screenshot_5.png

Yes, our icon is attached, but it's a bit small. We want our icon in the size seen in the picture.

Screenshot_6.png

We add the fa-3x class to our icon as shown in the picture. <i class="fas fa-shopping-cart fa-3x"></i>

7.png

Let's save our codes and check our page.

Screenshot_7.png

It has gained quite a nice view. Now let's shape our icon. Open main.css file. And start editing.

We can write our css codes in the form of i.fas {} because our icon gets the class fas in the i tag. Let's write our codes first and then explain each one.

i.fas {
    color: white;
    background: #fed136;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    text-align: center;
    line-height: 100px;
    vertical-align: middle;
}

What did we do here?


First we defined our icons in white color. We also organized the icon's background color as the main color of our web page (#fed136).


Secondly we got our icon in a circle. And we positioned it in the middle of the circle.


Let's save our codes and check our page.

Screenshot_9.png

That seems nice. Now let's go to our main.html file and copy all the code in the first column and paste into the other two columns. Edit the headings and paragraphs.Find the icons as below and add their codes.

9.png

10.png

The final version of our codes should be as follows:

<div class="services-content">
                <div class="row">
                    <div class="col-md-4">
                        <div class="item-circle">
                            <i class="fas fa-shopping-cart fa-3x"></i>
                        </div>
                        <h4>E-Commerce</h4>
                        <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Minima maxime quam architecto quo inventore harum ex magni, dicta impedit.</p>
                    </div>
                    
                    <div class="col-md-4">
                        <div class="item-circle">
                            <i class="fas fa-laptop fa-3x"></i>
                        </div>
                        <h4>Responsive Design</h4>
                        <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Minima maxime quam architecto quo inventore harum ex magni, dicta impedit.</p>
                    </div>
                    
                    <div class="col-md-4">
                        <div class="item-circle">
                            <i class="fas fa-lock fa-3x"></i>
                        </div>
                        <h4>Web Security</h4>
                        <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Minima maxime quam architecto quo inventore harum ex magni, dicta impedit.</p>
                    </div> 
                </div>
            </div>

Let's save our codes and check our page.

Screenshot_10.png

Now open main.css file. We will write our codes first and then explain each one.

#services {
    padding: 120px 0;
}

We defined the value of padding as 120 pixel from top and 0 pixel from bottom.

.services-top h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 40px;
    font-weight: 700;
}

We set the font of the header h3 class in the services-top class as Montserrat. We set the font size to 40 pixel and set the font to bold.

.services-top p {
    font-family: 'Droid Serif', serif;
    font-size: 16px;
    font-style: italic;
    color: #777;
    margin-bottom: 70px;
}

We set the font of the paragraph p class in the services-top class as Droid Serif. We set the font size to 16 pixel and set the font color to #777. Margin-bottom has set to 70 pixel. And also font style is italic.

.services-content h4 {
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #222;
    margin-top: 24px;
}

We set the font of the header h4 class in the services-content class as Montserrat. We set the font size to 18 pixel, set the font to bold and set the font color to #222. Margin-top has set to 24 pixel.

.services-content p {
    font-family: 'Roboto Slab', serif;
    font-size: 14px;
    color: #777;
}

We set the font of the paragraph p class in the services-content class as Roboto Slab. We set the font size to 14 pixel and set the font color to #777.


We have linked our fonts to our index.html file in our previous lessons.

<link href="https://fonts.googleapis.com/css?family=Droid+Serif:400,400i" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto+Slab" rel="stylesheet">

Finally, in our index.html file, we will add the text-center class to containerclass in services section and center all content.

Screenshot_11.png

Let's save our codes and check our page.

Screenshot_12.png

It looks pretty good. Let's look at the Responsive feature. Reduce the screen size.

Screenshot_13.png

Screenshot_14.png

Screenshot_15.png

We will arrange our responsive features in the future, but even now it looks good.
We came to the end of this part of our education. Thank you for your interest.



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Thank you for the contribution. It has been approved.

You can contact us on Discord.
[utopian-moderator]

Hey @neokuduk I am @utopian-io. I have just upvoted you!

Achievements

  • Seems like you contribute quite often. AMAZING!

Suggestions

  • Contribute more often to get higher and higher rewards. I wish to see you often!
  • Work on your followers to increase the votes/rewards. I follow what humans do and my vote is mainly based on that. Good luck!

Get Noticed!

  • Did you know project owners can manually vote with their own voting power or by voting power delegated to their projects? Ask the project owner to review your contributions!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x

Congratulations! This post has been upvoted from the communal account, @minnowsupport, by neokuduk from the Minnow Support Project. It's a witness project run by aggroed, ausbitbank, teamsteem, theprophet0, someguy123, neoxian, followbtcnews, and netuoso. The goal is to help Steemit grow by supporting Minnows. Please find us at the Peace, Abundance, and Liberty Network (PALnet) Discord Channel. It's a completely public and open space to all members of the Steemit community who voluntarily choose to be there.

If you would like to delegate to the Minnow Support Project you can do so by clicking on the following links: 50SP, 100SP, 250SP, 500SP, 1000SP, 5000SP.
Be sure to leave at least 50SP undelegated on your account.

The second step is to decide which style https://astra-motion.com/about-us/ suits your brand. You can use either complex art direction or simple, minimalist visuals to make a lasting impression. Keep in mind that the style of the video will depend on the audience you are targeting. The best video production and animation partners will collaborate with you to come up with the best solution.

Coin Marketplace

STEEM 0.18
TRX 0.15
JST 0.029
BTC 62260.20
ETH 2431.98
USDT 1.00
SBD 2.64