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

My menu bar is dancing around

290 100+
Hi,

I been working on my editor bar and still have two problems.

One is that when you run your curser over the images,
the whole bar starts "dancing".

Go here to take a look: dancing bar

Can you see what is making it do that ?

The other problem I have is the color selector.
First - I can not get it positioned in line with the images.

Second - I don't know how to set the foreground color.
presently its gray but I want it the same as background color.

If you can help with any of these problems would most appreciate it.

Here is my css code:


Expand|Select|Wrap|Line Numbers
  1. /*
  2. *  Editor Styles
  3. */
  4.  
  5. .my_editor {
  6.   width: 600px;
  7.     background: #E1E1E2;
  8.     border: 1px solid #000;
  9.     margin: 10px 300px 10px 110px;
  10.     float:left;
  11. }
  12.  
  13. .imgbtn {
  14.     background: #E1E1E2;
  15.     margin: 10px 0 4px 0;
  16. /*    border: 1px solid #000; */    
  17. }
  18.  
  19. .editor {
  20.   background: #E1E1E2;
  21.     padding: 10px 0 0px 10px;
  22.     float:left;
  23. }
  24.  
  25. .select{
  26. margin-top:-10px;
  27. }
  28.  
  29. .imgbtn:hover{
  30.     background: #cff;
  31.     border: 1px solid #33f;
  32. }
  33.  
  34. .sptr {
  35.     background: #E1E1E2;
  36.     margin: 4px 0 4px 0;
  37. }
  38.  
Many thanks
Jan 24 '09 #1
6 2303
drhowarddrfine
7,435 Expert 4TB
121 HTML errors
1 CSS error
Jan 24 '09 #2
serdar
88
Two solutions for your 'dancing bar' problem which is caused by the image borders set on hover state.

Solution 1:
Expand|Select|Wrap|Line Numbers
  1. .imgbtn {
  2.     background: #E1E1E2;
  3.     margin: 10px 0 4px 0;
  4.     padding:1px;
  5. }
  6.  
  7. .imgbtn:hover{
  8.     background: #cff;
  9.     border: 1px solid #33f;
  10.     padding:0px;    
  11. }
Solution 2:
Expand|Select|Wrap|Line Numbers
  1. .imgbtn {
  2.     background: #E1E1E2;
  3.     margin: 10px 0 4px 0;
  4.     border: 1px solid #E1E1E2;
  5. }
  6.  
  7. .imgbtn:hover{
  8.     background: #cff;
  9.     border: 1px solid #33f;    
  10. }
  11.  
For your alignment problem; add

Expand|Select|Wrap|Line Numbers
  1. {float:left; padding-top:10px;} 
in these classes: editor, imgbtn, sptr, select

Finally for your third problem:

I don't know how to set the foreground color.
presently its gray but I want it the same as background color.
Do you want to set the text color or the background color when you hover an option? Please clarify.

Posts merged by Moderator - Post your response in one post; it is unnecessary to use 3 separate posts.
Jan 24 '09 #3
jeddiki
290 100+
The background color.

Basically I want the color to remain the same whether hover or not.
Each select option is a different color and when hovered over it doesn't need to change color.
Jan 25 '09 #4
jeddiki
290 100+
I put in those changes to the css

and I now have:
Expand|Select|Wrap|Line Numbers
  1. /*
  2. *  Editor Styles
  3. */
  4.  
  5. .my_editor {
  6.   width: 600px;
  7.     background: #E1E1E2;
  8.     border: 1px solid #000;
  9.     margin: 10px 300px 10px 110px;
  10.     float:left;
  11. }
  12.  
  13.  
  14.  
  15. .imgbtn {
  16.   background: #E1E1E2;
  17.   padding-top:10px;
  18.     float:left;
  19. }
  20.  
  21. .imgbtn:hover{
  22.   background: #cff;
  23.   border: 1px solid #33f;
  24.     float:left;
  25. }
  26.  
  27.  
  28. .editor {
  29.   background: #E1E1E2;
  30.     padding-top:10px;
  31.     float:left;
  32. }
  33.  
  34. .select{
  35.   padding-top:10px;
  36.     float:left;
  37. }
  38.  
  39. .sptr {
  40.     background: #E1E1E2;
  41.     padding-top:10px;
  42.     float:left;
  43. }
  44.  
as you can see here:
Celebrity Membership.

it is still jumping about and the hover state dos'nt look too good.
Jan 25 '09 #5
jeddiki
290 100+
Thanks for all your help,

From your guidance I've now got everything nice except for the
select color. This for some reason chanches to gray when the mouse hovers over the colored areas.

This is the code that I have:

Expand|Select|Wrap|Line Numbers
  1.  <select name="x_color">
  2.      <option style = "background: black;" value = 'black' selected= "selected" >black &nbsp;&nbsp;</option>
  3.      <option style = "background: blue;" value = 'blue' >blue &nbsp;&nbsp;</option>
  4.      <option style = "background: red;" value = 'red' >red &nbsp;&nbsp;</option>
  5.      <option style = "background: green;" value = 'green' >green &nbsp;&nbsp;</option>
  6.     <option style = "background: yellow;" value = 'yellow' >yellow &nbsp;&nbsp;</option>
  7.      <option style = "background: gray;" value = 'gray' >grey &nbsp;&nbsp;</option>
  8.      <option style = "background: white" value = 'white' >white &nbsp;&nbsp;</option>
  9.      <option style = "background: brown;" value = 'brown' >brown &nbsp;&nbsp;</option>
  10.      <option style = "background: orange;" value = 'orange' >orange &nbsp;&nbsp;</option>
  11.     </select></span>     
And the CSS:

Expand|Select|Wrap|Line Numbers
  1. /*
  2. *  Editor Styles
  3. */
  4.  
  5. .my_editor {
  6.   width: 600px;
  7.     background: #E1E1E2;
  8.     border: 1px solid #000;
  9.     margin: 10px 300px 10px 110px;
  10.     float:left;
  11. }
  12.  
  13. .imgbtn {
  14.   background: #E1E1E2;
  15.     margin: 10px 0 4px 0;
  16.     padding:1px;
  17.     float:left;
  18. }
  19.  
  20. .imgbtn:hover{
  21.   background: #cff;
  22.   border: 1px solid #33f;
  23.     padding:0px;
  24. }
  25.  
  26.  
  27. .editor {
  28.   background: #E1E1E2;
  29.     margin:0 10px 0 10px;
  30.     padding-top:12px;
  31.     float:left;
  32. }
  33.  
  34. .select{
  35.   padding-top:10px;
  36.     float:left;
  37. }
  38.  
  39. .sptr {
  40.     background: #E1E1E2;
  41.     padding-top:10px;
  42.     float:left;
  43. }
The problem can be on this page
- look at the color option box

Thanks for any ideas :)


Can any one please help me sort out these color options ?
Jan 25 '09 #6
serdar
88
I'm not sure with this, but you cannot change the background color of a selected option element with CSS because it's the same color when you select a text in your browser and so it's browser specific.
Jan 25 '09 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: JesusFreak | last post by:
From: us_traveller@yahoo.com (JesusFreak) Newsgroups: microsoft.public.scripting.jscript Subject: toolbar script problem NNTP-Posting-Host: 192.92.126.136 Recently, I downloaded the following...
7
by: jt | last post by:
I am new to Javascript and I am having problems with loading a pull down menu. I get this error: javax.servlet.ServletException: No data found It will list the items just fine if I just list...
7
by: cefrancke | last post by:
I cant seem to find a straight answer on the following. I want to programmatically hide all menus except a basic custom report menu (during report preview) and right click pop-up A-Z sorting on...
1
by: dkimbrell | last post by:
Hi there, I'm very novice to web design. I'm trying to make a pulldown menu, but the formatting keeps getting screwed up when you roll the mouse over it. Please see www.boundarysys.com for...
1
by: leicklda | last post by:
Hi there, I'm very novice to web design. I'm trying to make a pulldown menu, but the formatting keeps getting screwed up when you roll the mouse over it. Please see www.boundarysys.com for...
27
by: Wayne | last post by:
I've been clicking around Access 2007 Beta 2 and can't see the custom menu bar designer. Is it in the beta? Maybe I'm blind. The question that comes to mind is: Will custom menu bars be the same...
0
by: jason | last post by:
Playing around with asp.net 2.0 and asp:menu for the first time.. what's the attribute/code so that each item in my menu has a *SEPERATE* border around it? Seems I can only make the border around...
2
by: jason | last post by:
Does anybody know how I would get borders around each menuitem? Do I have incorportate into a table? Thanks. The below produces a border around the entire menu. <form id="form1" runat="server">...
4
by: Adam Rosner | last post by:
I have a large Access application that I look after. This app is written in Access 2000 and uses menu bars. (CommandBars and CommandBar Controls). The menu is static - built into the app (ie...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.