Simple Website Design using HTML and CSS

Simple Website Design using HTML and CSS
Simple Website Design using HTML and CSS
Welcome Friends, In this blog, we will learn how to create a Simple Website layout Design using HTML and CSS. Earlier I have shared a blog on how to Create a Simple Accordion Design using only HTML and CSS. In this tutorial of Simple Website Design layout, I have used plain HTML and CSS.

In this blog, you will learn how to make a simple looking website using html5 and css3. In addition to the blog, I will give you access to the source code that I am going to be using to use it in your project. Together we will build this simple looking website, and by doing that, you will learn some necessary skills of html5 and css3 like how to use fonts, images, navigations, some basic animations, etc.


The above video is showing the finished version of the website on the website's homepage, where I have created a simple-looking navbar with a font-awesome icon in it. When we hover over the nav item, the background, and color, the anchor element will change. When we click over the nav item, it will take to the associated page with a slow transition effect. For the five pages (home, about, portfolio, services, and contact), I have taken five div and named them with a unique id. I also linked the respective pages in the navbar so that it can take us to that particular page when we click on it.

You may also like:
In the CSS part, I have discarded the document's document's default padding and margin. Thus, I have provided the padding and margin to 0. I used lato as the default font fort he projects. Then i have given the box div a width of 100% and a height of 100vh. Then i provided a relative position and 100% height value to all the div inside the box id. for the content class, I used absolute position value and transform property to bring all the items of content class in the middle. I also provided text-align property to get the content center of the viewport. After that, I did some necessary styling for all the elements in the content class. For the navbar, I want it to be fixed when we will scroll down the page, so I have given it absolute position value and provided a z-index value to remain on the top of the content. After that, I have decorated the navbar with some necessary styling. I have added a font-awesome icon to the left side of each nav-item. I used the font-awesome 4.7.0 CDN version and added that in my HTML file.  I have also added a deep pink background color for the nav-item hover effect. I have given a background image for the homepage, but I have provided a whitish background color for the rest of the section.

Simple Website Layout Design (Source Code)

To create this snippet, you need to create two files. One of them is an HTML file, and another one is the CSS file. After that, you need to copy the HTML and CSS code and paste it to the appropriate files and save them.

HTML:




CSS:




I hope you liked it. Please feel free to leave a comment. Thank you for stopping by in this blog.

2 Comments

Please do not enter any spam link in the comment box.

  1. wow ... thanks for the code

    ReplyDelete
  2. Good stuff. I spent a few hours creating a web site based on your code, with different image, colours, content. It works fine on Firefox on my Mac, fine on Chrome on my Android phone, but goes to pieces in Edge on Windows 10. The 'div' sections do not align with the browser window. Any idea why? I have had to take down the actual site, but there is a copy on my web server at https://westnab.com/riverside/

    ReplyDelete

Post a Comment

Please do not enter any spam link in the comment box.

Post a Comment

Previous Post Next Post