Create A Cool Layout Using CSS
Make money for being or staying online/internet.

You will get a $5 starting gift when you join using this link:: GET THE OFFER NOW!!

Css is every web designer's favorite styling language to create layouts, graphics, shapes among others. To make it, even more, cooler it's very simple to learn, Yeah you heard me right, It's simple to learn.

To be more specific, in this tutorial I concentrated more on the shapes. With CSS shapes it enables us to flow content around circles, polygons, masks, ellipse, and other shapes.

In this post, I will share you with the youtube tutorial source code and also explain some of the CSS properties that I used to come up with such layout or effect.

Tutorial
The clip-path Property

The clip-path CSS property creates a clipping region that sets what part of an element should be shown. Parts that are inside the region are shown, while those outside are hidden.

The shape-outside Property

The shape-outside CSS property defines a shape—which may be non-rectangular—around which adjacent inline content should wrap.

HTML

Please note you can use this code in any project that you want, so the markup that i used in the tutorial was just for the layout(it's your choice, your limit). The main focus is on the styling file.

copy

<div class="container">

    <div class="info">
      <img src="uganda.jpg" alt="uganda">
      <div class="content">
        <h1>Happy Independence 9th October 2020</h1>
        <p>Place your content here</p>
      </div>
    </div>

 </div>

CSS code
copy

/*This code is just for centering the content in the middle of the page*/
body{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
}
/*End here*/

/*Giving the container equal width both on the left & right side*/
.container{
  max-width: 80%;
  margin:0 auto;
}
/*Ends here*/

/*This is where the magic happens.*/
.info img{
  float:left;
  margin-right:.1rem;
  margin-bottom:.2rem;

  clip-path: circle(35% at 50% 50%);
  shape-outside: circle();
}

@media screen and (max-width: 684px){
  .info img{
    float:none;
    clip-path: none;
  }
}

Download the project files from my Github repo.

Save up to 80% with this Domain & Shared Hosting package deal! 80% OFF - GET OFFER NOW

Related Post(s)

» Learn how to use CSS box shadow property - Source Code

» Animated Social Media Icons Using Font Awesome and Materialize CSS

» Creating A Pure CSS Preloader - Source Code

» Overriding The Default Text Selection Color With CSS

» Learn how to create Gradient Backgrounds using CSS

collections_bookmark Category :: Css
date_range Published :: 2 years ago At: 05:23 PM
event_note Detailed Date :: Oct 09th, 2020
person Writer :: Code
  • RECENT POSTS
1 year ago

A JavaScript library for formatting and manipulating numbers - Numeral.js

Check out this lightweight JavaScript library used for formatting and manipulating numbers.


1 year ago

All Countries Drop Down List | HTML Select Country Name

This simple country dropdown list is freely available for you to copy and use in your project forms.


1 year ago

HTML Entities Code Alphabet Discovery Using JavaScript

In this post I will show how writing just a few lines in JavaScript will allow you to render, browse and discover the alphabetical letters using a set of HTML entity codes.


1 year ago

YTS YIFY MOVIES API - PROJECT PREVIEW

Download YTS YIFY movies using this simple project I created using their API.


1 year ago

Display Random Advice On Your Website or Web App Using Advice Slip JSON API

Here is a short project to display the use of APIs. I decided to work with an advice API because it seemed like a fun one that I haven't worked on before.


1 year ago

How do I get a YouTube video thumbnail from YouTube using PHP

Have you ever been on youtube and admired a thumbnail of a video?


1 year ago

How to recreate Facebook's console warning

When I was inspecting some code on Facebook. I came across this interesting feature. A simple styled console warning message from Facebook to its dear users(products).


2 years ago

How To Create A Stacked Gallery Using HTML And CSS Source Code

In this post I provide you with the source code for the youtube tutorial I made on how to create a Stacked image gallery Using HTML and CSS.


Subscribe
  • ADVERTISEMENT

YOU MAY LIKE THESE POSTS

share