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.

Need a bit of help with a CSS menu

Featured Replies

Hi everyone,

 

Great forum with by the looks of it some very helpful members!

 

I'm having a bit of trouble with a CSS menu of mine. I integrated a CSS drop down menu into my template (admittedly I don't have a great deal of knowledge when it comes to coding!)

 

Unfortunately it moves the two links that are aligned to the right down a bit (as you can see from the two images below.

 

Menu.pngIt should look like the bottom one, so all on one line. (the picture may be aligned wrong as it was a paint jobby!!)

 

 

My CSS coding looks like the below

 

#nav {
	width:100%;
	background:#02384a url(images/bg_nav.png) repeat-x top;
	height:35px;
}

ul#navigation:after {
    content:'';
    display:block;
    clear:both;
 }
 
ul#navigation ul {
    position:absolute;
    display:none;
    float:none;
    right:auto;
    left:-4px;
    width:auto;
    border-top:0;
    white-space:nowrap;
    background-color:white;
	border:1px solid rgb(204,204,204);
 }
 
ul#navigation ul li{
    float:none;
    left:auto;
    margin:0 4px;
 }
 
ul#navigation li:hover ul {
    display:block;
	width:150px;
 }
 
ul#navigation a:hover {
    border-radius:15px;
 }
 
ul#navigation {
	width:940px;
	margin:0 auto;
	padding:0 0 0 20px;
	color:#fff;
	font-weight:bold;
	
	    position:relative;
    float:right;
    right:50%;
    margin:0;
    list-style-type:none;
}
ul#navigation li {
	float:left;
	margin-right:20px;
	font-size:14px;
	height:35px;
	line-height:2.4em;
	
	    position:relative;
    left:50%;
}
ul#navigation li a {
	color:#FFF;
	text-decoration:none;
	outline:none;
	
	  	  display:block;
}
ul#navigation ul li a {
	color:#333;
	text-decoration:none;
	outline:none;
	
	    display:block;
}
ul#navigation li a:hover {
	color:#3FB2D2;
}

#home li.navhome a, #hosting li.navhosting a, #domains li.navdomains a, #about li.navabout a, #order li.navorder a {
	color:#fff;
}
ul#navigation li.right {
	float:right;
	margin:0;
	padding-right:20px;
}
ul#navigation li.right img {
	float:left;
	padding:9px 5px 0 0;
}

Bit of a mess, I know! Sorry about that!

Could anyone help?

 

Thanks in advance :)

Ryan

  • Author

Think I've fixed this myself by removing...

	  	  display:block;

from ul#navigation li a

 

Hopefully this doesn't come back in the future!!

 

Thanks anyway :)

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.