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.

Help with inline menu

Featured Replies

hey all, im trying to create an inline menu, that when you hover over it, a bg image is there. yes it works, but the bg image isnt the same size as the one i set it too. Long story cut short, the image has been rescaled...

 

this is what i get. 100% zoom:

 

post-19873-069644400 1291327052_thumb.png

 

And this is the original image size:

 

post-19873-078612300 1291327081_thumb.png

 

And this is my code:

 

HTML:

 

<div id="banner">
<div id="logo">
<a href="index.html"><img src="images/logo.png" border="0" /></a>
</div>
<div id="links">
<ul>
<li class="home"><a href="index.html">Home</a></li>
<li class="about"><a href="aboutme.html">About Me</a></li>
<li class="portfolio"><a href="portfolio.html">Portfolio</a></li>
<li class="web"><a href="webdevelopment.html">Web Development</a></li>
<li class="contact"><a href="contactme.html">Contact Me</a></li>
</ul>
</div>
</div>

 

CSS:

 

body {
margin: 0 auto;
background-image: url(images/background.jpg);
background-repeat: repeat;
}
#banner {
margin-top: 10px;
margin-left: auto;
margin-right: auto;
width: 1000px;
height: 43px;
}
#logo {
width: 300px;
height: 43px;
float: left;
}
#links {
float: right;
width: 699px;
height: 43px;
}
#links ul li {
display: inline;
}
#links ul li {
height: 43px;
width: 65px;
margin-right: 10px;
}
li.current {
color: #fff;
}
li.home a:link {
font-family: verdana;
color: #2a2a2a;
text-decoration: none;
font-size: 11px;
height: 43px;
width: 65px;
text-align: center middle;
}
li.home a:hover{
width: 65px;
height: 43px;
background-image: url(images/nav-home.png);
background-position: center;
background-repeat: no-repeat;
}

#links a {
   display: block;
   float: left;
   line-height: 24px;
   margin: 0 10px 0 0;
   text-align: center;
}
li.home a:link {
   color: #2A2A2A;
   font-family: verdana;
   font-size: 11px;
   height: 43px;
   text-decoration: none;
   width: 53px;
}
li.home a:hover{ 
background-image: url(images/nav-home.png);
background-repeat: no-repeat; 
}

#links a {
   display: block;
   float: left;
   line-height: 24px;
   margin: 0 10px 0 0;
   text-align: center;
}
li.home a:link {
   color: #2A2A2A;
   font-family: verdana;
   font-size: 11px;
   height: 43px;
   text-decoration: none;
   width: 53px;
}
li.home a:hover{ 
background-image: url(images/nav-home.png);
background-repeat: no-repeat; 
}

 

This is how you do it. ^

 

It needs to be a display:block; and then float it left to make it inline.

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.