Change style of Bootstrap listgroup active item - css

I am trying to style an active item in bootstrap list-group similar to this:
See how Recent is highlighted with just a dark border on the left.
This is my code:
Code
This is my css:
.list-group-item.active {
background-size: 10px;
background-color: #add8e6;
border-color: #add8e6;
}
Please advice.

Thanks. Added a border-left: 5px solid blue and it worked

Related

Angular Style Attribute overlaps or dont hide

I got a component that is visible when a condition is given or not given, its a that is yellow. the code works fine. now I just want to change the color in some chases for example in blue.
s-help-component.html:
<div *ngIf="visible" class="s-help">
<div class="s-help-content "><span [translate]="text"></span></div>
</div>
The class s-help is given in my global SCSS file. I wrote another CSS class in my global SCSS file and attached following in the code lines where I want to use my s-help component:
<s-help [visible]="true" class="s-help-v2" [text]="'SITEPLAN.INFO.101' | translate"></s-help>
The class s-help-v2 defines that the border color is blue instead yellow.
My problem: it overlaps.
My try to solve the problem:
remove the class tag in the s-help.component.html, but when I do this, the border of the div is always visible even if the condition is false!
My SCSS:
.s-help-v2{
background-repeat: no-repeat;
background-position: center left calc(0.37em + 0.37rem);
background-size: calc(1em + 1rem) calc(1em + 1rem);
border: 2px solid $info !important;
border-radius: 4px;
display: block !important;
color: $gray-700;
min-width: 220px;
white-space: normal !important;
padding-left: 5px !important;
padding-right: 5px !important;
}
Any suggestions how I can solve the overlapping problem, or the problem where the border color is active permanently.
This is my suggestion you can move the class s-help down to the child component level and this will fix the issue!
parent
<s-help [visible]="true" [text]="'SITEPLAN.INFO.101' | translate"></s-help>
child
<div *ngIf="visible" class="" [ngClass]="visible ? 's-help' : 's-help-v2'">
<div [ngClass]="visible ? 's-help s-help-content' : 's-help-v2 s-help-content'"><span [translate]="text"></span></div>
</div>
Second way will be to make the s-help-v2 style the child div like below!
.s-help-v2 > div {
color: blue;
}

Change extension icon background using css

Hello I am trying to remove the default background of toolbar icons when hover in firefox using userChrome.css
.toolbarbutton-icon
{
border-radius: 5px !important;
box-shadow: 0px 1px 1px 1px black, 0 -0.01em 1px 0px #D0D0D0 !important;
background-color: var(--uc-regular-colour) !important;
width: 26px !important;
height: 26px !important;
padding: 5px !important;
}
This block of code changes the size and color of all toolbar buttons including extension icons
Then I used this block of code to change its color when hover over them
*:hover > .toolbarbutton-icon{
background-color: green !important;
}
Which changes color of buttons when hover but the extension buttons stays the same.
How can I change it without having to define each extension name or property
Below are some screenshots to demonstrate the issue
As you can see except extension button all buttons change color
*:hover .toolbarbutton-icon {
background-color: green !important;
}
Tried this block as well as suggested below, but it hovers on all icons by default, I want each button to change color when hovered over them also when I hover over the extension button It still has the gray color
It will be a problem when you use >.
The > notation applies only to the immediate children of that element.
Try use:
*:hover .toolbarbutton-icon {
background-color: green !important;
}
Hope this helps.
.webextension-browser-action:hover > .toolbarbutton-badge-stack .toolbarbutton-icon { background-color: var(--uc-hover-colour) !important;}
Apparently after doing some research. Finally found a way to fix it.
The block of codes only works with extensions installed on firefox

How to change a button from curved corner to sharp?

I need to change a button on my website's homepage from a curved edge to sharp.
It is a WordPress website and I am trying to add this code via Additional CSS window.
I tried to perform the below code, but it did not work.
wobble-horizontal.shop-button.arrow-right.style2.black.bg-white
{
border:3px solid #bada55;
}
Any suggestion on how to make the button sharp-edged?
Edit: I have just realised I haven't mentioned "a" class at the beginning. It should be a.wobble. Sorry for the confusion.
Assuming that's just a div, it's as simple as setting the border-radius to 0px
Also, the library you're using could be high up in specificity, so you can also try border-radius: 0px !important; to try and force it.
Based on your border: 3px solid #bada55 line, I think you may have the wrong selector as that should be setting the border of that button a lime green and not gray.
#sharp {
border-radius: 0px;
}
#not-sharp {
border-radius: 10px;
}
div { background: red; margin: 10px; }
<div id="sharp">My Sharp Button</div>
<div id="not-sharp">My Not Sharp Button</div>
There seems to be another CSS script that is manipulating the border-radius property.
To have sharp borders, use:
border-radius: 0;
The code you were using just sets the border's thickness (3px), style (solid fill), and color(#bada55), not the radius.
If this does not do it, try tracing down what other CSS script is manipulating the border radius, or just use the !important directive to override:
border-radius: 0 !important;
border-radius: 0;
or border-radius: 0 !important; if your CSS is being overridden.
Setting border-radius to 0px should give you straight edges on the button

AngularJS with a styled select drop down

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
}

CSS Tabs Border Issue

Im having a problem to determine how to manipulate the Borders for some Tabs
You can see the functionality here on ASP.NET if you are logged-in http://forums.asp.net/user/editprofile.aspx#
You can see for an onClick Event the background-color of the Tab changes to white like its supposed to.
The problem that Im having has to do with the Borders for onClick:
The border-bottom should change from the grey color to white.
The border-left and the border-right should change to the grey color.
Likewise when a Tab is not selected:
The border-bottom should change to the grey color from white.
The border-left and border-right should not have a border.
In my CSS, Im using both the blue and white class for the JavaScript. However I also have: .common-heading-tabs a.selected and this is confusing me.
Here is my Fiddle- if someone could help It would be great
http://jsfiddle.net/NinjaSk8ter/ZSeFA/
I just modified the CSS class for .white a little bit, your CSS mark-up was not the standard:
border-left-color: #A0AFC3;
border-left-style: solid;
border-left-width: 1px;
Additionally, to get the bottom border to go away, you have one of two options, you could do one of either
remove the bottom border from the .common-heading-tabs a class and add it to the .blue class
add border-bottom-color:white !important; to the .white class
The reason that you were seeing the behavior that you were was because the standard tab had a border (from .common-heading-tabs a), and when you switched to white, you tried to change the color or some of the borders, but you used border-left-color-value rather than simply border-left-color, and then you didn't modify the border on the bottom on the tab for the white class, hence either moving the bottom border declaration out of .common-heading-tabs a or explicitly coloring the bottom-border-color:white !important
Hope that helps!
Edit:
You requested having a border run between the tabs, if you were to modify the class .left-col and add to it:
.left-col
{
border-bottom-color: black;
border-bottom-width: 1px;
border-bottom-style: solid;
}
That should do the trick, maybe you should get rid of the borders on the other tabs, if this is what you're looking for, because the double border looks funky.
Let me know if I can help any more
For an example to make bottom border white look this
<html>
<head>
<style type="text/css">
p
{
border-style:solid;
border-bottom-color:white;
}
</style>
</head>
<body>
<p>This is some text in a paragraph.</p>
</body>
</html>
You have some inheritance going on. Adding explicit values to the .blue class and important to the one in .white worked.
.blue {
background-color: #D7DFEA;
border-bottom: 1px solid #fff;
border-top: none;
border-left: none;
border-right: none;
}
.white {
border-bottom: 1px solid #fff !important;
border-top: 1px solid #A0AFC3;
border-left: 1px solid #A0AFC3;
border-right: 1px solid #A0AFC3;
background-color: white;
}
The problem, as far as I can see, is that while both .common-heading-tabs a and .white are applied to the link, the former is the "more specific" CSS class, which means the browser gives it precedence while determining which styles to apply.
If you want to make sure the .white style overrides the border, you can either add !important to the border style:
.white {
background-color: white !important;
border-bottom-color: #FFFFFF !important;
border-bottom-style: solid !important;
border-bottom-width: 1px !important;
...
}
or redesign the appliance of your classes in such a way that conflicting border styles aren't applied to begin with, which in your case could for example mean moving the blue border style from .common-heading-tabs a to .blue.

Resources