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.

CSS drop down menu not quite working properly

Featured Replies

I am trying to use a basic css drop down menu as it would allow me to add pages to my site easily and expand it in the future with no real problems. I found a nice script but some of the things I can't get quite placed how I want them.



  • I am trying to move the slider right up against the nav bar, I am sure I put a massive padding bottom on something when I was playing around with it.
  • The nav menu doesn't overlap the slider, would using stack overflows be away around this.
  • I am also trying to move the social network buttons in line with the nav bar.
  • The links don't center despite me using margin 0x auto; through out the nav links
  • When I move onto subcategories the main link disappears
  • I was also trying to make the black line go right up the side of the links not begin half way down and stretch too far down.

I have been playing around with it for hours and its not too far away but I couldn't get round these obstacles.



The site is www.cherrietestingwebsite.org



Thanks.

Can you post your source code on the forum, so we can have a better look at it ;)

Hi,

 

Instate of using negative values you can use display block and display none.

You might also want to give the top 40px, because your menu has a height of 40px.

 

.dd_menu ul	{
	position: absolute; 
	display: none
	list-style-type:none;
	padding-bottom: 20px;
}

.dd_menu li:hover	{
	position: relative;
}

.dd_menu li:hover ul 	{
        display: block;
        left:0px;
	top:40px;  
	padding:3px; 
	width:140px;
}

 

You can use display inline-block for your social buttons:

#socialbuttons {
   display: inline-block;
   width: 200px;
   height: 28px;
   background-color: ffffff;
   float: left;
}	
      

 

 

Good luck

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.