Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

How would I code this?

Featured Replies

Hello! This is my first post, and so i'm guessing you probably will think i'm just here for answers.. but I do plan on becoming active here! Anyways I already designed a navigation bar for my site via Photoshop, but I don't know how to turn it into a working HTML/CSS/JavaScript & jQuery code to make it do what I want it to do.

 

Here is my idea:

 

I want it to stay to the right of the screen at all times. Even when scrolling. I believe that's the position: fixed; CSS code.

[spoiler=Concept]

What it will look like by default:

lwefzG5.png

When Hovered Over:

FbeF1Qg.png

 

Selection When Hovered Over:

bh52riv.png

 

 

 

Any tips will do!

 

 

 

Hi mate,

 

Not posted for ages been settling into hk, something along these lines should surfice, u will have to expand the code.

 

The HTML

 

<div class="navigation fixed">
	<a id="logo" href="/"><span class="icon-full"></span></a>
    <!-- MAIN NAV -->
 	<ul class="nav_main">
	<li><a class="home" href="#">link</a></li>
        <li><a class="about" href="#">link</a></li>
        <li><a class="contact" href="#">link</a></li>
 	</ul>
    <!-- SOCIAL SECTION -->
    <ul class="nav_social">
	<li><a class="facebook" href="#">link</a></li>
        <li><a class="twitter" href="#">link</a></li>
        <li><a class="google" href="#">link</a></li>
    </ul>
</div>

You will need to assign the icons for each link via css including the logo and all social links:

.home {
    background: ('../images/home-sprite.png') no-repeat center center;
    height:50px;
    width:50px;
    display:block;
    overflow:Hidden;
    background-size:100%
    background-position:0 0;
}
.home:hover {
	/* This move the background up 50px */
	background-position:0 -50px;
}

 

to show the content on hover you will need to something like this

/* Content u want to hide by default */
.content {
     display:none;
}
/* show hidden content on navigation bar :hover */
.navigation:hover > .content {
    display:block;
}

You can assign the logo image to the span element inside #logo, by default set it to display:none; and just include it in the above code: .navigation:hover > span.icon-full { display:block }

 

these are the basics to get your navigation working :)

 

EDIT: i forgot to show how to fix to the right..

 

.fixed {
position:fixed;
right:0;
top:0;
bottom:0;
width:100px;
z-index:999
}
  • 4 weeks later...

I would use a css fixed position and then just use some jquery .mouseover and .animate for the hover. Hope this helps :)

Edited by 4li4s

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.