473,385 Members | 1,780 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,385 software developers and data experts.

Menu query

I have a text based and css controlled horizontal menu where on hover the
text and "button/cell" background colour change.
Fine so far, the background colour fills the button.
However if one of the menu buttons has two lines of text, while the hover
background colour does fill that menu button, the other buttons, which are
now in taller buttons, only have a strip of hover background colour which
does not extend to the top and bottom of the button.
Is there a way of dealing with this so that the hover colour fills the
button regardless of the height of the container?
Or some alternative method of achieving the same result.
I would expect that many have encountered this problem, but it is a first
for me.
Thanks for any help/ideas.
Brian Tozer
May 6 '06 #1
3 1463

"KiwiBrian" <br******@ihug.co.nz> wrote in message
news:e3**********@lust.ihug.co.nz...
I have a text based and css controlled horizontal menu where on hover the
text and "button/cell" background colour change.
Fine so far, the background colour fills the button.
However if one of the menu buttons has two lines of text, while the hover
background colour does fill that menu button, the other buttons, which are
now in taller buttons, only have a strip of hover background colour which
does not extend to the top and bottom of the button.
Is there a way of dealing with this so that the hover colour fills the
button regardless of the height of the container?
Or some alternative method of achieving the same result.
I would expect that many have encountered this problem, but it is a first
for me.
Thanks for any help/ideas.
Brian Tozer

Oops, here is my link control CSS

..link1 A {
font-family: arial;
font-size: 13px;
font-weight: bold;
background-color: #310031;
color: #F4DCA2;
text-decoration: none;
display: block;
width: 100%;
}

..link1 A:hover {
color: #000000;
background-color: #CC9933;
}
May 6 '06 #2
On Sat, 6 May 2006 18:46:20 +1200 KiwiBrian <br******@ihug.co.nz> wrote:
|
| "KiwiBrian" <br******@ihug.co.nz> wrote in message
| news:e3**********@lust.ihug.co.nz...
|>I have a text based and css controlled horizontal menu where on hover the
|>text and "button/cell" background colour change.
|> Fine so far, the background colour fills the button.
|> However if one of the menu buttons has two lines of text, while the hover
|> background colour does fill that menu button, the other buttons, which are
|> now in taller buttons, only have a strip of hover background colour which
|> does not extend to the top and bottom of the button.
|> Is there a way of dealing with this so that the hover colour fills the
|> button regardless of the height of the container?
|> Or some alternative method of achieving the same result.
|> I would expect that many have encountered this problem, but it is a first
|> for me.
|> Thanks for any help/ideas.
|> Brian Tozer
|
|
| Oops, here is my link control CSS
|
| .link1 A {
| font-family: arial;
| font-size: 13px;
| font-weight: bold;
| background-color: #310031;
| color: #F4DCA2;
| text-decoration: none;
| display: block;
| width: 100%;
| }
|
| .link1 A:hover {
| color: #000000;
| background-color: #CC9933;
| }

That's because the A element itself is not filling the box when the box is
forced larger because another button has 2 lines of text. Move the pointer
to the area above or below that strip that isn't being colored and you will
see that the color reverts back even though the pointer is still inside the
box you are making a button of.

You would have to apply these properties to the box itself. But since IE
does not support :hover for other than an A element (so I am told, and at
least for IE 6), it won't work right in IE unless a way can be found to do
a box using an A element. I tried that for another idea I was working on
a few days ago and it didn't work. But maybe your simpler case might.

What is the HTML element you're using to surround each button and what CSS
do you have for that?

--
-----------------------------------------------------------------------------
| Phil Howard KA9WGN | http://linuxhomepage.com/ http://ham.org/ |
| (first name) at ipal.net | http://phil.ipal.org/ http://ka9wgn.ham.org/ |
-----------------------------------------------------------------------------
May 6 '06 #3
Hi Phil.
Thanks for your help.
I solved it by adding 8 pixels of vertical padding to the pseudoclass
applied to the links with the unwrapped (one line) text entries.
73s
Brian ex ZL1ACE and ZL2BV

<ph**************@ipal.net> wrote in message
news:e3*********@news3.newsguy.com...
On Sat, 6 May 2006 18:46:20 +1200 KiwiBrian <br******@ihug.co.nz> wrote:
|
| "KiwiBrian" <br******@ihug.co.nz> wrote in message
| news:e3**********@lust.ihug.co.nz...
|>I have a text based and css controlled horizontal menu where on hover
the
|>text and "button/cell" background colour change.
|> Fine so far, the background colour fills the button.
|> However if one of the menu buttons has two lines of text, while the
hover
|> background colour does fill that menu button, the other buttons, which
are
|> now in taller buttons, only have a strip of hover background colour
which
|> does not extend to the top and bottom of the button.
|> Is there a way of dealing with this so that the hover colour fills the
|> button regardless of the height of the container?
|> Or some alternative method of achieving the same result.
|> I would expect that many have encountered this problem, but it is a
first
|> for me.
|> Thanks for any help/ideas.
|> Brian Tozer
|
|
| Oops, here is my link control CSS
|
| .link1 A {
| font-family: arial;
| font-size: 13px;
| font-weight: bold;
| background-color: #310031;
| color: #F4DCA2;
| text-decoration: none;
| display: block;
| width: 100%;
| }
|
| .link1 A:hover {
| color: #000000;
| background-color: #CC9933;
| }

That's because the A element itself is not filling the box when the box is
forced larger because another button has 2 lines of text. Move the
pointer
to the area above or below that strip that isn't being colored and you
will
see that the color reverts back even though the pointer is still inside
the
box you are making a button of.

You would have to apply these properties to the box itself. But since IE
does not support :hover for other than an A element (so I am told, and at
least for IE 6), it won't work right in IE unless a way can be found to do
a box using an A element. I tried that for another idea I was working on
a few days ago and it didn't work. But maybe your simpler case might.

What is the HTML element you're using to surround each button and what CSS
do you have for that?

--
-----------------------------------------------------------------------------
| Phil Howard KA9WGN | http://linuxhomepage.com/
http://ham.org/ |
| (first name) at ipal.net | http://phil.ipal.org/
http://ka9wgn.ham.org/ |
-----------------------------------------------------------------------------


May 7 '06 #4

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

Similar topics

4
by: dr. zoidberg | last post by:
Hello, I'm creating simple menu. MySQL: +----+-----+----------------------+ | id | sid | Title | +----+-----+----------------------+ | 1 | 0 | Main Menu 1 | 2 | 0 | Main Menu 2 | ...
2
by: Jorntk | last post by:
How can I make a drop down menu that are dynamically generated base on the value selected in another drop down menu? values in both menu will need to be from mysql query.
3
by: hmiller | last post by:
Hey everyone, I am having a hell of a time trying to set this menu system up. Here's what I'm trying to do. Combo Box One; is populated by names under properties "row source" "Phase 1"...
9
by: john | last post by:
In Paradox I was able to create popup menu's in which some of the items had popup menu's themselves. I've looked for threads on popup menu's and access but I can't find how to make a simple popup...
2
by: Boujii | last post by:
Greetings, I have been attempting to make a drop down menu of countries. From this menu I wish to create a variable in order to INPUT into mysql database. I have no trouble making the drop down menu,...
3
by: php_mysql_beginer911 | last post by:
Hi am not very good in php so looking for someone who could give some suggections ... i am trying to make a Menu where i can make Sub Menu and also i can make any number of sub Menu under any...
3
by: SQLjunky | last post by:
Hello, Contrary to what my screen name indicates, i'm actually quite new to SQL. Having said that, I'll get right into my problem. I'm trying to query an mssql database to return to the value...
3
by: Poggs | last post by:
Hi everyone, I used the pattern for Shell Extensions for Context menu from Dino Esposito's article. However I implemented it in more than one application and it seems that those two right click...
4
by: TechnoAtif | last post by:
Hi ALL I have entered some array values using checkboxes into mysql database through a form. Next iam creating a searchpage where all those cateogories inserted through checkboxes has to be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.