Sign In | Register Now About Bytes | Help | Site Map
Connecting Tech Pros Worldwide

Can't get the menu horizontal

Question posted by: ©® (Guest) on July 1st, 2008 09:05 PM
I am trying a CSS rollover tutorial
(http://www.elated.com/articles/css-rollover-buttons/) and it is working
nicely but I can't get it
to be horizontal.

My CSS looks like this:
---
#gallery
{
display: block;
width: 48px;
height: 48px;
background: url("images/rollovers/gallery.gif") no-repeat 0 0;
}

#gallery:hover
{
background-position: 0 -48px;
}

#gallery span
{
display: none;
}

#contact
{
display: block;
width: 48px;
height: 48px;
background: url("images/rollovers/contact.gif") no-repeat 0 0;
}

#contact:hover
{
background-position: 0 -48px;
}

#contact span
{
display: none;
}
---

and my html looks like this:
---
<p>
<a id="gallery" href="#" title="Gallery"><span>Gallery</span&g
t;</a>
<br>
<a id="contact" href="#" title="Contact"><span>Contact us</span></a>
</p>
---


Here is a test link:
http://www.flipside.co.uk/~cwlinde/test/test.html but I want the buttons
to the left and right of each other - not on top of each other, like
this:
http://www.flipside.co.uk/~cwlinde/...mages/test2.png

The solution's most probably staring me right in the face but I am
stuck! Help!



dorayme's Avatar
dorayme
Guest
n/a Posts
July 2nd, 2008
12:45 AM
#2

Re: Can't get the menu horizontal
In article <g4e5rt$qbj$1@aioe.org>, "©®" <n0ne@n0ne.comwrote:
Quote:
I am trying a CSS rollover tutorial
(http://www.elated.com/articles/css-rollover-buttons/) and it is working
nicely but I can't get it
to be horizontal.
>
My CSS looks like this:


Here is something from the dorayme dirty tricks factory which is open
this morning for the next few minutes:

Try

<p style="float: left;"><a id="gallery" href="#"
title="Gallery"><span>Gallery</span></a></p>

<p style="float: left;margin-top: -5px"><a id="contact" href="#"
title="Contact"><span>Contact
us</span></a></p>

<p style="clear:left;"><font face="'Lucida Sans Unicode', Tahoma,
Verdana, Verdana, Arial, Helvetica, sans-serif" size="-1">Lorem....

--
dorayme

Ben Bacarisse's Avatar
Ben Bacarisse
Guest
n/a Posts
July 2nd, 2008
12:55 AM
#3

Re: Can't get the menu horizontal
"©®" <n0ne@n0ne.comwrites:
Quote:
I am trying a CSS rollover tutorial
(http://www.elated.com/articles/css-rollover-buttons/) and it is working
nicely but I can't get it
to be horizontal.


You need to find another tutorial, this time about menus. The usual
method is to float each item left.

--
Ben.

©®'s Avatar
©®
Guest
n/a Posts
July 2nd, 2008
03:45 AM
#4

Re: Can't get the menu horizontal
Try
Quote:
>
<p style="float: left;"><a id="gallery" href="#"
title="Gallery"><span>Gallery</span></a></p>
>
<p style="float: left;margin-top: -5px"><a id="contact" href="#"
title="Contact"><span>Contact
us</span></a></p>
>
<p style="clear:left;"><font face="'Lucida Sans Unicode', Tahoma,
Verdana, Verdana, Arial, Helvetica, sans-serif" size="-1">Lorem....


Thanks very much - it worked!



 
Not the answer you were looking for? Post your question . . .
190,473 Experts ready to help you find a solution.
Sign up for a free account, or Login (if you're already a member).

Latest Articles: Read & Comment
  • Didn't find the answer you were looking for?
    Post Your Question
  • Top Community Contributors