css sliding navigation buttons

How we can create sliding buttons using HTML & CSS? Solution: CSS Sliding Navigation Buttons On Hover, Pure HTML CSS Slide Button.

There are many types of navigation buttons, you can see on websites. I think a navigation button has a hover effect surely because nowadays everyone focuses on good UI. How many types of navigation buttons can you create, that completely depends on your creativity. I can just show you some examples.

Today you will learn how to create a basic sliding nav buttons. In other words, pure HTML & CSS sliding buttons reveal on hover.  I know this is very simple to create, but beginners can’t create this easily that’s why I am sharing this. Also, a person on facebook asks me to create this, that is also a reason.

So today I am sharing CSS Sliding Navigation Buttons on hover effect. As I told this the easiest one to create & understand. These buttons have not any icons if you want to create this with icons, then see my Social Share Floating Buttons example. You will get an idea of how to place icons perfectly.

If you are thinking now how this buttons actually is, then see the preview given below. As I told before, this is a very basic one so its not contain any unique feature.

Preview Of Pure HTML CSS  Slide Nav Button

See this video preview to getting an idea of how these sliding buttons look like.

Now you can see this visually. If you like this, then get the source code of its.

You May Also Like:

CSS Sliding Navigation Buttons Source Code

Before sharing source code, let’s talk about it. I created a div and heading inside hyperlink, that looks like this: <a> <div> <h1> </h1> </div></a>.  Put the same code 4 times with different IDs, 4 times because I created 4 navigation buttons. I put hyperlinks because of this a nav button, in there we have definitely to put links.

I gave the div 400px width and 30 pixels border-radius. In first we have to small buttons, that why I put left: -335px to hide it. After that, on hover,I put the width 500px with 0 border-radius, & left: -50px. Now our buttons expand on hover then the heading text appears. I also put the 0.7s transition (get info) to give some animation effect.

That is the whole concept and things, Beginners will get this too easily. Also, I put some other properties like giving style to heading text, a shadow on hover, etc. Get the codes because there is nothing to explain more.

To creating these sliding buttons you have to create just 2 files. One for HTML & one for CSS. Follow the steps to creating this without any error.

index.html

Create an HTML file named ‘index.html‘ and put these codes given here below.

style.css

Now create a CSS file named ‘style.css‘ and put these codes.

That’s It. Now you have successfully created CSS Sliding Navigation Buttons on hover. In short, Pure HTML CSS Button With Slide Effect. If you have any doubt or question comment down below.

Thanks For Visiting, Keep Visiting. 

3 COMMENTS

LEAVE A REPLY

Please enter your comment!
Please enter your name here