How can i build this example button, with strip red (when focus) and blue.
button example
Thanks a lot!
.button:hover {
border-left: 3px solid blue;
}
Related
If you click on that image (which is inside a button) an Alertify message pops up. This (the image above) happens when the message closes.
I have this problem wherein the button defaults back to the default button decoration. How do I prevent this from happening? I already tried the outline: none !important CSS element but it still does not work. Is there an "aggressive" way of getting rid of this?
EDIT: I have double-checked on the developer tools already and it seems that the outline CSS code has already applied. However, this problem still persist.
If you are trying to remove the background blue and the border. Try the following styles..
These will add a 1px wide transparent border which will change color to grey when clicked. It will turn back to transparent when click is released.
Also the background blue color will be removed.
button, button:focus{
outline: none;
background: transparent;
border: 1px solid transparent;
}
button:active{
outline: none;
background: transparent;
border: 1px solid grey;
}
I have an AngularJS 1.x app that I need to add a styled drop down as see in the image below. Some items need to have a red or green left border.
How can I achieve this?
Some more code would help.. but something like this
.element.red {
border-left: 5px solid red;
}
.element.green {
border-left: 5px solid green
}
I have a qtreewidget in my application. I have set the stylesheet like below for it.
setFrameShape(QFrame::NoFrame);
setStyleSheet("QTreeView { border: none; background: transparent; outline:none; }" "QTreeView::item:!selected:hover { border: 1px solid #AAAAAA}" "QTreeView::item:selected { border: 1px solid #0053A6}");
Now the problem is that there is no border around qtreewidget which is correct behaviour but when I click on any item of this widget a black border appears around the widget. Although I have mentioned the border for this widget to none then why it is appearing on clicking any item.
This is a focus rectangle. To completely disable it:
setFocusPolicy(Qt::NoFocus)
How to tune QLineEdit view to:
show as label with transparent background for displaying mode.
show as common QLineEdit widget when user clicks on it to editing.
Use this css to apply QLabel-like style when it is not in edit mode:
QLineEdit:!focus
{
border: 1px solid transparent;
background: transparent;
}
QLineEdit:focus
{
background: white;
}
I want to display a line of text with two different colors (black and red).
When the user hovers over the div where the text is in, the div's background-color changes and ALL the text in the div has to become white.
Using the 'span' element would be a good solution to show different colors on one line.
However, the text in the 'span' element remains red while the other text does change to white when I hover over the div.
So how do I make sure all the text changes to white?
All help is appreciated.
Here is my CSS:
.linkBackground
{
background-color: White;
border-bottom: 1px solid #a22a29;
color: Black;
}
.linkBackground span
{
color: #a22a29;
}
.linkBackground:hover
{
background-color: #a22a29;
border-bottom: 1px solid White;
color: White;
}
This is my HTML:
<div class="linkBackground">
This is <span>an example</span>
</div>
Try:
.linkBackground:hover,
.linkBackground:hover span {
color: #fff;
}
suggest solution using jQuery
$('.linkBackground').hover(function() {
$(this).find('span').css('color', 'hexcode');
})
.linkBackground:hover {
background-color: #a22a29;
border-bottom: 1px solid White;
color: white !important;
}