weird CSS behavior

I have the following code:
                button.getStyleClass().clear();
                button.getStyleClass().add("button");
                button.getStyleClass().add("menuSegundoNivel");
                button.setEffect(ref);
and the css:
.menuSegundoNivel .button {
    -fx-background-color: #172934;
    -fx-text-fill: #ececec;
    -fx-font-size: 14 px;
    -fx-padding: 2;
    -fx-text-alignment: center;
    -fx-font-family: Arial;
    -fx-wrap-text: true;
    -fx-background-radius: 0;
}

.menuSegundoNivel .button:hover{
    -fx-background-color: #9d8f81;
    -fx-text-fill: #ececec;
    -fx-font-size: 14 px;
    -fx-text-alignment: center;
    -fx-font-family: Arial;
    -fx-wrap-text: true;
    -fx-padding: 2;
    -fx-background-radius: 0;
}

.button {
    -fx-background-color: #bdb4ab;
    -fx-text-fill: #172934;
    -fx-font-size: 14 px;
    -fx-padding: 10px;
    -fx-text-alignment: center;
    -fx-font-family: Arial;
    -fx-wrap-text: true;
    -fx-background-radius: 0;
}

.button:hover {
    -fx-background-color: #9d8f81;
    -fx-text-fill: #ececec;
    -fx-font-size: 14 px;
    -fx-text-alignment: center;
    -fx-font-family: Arial;
    -fx-wrap-text: true;
    -fx-background-radius: 0;
}
the behavior of the button takes to the 'normal' State the key .menuSegundoNivel with the exception of the - fx-text-fill, which is taken from key
and the hover is also taken from the touch of class instead of the class key .menuSegundoNivel
Any ideas?

Eliminate the space between the style of class names. ".menuSegundoNivel key"should be. " menuSegundoNivel.button"
You want several classes of style, not a top-down relationship.

Tags: Java

Similar Questions

  • Weird starting behavior

    My iMac began suddenly put into evil market.

    At the launch, it bypasses the screen connection completely and goes straight to my son's account.  The login screen has four accounts, more than one guest account.  Three of the four require passwords.

    At startup when it jumps directly to my sons account, both programs appear to be already launched.  One is steam, and the other is uTorrent.  I am a little concerned about that program uTorrent but this is a cat that I need with my teenage son.  I advanced and removed uTorrent by placing the application to the trash and empty the trash.

    Even with the 'open to restarting windows' unchecked, when I restart, the mac still bypasses the login screen, goes directly to son's account and open steam.  I also tried these scenarios with the same result: 1) close all programs down, disconnecting his account and restart; (2) go to my account using the taskbar from top right, and then restart your computer.

    I'm more than happy to remove the Steam account, but my guess is that there is probably a larger problem in the game I want to solve.  Any thoughts on the best way forward?

    I'm under 27 - inc, iMac end of 2015 with El Capitan V 10.11.5.

    Open system preferences > users and groups. Click the icon of a padlock at the bottom left. Click on connection Options and make sure that it did not indicate the automatic connection to his username.

  • M7-k111dx: weird load behavior

    After the Cumulative Update for Windows 10 Version 1511 for x 64 systems (KB3124262), my charge indication is no longer the correct state. I have 2 batteries, one of them, fresh, but when it is full, the light turns white, the other a works very well. All the tips are greatly appreciated.

    Hi @ethandrzb,

    Thank you for visiting the HP Forums! A place where you can find solutions for your problems with the help of the community!

    I stumbled upon your post on the laptop and wanted to help you! I looked in your question on your HP ENVY m7-k111dx Notebook and concerns with the load turns on no longer works correctly. I recommend to restore the default BIOS settings. You could restore the BIOS withthis document by selecting the reload the default BIOS settings. In this way, it will look at the hardware installed on your laptop.

    Please let me know how it goes.

    You can say thanks for trying to help by clicking on the Thumbs Up below!

    Thank you.

  • Weird keyboard behavior

    Hi, don't know how describe this model is a desktop i5, bought this week.

    The original keyboard was driving me crazy, as if switching to Windows 8 was not bad enough... She seemed fragile and often gave spelling mistakes. I can't use my old one that this computer does not have a keyboard port (why not? I mean seriously, how many pennies that save?)

    A constant irritation with the HP keyboard was that it kept spoil the quotes, especially the right one, so I managed to dig up an old USB keyboard...

    Exactly the same problem? It is therefore not the material.

    So let me descrobe the problem...  I Supoose to put the problem of Word in quotation marks, like this "problem"...

    What tends to happen is the first, usually, on the leftm works ", but the right hand, we're not" Although there... Mmm.  Most of the time that nothing happens, so I carefully press shift and the key... still nothing, drank when I hit space it then shows TWO of them. The result tends to look like this:

    ««Problem "»

    That IS something serious, because I'm a writer by trade. That's what I do. I can't continue to try to work around or fix this error.

    I checked languages, she has US International and the plain I removed the international.

    What is a familiar thing? An ' idea' "what is the cause?

    ??

    I replaced the HP keyboard with a new one and the problem has not occurred since.

    * shrug *.

  • Weird button behavior

    Joined a very simple vi.  On the front panel are two buttons.  Each button appears to be identical; they have five parameters (0,1,2,3,4).  Using the property of text labels I have assigned values (0,2,4,8,16).

    If you try to move the first button, you will see that you can move it to 0.1 and 2.  If you try to move the second button you can move all the settings.

    What is the difference?  For the first button, data entry properties are set to a minimum = 0 and maximum = 4.  For the second button, they are set to 0 and 5.  Everything else is the same.

    It is so basic that I must be missing something, but does not know what it is.

    David

    because there is no 5 it never sees a 5 and locks never modify the button there values 1, 2, 5, 8, 16 and it locks in 5

    Ferdinand forced out of range values (but make sure that the values EXIST before you force them or you will force them to value not defined)

  • Loss CSS & behaviors when you apply the template

    I created my site and then realized that I could use a model for big changes. Then, I saved an and start copying on my content files. Everything was going well until I came to be copied into a page with a form validator. I can't get the upcoming help text and I also can't conduct must trigger on the Send button.

    TThis is the link to the page that has a form of work and is NOT based on a model


    This is the link to the page that had the model applied and no longer works

    Thanks for any advice I can get on it.

    Samantha

    Samantha,

    Look towards the bottom of the page that works for one

  • Weird behavior of Shader

    Hello

    This question has also been posted in SO:

    http://StackOverflow.com/questions/15255004/weird-shader-behavior-in-stage3d

    I use this vertex Shader:

    < script id = 'per-fragment-lighting-vs' type = "x-shader/x-vertex" >

    attribute vec3 aVertexPosition;

    attribute vec3 aVertexNormal;

    attribute vec2 aTextureCoord;

    uniform mat4 uMVMatrix;

    uniform mat4 uPMatrix;

    uNMatrix uniform spades3;

    various vec2 vTextureCoord;

    various vec3 vTransformedNormal;

    various vec4 vPosition;

    void main (void) {}

    vPosition = uMVMatrix * vec4 (aVertexPosition, 1.0);

    gl_Position = uPMatrix * vPosition;

    vTextureCoord = aTextureCoord;

    uNMatrix = vTransformedNormal * aVertexNormal;

    }

    < /script >

    But everything I see tile is properly textured object instead.

    If I change the shader like this:

    < script id = "per-fragment-lighting-vs2" type = "x-shader/x-vertex" >

    attribute vec3 aVertexPosition;

    attribute vec3 aVertexNormal;

    attribute vec2 aTextureCoord;

    uniform mat4 uMVMatrix;

    uniform mat4 uPMatrix;

    uNMatrix uniform spades3;

    various vec2 vTextureCoord;

    various vec3 vTransformedNormal;

    various vec4 vPosition;

    void main (void) {}

    gl_Position = uMVMatrix * vec4 (aVertexPosition, 1.0);

    vTextureCoord = aTextureCoord;

    uNMatrix = vTransformedNormal * aVertexNormal;

    }

    < /script >

    And multiply the prospects in actionsctript I see the object mapped properly although it has a different perspective

    Any suggestion?

    Oh I found the solution.

    When you convert a GLSL AGAL the conversor is moving the locations of the values.

    for example:

    In the summits shader: shader fragment:

    vPosition = v0 = v1 vPosition

    vNormal = v1

    vSomething = v2

    I had to create a function that is looking for matches on the names of variables and watch if the index has been moved. For now, he has solved the problem.

  • Solution for IE CSS/Htc works is not a reason any

    Hello

    I use DW CS4 on a processor intel Mac. I have the thing of rounded corners CSS goes for the div Central on most of my pages - and of course, it works very well with everyone but IE.

    I have this code in my CSS: behavior: url(border-radius.htc) and I have downloaded the HTC file as well.

    And rounded corners don't appear in IE, the background image (it repeats Y) does not. It wobbles on in a first time, then disappears.

    Boy, I like IE.

    Here is a link to get to the right area - I put in a little different place on some pages to see if a CSS of appearance order may be the cause. No real progress on this point either. http://www.frankbright.com/index3.htm

    Thanks much for any help.

    I appreciate it,

    Frank B.

    This method works with simple layouts.  The thing about behavior url must go inside a conditional comment IE browsers Pre - IE9 target.

    Also, I applied to a Div ID because it carries more weight than .classes alone.

    /**CSS ROUNDED CORNERS for Mozilla, Webkit, Linux, Opera, IE9**/
    
    #Your-Div-Name,#Another-Div-Name,table  {border: 5px solid #FFF;-moz-border-radius: 20px;-webkit-border-radius: 20px;-khtml-border-radius: 20px;border-radius: 20px;}
    

    See the link below for more details:

    http://ALT-Web.com/demos/CSS-rounded-corners.shtml

    Nancy O.
    ALT-Web Design & Publishing
    Web | Graphics | Print | Media specialists
    http://ALT-Web.com/
    http://Twitter.com/ALTWEB

  • Ios10 updated and now can't make or receive phone calls. Help!

    Ios10 updated and now can't make or receive phone calls. Help!

    Try a forced reboot. He can heal really weird unexpected behavior. To force the reboot your device, press and hold the two buttons of sleep/wake and home for at least ten seconds, until you see the Apple logo.

  • Satellite Pro 6100: Office appears to be cut on the right side

    Hello

    My Office SP6100 seems to cut food on the right side. If I point with the mouse in this region, the desktop appears. I changed the rsulution display of 1024 * 768, everything, but still the same...

    Someone knows how to fix this?

    THX

    Stefan

    Hello

    Try to connect the external monitor to the computer and check if the same weird display behavior will be appears on the second monitor.
    If the same problem of screen appears on the external monitor, I presume that the malfunctioning of the graphics card!

    Have you tried updating the graphics card driver? Please do it! First remove the old version of the driver, and then install a newer version.

    I recommend using the Toshiba page display driver, but you can also check the drivers from the site www.omegadrivers.net or www.laptopvideo2go.com.

    Good luck

  • Firefox 3 displays spaces in the html text. Firefox 7 collapses adjacent spaces. How can I tell Firefox to display main and adjacent areas?

    I have my set Favorites in a HTML file that is my home page. These bookmarks are categorized. This is how they would be displayed in Firefox 3...

    Category

        Bookmark 1
        Bookmark 2
    

    This is how they appear in Firefox 7...

    Category
    Bookmark 1
    Bookmark2

    How can I make Firefox 7 show the leading spaces?

    You must add the CSS code to restore the indentation used in the previous version of Firefox.

    Firefox 4 and then treat the DT element differently and that causes a weird CSS rule (dl > dl) not applied.

    • Resource://GRE-resources/quirk.CSS on line 220

    Use it in Firefox 4 and later versions:

    <style>
    dl > dt > dl { display: block; -moz-margin-start: 40px; }
    </style>
  • I have an iMac, the 27 "Office 2013.  Whenever I turn it on now the cooling fan begins to operate.  How can I stop this?

    I have an iMac, the 27 "Office 2013.  Whenever I turn it on now the cooling fan begins to operate.  How can I stop this?

    You must first check for any failure of equipment. Please use this section of Apple:

    Apple Diagnostics using - Apple Support

    to run the Diagnostics from Apple on your computer and reprot back here if there is no result.

    You can also do an SMC reset seeing weird fan behavior:

    Reset the management system (SCM) controller on your Mac - Apple Support

  • Problems with the Satellite L850 display

    I have a new new Satellite L850 running Windows 8. Lately, when I open the lid or press the power button when the laptop is in mode 'sleep', the screen is shifted to the right or has black lines through it. When I put the laptop back to sleep by pressing the power button, then press it again to wake up to the top of the screen corrects itself.

    Any ideas on what is happening and how to fix it? All the drivers are up to date.

    I think you're the first person who reported on this weird display behavior. Have you noticed that from the first moment on the first day of use?
    Isn't the same case after hibernation?
    This happens to every time or just occasionally?

  • Display problems with all types of terrain and graphic

    Hello

    I have display problems general with all types of chart, graph or plot that I try to use, on two different machines, both with NVIDIA graphics cards.  A machine is a MacBook under XP SP2 in bootcamp and the other a Dell T3400 workstation (or something similar) under XP SP3.

    I posted this thread earlier which Ben replies to the weird graphic behavior.  Ben suggested that I try to simplify my code as much as possible while keeping the bad behavior and by submitting to the NC and the forum, because it is others have had problems of graph.  I tried, but in vain.  Display problem continues and continues and continues and then they just go and I can't get back by unscrewing the last stage of reduction or simplification of code.  But at some point during the reconstruction of the code, which I cannot determine, returns the bad behavior.

    So, I was set up with graphics looking for shit, until recently, when I thought I'd try some suggestions of other messages to a XY-plot function as a graph by creating a buffer and using nodes of ownership of land for the range control.  Things seemed promising, until my "XY table" started getting shit, too.  This time, the issue was with the grid lines becomes all chopped, attached images.

    I am out of resources here.  I think I'm running out of options to display graphic data in an acceptable manner.  Do I have to display data by using an Excel chart in an ActiveX container in Labview?  I'm not skilled enough to do it again.  I like Labview, it is the only programming language that I am competent even remotely help, but it's just inferiorating.

    Any suggestions would be much appreciated.  Thanks for reading.

    -Greg

    Greg,

    is there a particular reason why you use the bar plots - view superior graphic style? Try activating the legend of the plot, go to the bar plots and select the first track of the Bar Style. Your chart is displayed very well after that.

    See you soon,.

    Cerati

  • How do I return the scales on the Mixed graphic Signal?

    LV 8.6.1f1

    OK, so I look at the relatively new chart of MIXED SIGNALS to fix things that don't work on the regular chart (more precisely, the weird cursor behavior).

    It seems I have a slider that spans four plots and reads an X 4 values of Y, that's what I want.

    But I need ladders on both sides.

    I tried to create the 2nd scale and the SIDES exchanged with her and got this:

    There is no ladder on the right?

    Or is it?

    These graduations few are a clue.

    I so stretch the right side of the chart and guess what?

    There is the scale:

    In other words, the new graphic scale left anywhere on the screen, even if I resize the chart horizontally.

    I can move the chart, the scale moves with him.  I can re-size on the left, and the left scale shows the same effect.

    It seems to me that graphic scales must be attached to the plot area.

    This graph is a TAB control, maybe the problem is related to this error of LabVIEW.

    Or am I missing something?

    Here is the code I ended up with difficultytowork around this problem.

    Mixed-Signal graph has ANOTHER problem where he completely forgets your assignments whose plots go on the scales, but that's another story.

    In my case, I've already placed the scales on the sides left / right as needed.  It's just that the right bottpm scale, really, really wants to be off to the right.

    What I do here, it's fetching the LIMITS of PARCEL of land #0 (the top one).

    I'm only interested in the left-right axis, I don't have a problem vertically.

    Also, I extract the AREA of scale 0-WIDTH WIDE.

    I then adjust the YSCALE. LEFT property of the four scales, place them where I want.

    The two scales on the LEFT are the BOUNDARIES of the PARCEL. -LEFT (WIDTH + 1 ON THE SCALE)

    The two scales on the RIGHT are to DRAW the BOUNDARIES. RIGHT + 1

    The "+ 1" means there are a pixel between the scale graduation mark and the border of the chart itself. I think it's better.

    Just run the VI once to run this code, then turn off the code section and save the VI. (You do not need to run it again unless something changes, he seems to remember where it is supposed to be).

    Of course, if you resize the graphic, you will need to run the patch again.

Maybe you are looking for