473,406 Members | 2,467 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Can't get the menu horizontal

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/t...ages/test2.png

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

Jul 1 '08 #1
3 1420
In article <g4**********@aioe.org>, "©®" <n0**@n0ne.comwrote:
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
Jul 2 '08 #2
"©®" <n0**@n0ne.comwrites:
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.
Jul 2 '08 #3
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....
Thanks very much - it worked!
Jul 2 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: elad | last post by:
Hi The Menu doesn't work properly when I have 2 frame and the Menu popup frame=document target frame, when I choose item in the menu the doc opened and the menu get stuck. Here is the code...
2
by: Ansgar Hein | last post by:
I have been playing around with several different versions for a horizontal menu, but I haven't been able to build a horizontal navigation based on the vertical one featured on www.alistapart.com...
8
by: Posting2002 | last post by:
Hi, I am trying to create the following: http://www.ece.uwaterloo.ca/~dbusuioc/site/menu_submenu.htm So far it's in Javascript and when you're going over the top buttons in the menu, it...
4
by: Yuk Cheng | last post by:
<<<start index.htm>>> <html> <head> <script> function perform(action){ } </script> </head>
13
by: Matthew Hagston | last post by:
Trying to do some updating and beyond frustrations with making it compatibal with Mac's I am primarily done. Biggest problem I am having now is with Opera not displaying the menu. works fine in IE,...
2
by: Stephen | last post by:
Hi How can I remove the "black arrow" on the sub menu when in the horizontal position? i.e. User hovers over Products - which opens sub menu Computers > Floppy Disks > I've looked through...
1
by: camphor | last post by:
hi, I have a single column webpage with a horizontal dropdown menu and am trying to make the nav bar fit across the page, the column is 800px, it looks ok in dreamweaver 8 but when I test it in...
5
Haitashi
by: Haitashi | last post by:
Hello everyone: I have a CFMenu with the type set to horizontal. I'd like to have the sub-menu items open vertically. Is that possible? Here is my code. I want the Portals sub-menu (Portal A,...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.