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.

Inconsistencies in menu display

Featured Replies

I have a basic inline menu which displays different in Chrome and Firefox.

 

- In Chrome, the menu displays at the top of a defined div

 

- In Firefox, the menu displays much lower down.

 

Can anyone help me make this display consistently.

 

My html is:-

 

<div id="menu-wrap" class="eightcol last">
        		<div class="menu">
            		<ul id="menu">
            			<li class="about"><a href="http://www.charlyanderson.co.uk/home" class="pink" rel="slideto">About Me</a></li>
						<li class="services"><a href="http://www.charlyanderson.co.uk/website-services" class="green" rel="slideto">Services</a></li>
                		<li class="portfolio"><a href="http://www.charlyanderson.co.uk/portfolio" class="blue" rel="slideto">Portfolio</a></li>
						<li class="blog"><a href="http://www.charlyanderson.co.uk/blog" class="pink" rel="slideto">Blog</a></li>
						<li class="contact"><a href="http://www.charlyanderson.co.uk/contact" class="green" rel="slideto">Contact</a></li>
					</ul>
       			</div>
        	</div><!--/Menu-Wrap-->

My Css Is:-

 

#menu-wrap{height:50px; padding-top:15px;}
.menu{color:#FFF; float:right;}
.menu ul li{float:left; text-transform:uppercase; font-family: Helvetica; font-size:12px; margin:0 0 0 28px; padding:0 0 10px}
.menu ul li.active{color:#6a1e58;}
.menu ul li.active a{color:#ed1e79;}
.menu ul li a{color:#acacac;}
.menu ul li a:hover.pink{color:#ed1e79;}
.menu ul li a:hover.green{color:#8cc63f;}
.menu ul li a:hover.blue{color:#00a99d;}
.menu ul li a:hover{padding:0 0 10px;}

 

Can anyone help?

Edited by Charly

In localhost they render exactly the same for me, you may need to provide your entire code for this section of your site (I'm guessing the top section), including any elements this nav bar is located near. Also - study up on the purposes of classes and IDs, you seem to have mixed and matched. :p

Same for me. Your codes dispay the same in Firefox and IE9. Perhaps some other part of your code or styles is affecting Firefox.

 

throzen said "Also - study up on the purposes of classes and IDs, you seem to have mixed and matched." I don't think they cause a problem in your case because you don't have any styles for #menu (perhaps you intended to).

 

It's a good idea not to use the same name for id and class as you may get confused.

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.