How can I get the box inside the buttons?
I use dojo toolkit and the button css is as follows:
.button0 {
margin: 2px;
padding: 0px;
background: linear-gradient(to bottom, #ffec64 5%, #ffab23 100%);
background-color: #ffec64;
border-radius: 9px;
border: 3px solid #ffaa22;
display: inline-block;
cursor: pointer;
color: #333333;
font-family: Arial;
font-size: 15px;
font-weight: bold;
text-decoration: none;
outline: none;
outline-color: transparent;
}
.button0:hover {
background: linear-gradient(to bottom, #ffab23 5%, #ffec64 100%);
background-color: #ffab23;
outline: none;
outline-color: transparent;
}
.button0:active {
position: relative;
outline: none;
outline-color: transparent;
}
What I want to remove is the 1px border that has the text.
can't be sure without seeing the html. I'm assuming the css class is on the button element like so
<button class="button0">
and that there are no nested element tags.
add:
.button0:focus{ outline: 0 }
may fix it.
note: for accessibility, its best not to remove the outline.
Related
So I have a provblem with the dropdown that shows this arrow on the right aligned to the end, and I can't find a way to fix it.
Here is the scss:
.select_box {
width: 120%;
font-size: 1.1em;
background: var(--header-bg);
border: 1px solid var(--border);
font-family: "Space Grotesk";
transition: var(--animate);
border-radius: 0.65em;
color: var(--color-inactive);
outline: none;
&:hover {
background: var(--hover-color);
border: var(--icon) 1px solid;
cursor: pointer;
}
}
I created a sidebar in Google Sheets using an online template. It is working perfectly, but the buttons to update and reset are on the bottom, and I would like them on top of the sidebar list.
I have tried altering the button code in terms of height and other factors but cannot seem to get it to be agreeable.
This is where I believe the code needs to be altered:
.button,
button,
input[type="button"],
input[type="image"],
input[type="reset"],
input[type="submit"] {
background: -moz-linear-gradient(top, #f5f5f5, #f1f1f1);
background: -ms-linear-gradient(top, #f5f5f5, #f1f1f1);
background: -o-linear-gradient(top, #f5f5f5, #f1f1f1);
background: -webkit-linear-gradient(top, #f5f5f5, #f1f1f1);
background: linear-gradient(top, #f5f5f5, #f1f1f1);
border: 1px solid #dcdcdc;
-moz-border-radius: 2px;
-webkit-border-radius: 2px;
border-radius: 2px;
-moz-box-shadow: none;
-webkit-box-shadow: none;
box-shadow: none;
color: #333;
cursor: default;
font-family: arial, sans-serif;
font-size: 11px;
font-weight: bold;
height: 29px;
line-height: 27px;
margin: 0;
min-width: 72px;
outline: 0;
padding: 0 8px;
text-align: center;
white-space: nowrap;
}
<body>
<div class="container"></div>
<div class="buttons">
<p>
<button class="action" id="action">Add Rejections</button>
<button id="btn">Reset List</button>
</p>
</div>
I would ultimately like the two buttons to be on top of the sidebar list instead of having to scroll to the bottom. Any help would be appreciated.
So I have button defined by the a-tag which says:
.button {
background: #aaaaaa;
padding: 20px 30px;
font-weight: bold;
color: #ffffff;
text-transform: uppercase;
border-radius: 15px;
box-shadow: 0px 3px 0px #999999;
cursor: pointer;
}
.button:hover {
background: #a1a1a1
}
.button:active {
box-shadow: 0px 0px 0px #999999;
}
Click me
So pretty straight forward. A button, a hover effect, and an active effect. However, what I would actually like is the effect of pushing the button. Now the box-shadow just disappears, but the button itself doesn't go "down" so to speak...
It's pretty easy with just a button, but I need this for a -button. Can it be done ? :)
You can add position: relative to the button and add top: -1px on :active for 1px top offset.
.button {
background: #aaaaaa;
padding: 20px 30px;
font-weight: bold;
color: #ffffff;
text-transform: uppercase;
border-radius: 15px;
box-shadow: 0px 3px 0px #999999;
cursor: pointer;
position: relative;
}
.button:hover {
background: #a1a1a1
}
.button:active {
top: -1px;
}
Click me
You can use the transform scale property. This will make an illusion that the button is clicked since it becomes smaller on active.
.button {
transition: all 1s;
}
.button:active {
transform:scale(0.8,0.8);
}
https://www.w3schools.com/cssref/playit.asp?filename=playcss_transform_scale
You can do that manually like that :
.button {
padding: 15px 25px;
font-size: 24px;
text-align: center;
cursor: pointer;
outline: none;
color: #fff;
background-color: #4CAF50;
border: none;
border-radius: 15px;
box-shadow: 0 9px #999;
}
.button:hover {background-color: #3e8e41}
.button:active {
background-color: #3e8e41;
box-shadow: 0 5px #666;
transform: translateY(4px);
}
https://www.w3schools.com/howto/tryit.asp?filename=tryhow_css_buttons_animate3
Or you could also use the material design through the materialize package:
https://www.w3schools.com/w3css/w3css_material.asp
And this is an example for buttons :
<a class="waves-effect waves-light btn">button</a>
http://materializecss.com/buttons.html
I am having an issue with my dropdown menu in Internet Explorer 11.
There are blue lines at the top and bottom. I believe they correspond to the background color.
This is what it looks like
Here is the css that corresponds to it..
dropdown-menu {
color: #fff;
text-decoration: none;
background-color: #337ab7;
}
I am guessing it has to do with the height being off in the box, but I am unsure how I would correct that. Any help would be appreciated.
Edit: Looking through the css on the page my original thought of the code that was generating the dropdown menu was wrong. It's actually this.
.selection-cell {
width: 30.2969px;
height: 30px;
background: url('images/buttons/control.png') no-repeat;
background-color: #3498db!important;
background-position: 8px 8px;
border-radius: 3px;
overflow: hidden;
background-size: 13px 13px;
margin-bottom: inherit;
-moz-appearance: none;
-webkit-appearance: none;
appearance: none;
border: 1px solid transparent;
cursor: pointer;
}
.selection-cell:hover{
background: url('images/buttons/control-selected.png') no-repeat;
background-position: 8px 8px;
background-size: 13px 13px;
border-color: #adadad;
}
.selection-cell option{
background: white;
/*border-left: 1px solid black;*/
-moz-clear: both;
-ms-clear: both;
clear: both;
-moz-box-shadow: none !important;
}
i'm making a button and I want to achieve an insteresting effect that you can see here.
The problem is that when on hover I put to the text rgba(0,0,0,0.0); all the button turns white, even the text.
Here's my code so far:
.button{
height: 40px;
border-radius: 5px;
border: 2px solid #fff;
text-align: center;
font-size: 16px;
color: #fff;
line-height: 2.4em;
cursor: pointer;
}
.button:hover{
background: #fff;
color: rgba(0,0,0,0.0)
}
The reason is because your hover color: was set to transparent, so of course it will be white. Try something simpler like below:
.button {
color: blue;
background: white;
padding: 5px 10px;
border: 3px solid blue;
border-radius: 5px;
text-decoration: none;
transition: all 0.3s;
}
.button:hover {
color: white;
background: blue;
}
button
The problem is that, you have set the text color opacity to 0 so it is like your text is completely transparent. You can simply match it to your body's background color like I did below. No need to mention the opacity, it is 1 by default.
Fixed and working code snippet:
body{
background: #0E80C6;
}
.button{
height: 40px;
border-radius: 5px;
border: 2px solid #fff;
text-align: center;
font-size: 16px;
color: #fff;
line-height: 2.4em;
cursor: pointer;
background: transparent; /* background changed to transparent so it shows the body's background color */
}
.button:hover{
background: #fff;
color: #0E80C6; /* color matched to that of the background */
}
<button class="button">Button</button>
Your issue was you had the opacity of the text color set to 0%. The last letter in rgba means "alpha" or opacity.
body {
background-color: rgba(42, 148, 245, 1.00);
}
.button {
font-family: Gotham, "Helvetica Neue", Helvetica, Arial, sans-serif;
background-color: transparent;
height: 40px;
border-radius: 5px;
border: 2px solid #fff;
text-align: center;
font-size: 16px;
color: #fff;
line-height: 2.4em;
padding-left: 40px;
padding-right: 40px;
cursor: pointer;
}
.button:hover {
background: #fff;
color: rgba(42, 148, 245, 1.00);/*Set this to whatever you have for the background color. the "1.00" is the opacity"*/
}
<input type="button" value="button" class="button">
RGBA(red, green, blue, alpha)
The problem is you had the opacity(alpha value) of text is 0
body{
background: blue
}
.button{
background: transparent;
height: 40px;
border-radius: 5px;
border: 2px solid #fff;
text-align: center;
font-size: 16px;
color: #fff;
line-height: 2.4em;
cursor: pointer;
}
.button:hover{
background: #fff;
color: blue
}
<button class="button">Button</button>