I want to center-align the text in the span. Why does it only work in Chrome, but no IE?
.txt {
align-items: center;
background-color: rgba(0, 0, 0, 0.0980392);
background-image: none;
border-bottom-color: rgba(0, 0, 0, 0.117647);
border-bottom-style: solid;
border-bottom-width: 1px;
border-collapse: collapse;
border-image-outset: 0px;
border-image-repeat: stretch;
border-image-slice: 100%;
border-image-source: none;
border-image-width: 1;
border-left-color: rgba(0, 0, 0, 0.117647);
border-left-style: solid;
border-left-width: 1px;
border-right-color: rgba(0, 0, 0, 0.117647);
border-right-style: solid;
border-right-width: 1px;
border-top-color: rgba(0, 0, 0, 0.117647);
border-top-style: solid;
border-top-width: 1px;
box-shadow: none;
box-sizing: border-box;
color: rgb(0, 0, 0);
cursor: default;
display: flex;
fill: rgb(0, 0, 0);
float: left;
font-family: MetricWeb-Medium, arial;
font-size: 16px;
height: 48px;
justify-content: center;
line-height: 16px;
margin-bottom: 1.54688px;
margin-left: 1.54688px;
margin-right: 1.54688px;
margin-top: 1.54688px;
outline-color: rgb(0, 0, 0);
outline-style: none;
outline-width: 0px;
padding-bottom: 6px;
padding-left: 12px;
padding-right: 12px;
padding-top: 6px;
text-align: center;
white-space: nowrap;
width: 35.875px;
-webkit-user-select: none;
}
<span class="txt">2016</span>
https://jsfiddle.net/ramseyfeng/fd5sxv27/
The problem is the way each browser renders the left and right padding.
In your code you have:
.txt {
padding-left: 12px;
padding-right: 12px;
}
Chrome basically ignores this padding when centering the text in the small container:
But IE11 respects the padding:
The solution is to simply remove the horizontal padding:
.txt {
padding-left: 0;
padding-right: 0;
}
Revised Fiddle
I made an amendment to your jsfiddle;
Your font-size will not work with the padding you've selected with the font-size. Padding-Left was causing the off-center shift from the left side. Also your box is way too small for the font-size of 16 pts.
Jsfiddle Change ver5 - Removed padding all together, keeping the same font-size, and increased width to 70px.
Jsfiddle Change ver6 - Reduced Font Size to 12px from 16 and padding left and right reduced to 3px from 6px & 12px.
https://jsfiddle.net/fd5sxv27/5/
.txt {
align-items: center;
background-color: rgba(0, 0, 0, 0.0980392);
background-image: none;
border-bottom-color: rgba(0, 0, 0, 0.117647);
border-bottom-style: solid;
border-bottom-width: 1px;
border-collapse: collapse;
border-image-outset: 0px;
border-image-repeat: stretch;
border-image-slice: 100%;
border-image-source: none;
border-image-width: 1;
border-left-color: rgba(0, 0, 0, 0.117647);
border-left-style: solid;
border-left-width: 1px;
border-right-color: rgba(0, 0, 0, 0.117647);
border-right-style: solid;
border-right-width: 1px;
border-top-color: rgba(0, 0, 0, 0.117647);
border-top-style: solid;
border-top-width: 1px;
box-shadow: none;
box-sizing: border-box;
color: rgb(0, 0, 0);
cursor: default;
display: flex;
fill: rgb(0, 0, 0);
float: left;
font-family: MetricWeb-Medium, arial;
font-size: 16px;
height: 48px;
justify-content: center;
line-height: 16px;
margin-bottom: 1.54688px;
margin-left: 1.54688px;
margin-right: 1.54688px;
margin-top: 1.54688px;
outline-color: rgb(0, 0, 0);
outline-style: none;
outline-width: 0px;
text-align: center;
white-space: nowrap;
width: 70px;
-webkit-user-select: none;
}
https://jsfiddle.net/fd5sxv27/6/
.txt {
align-items: center;
background-color: rgba(0, 0, 0, 0.0980392);
background-image: none;
border-bottom-color: rgba(0, 0, 0, 0.117647);
border-bottom-style: solid;
border-bottom-width: 1px;
border-collapse: collapse;
border-image-outset: 0px;
border-image-repeat: stretch;
border-image-slice: 100%;
border-image-source: none;
border-image-width: 1;
border-left-color: rgba(0, 0, 0, 0.117647);
border-left-style: solid;
border-left-width: 1px;
border-right-color: rgba(0, 0, 0, 0.117647);
border-right-style: solid;
border-right-width: 1px;
border-top-color: rgba(0, 0, 0, 0.117647);
border-top-style: solid;
border-top-width: 1px;
box-shadow: none;
box-sizing: border-box;
color: rgb(0, 0, 0);
cursor: default;
display: flex;
fill: rgb(0, 0, 0);
float: left;
font-family: MetricWeb-Medium, arial;
font-size: 12px;
height: 48px;
justify-content: center;
line-height: 16px;
margin-bottom: 1.54688px;
margin-left: 1.54688px;
margin-right: 1.54688px;
margin-top: 1.54688px;
outline-color: rgb(0, 0, 0);
outline-style: none;
outline-width: 0px;
padding-bottom: 3px;
padding-left: 3px;
padding-right: 12px;
padding-top: 6px;
text-align: center;
white-space: nowrap;
width: 35.875px;
-webkit-user-select: none;
}
Related
Hi I have been trying to change icon colour on click (output as focus). I have managed to change contact form field border as focus but couldn't make changes to icons.
I have tried with ::before ::after but it didn't work. I also tried with
.wpcf p .fa:focus{color: #colorcode}
I have applied following css code in order to design current contact form7:
.wpcf7 .wpcf7-text,
.wpcf7 .wpcf7-select,
.wpcf7 .wpcf7-textarea{
text-indent: 30px;
font-family: Roboto;
width: 100%;
height: 42px;
border: 1px solid #0d5509 !important;
border-radius: 4px;
color: #959595;
}
.wpcf7 p{
position: relative;
}
.wpcf7 p .fa{
position: absolute;
color: #0d5509;
z-index: 1;
font-size: 15px;
top: 30%;
left: 1.5%;
}
.wpcf7 p .fa-pencil{
top: 5%; left: 1.5%
}
.wpcf7-text:focus, .wpcf7-select:focus, .wpcf7-textarea:focus{
border:2px solid #ff0000 !important;
border-radius: 4px;
}
my contact page link: https://eoe.gipcl.org.uk/contact
and I wish to make it like this: https://it.gipcl.org.uk/contact
background-color: rgb(242, 242, 242);
border-bottom-color: rgb(102, 102, 102);
border-bottom-left-radius: 4.5px;
border-bottom-right-radius: 4.5px;
border-bottom-style: none;
border-bottom-width: 0px;
border-image-outset: 0px;
border-image-repeat: stretch;
border-image-slice: 100%;
border-image-source: none;
border-image-width: 1;
border-left-color: rgb(102, 102, 102);
border-left-style: none;
border-left-width: 0px;
border-right-color: rgb(102, 102, 102);
border-right-style: none;
border-right-width: 0px;
border-top-color: rgb(102, 102, 102);
border-top-left-radius: 4.5px;
border-top-right-radius: 4.5px;
border-top-style: none;
border-top-width: 0px;
box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 2px, rgba(0, 0, 0, 0.08) 0px 1px 0px 0px inset;
box-sizing: border-box;
color: rgb(102, 102, 102);
cursor: text;
display: inline-block;
font-family: Oswald, sans-serif;
font-size: 15px;
font-stretch: 100%;
font-style: normal;
font-variant-caps: normal;
font-variant-east-asian: normal;
font-variant-ligatures: normal;
font-variant-numeric: normal;
font-weight: 400;
height: 42px;
letter-spacing: normal;
line-height: 42px;
margin-bottom: 0px;
margin-left: 0px;
margin-right: 0px;
margin-top: 6px;
outline-color: rgb(102, 102, 102);
outline-style: none;
outline-width: 0px;
padding-bottom: 8px;
padding-left: 50px;
padding-right: 12px;
padding-top: 8px;
text-align: start;
text-indent: 0px;
text-rendering: auto;
text-shadow: none;
text-size-adjust: 100%;
text-transform: none;
transition-delay: 0s;
transition-duration: 0.3s;
transition-property: all;
transition-timing-function: ease;
vertical-align: top;
width: 744.987px;
word-spacing: 0px;
writing-mode: horizontal-tb;
Sorry there isn't more code on this. I am new and stumped to be honest.
I have a CSS Button I am using on my webpage, code below. I'd like to put an image around the button like below... Slightly off center,behind the button itself, and which is mobile responsive.
.redbutton {
display: inline-block;
outline: none;
cursor: pointer;
margin: 10px auto 10px auto;
padding: 15px 6px 15px 6px;
font-size: 27px;
font-weight: 700;
text-align: center;
text-transform: uppercase;
cursor: pointer;
cursor: hand;
text-decoration: none;
text-shadow: 0 1px 1px rgba(0, 0, 0, .3);
-webkit-border-radius: .5em;
-moz-border-radius: .5em;
border-radius: .5em;
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
-moz-box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
color: #faddde;
border: solid 1px #980c10;
background: #d81b21;
background: -webkit-gradient(linear, left top, left bottom, from(#ed1c24), to(#aa1317));
background: -moz-linear-gradient(top, #ed1c24, #aa1317);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ed1c24', endColorstr='#aa1317');
}
.largebuttonwidthC {
width: 60%;
}
<div class="redbutton largebuttonwidthC">SHOW ME HOW</div>
The circle image is here:
And I'd like it to look like this:
However, I cannot seem to figure out how to do this.
Thanks,
Alex
.contain {
background: url(https://i.stack.imgur.com/Nb7M7.png);
background-repeat: no-repeat;
width: 60%;
background-size: cover;
}
.redbutton {
display: inline-block;
outline: none;
cursor: pointer;
margin: 10px auto 10px auto;
padding: 15px 6px 15px 6px;
font-size: 27px;
font-weight: 700;
text-align: center;
text-transform: uppercase;
cursor: pointer;
cursor: hand;
text-decoration: none;
text-shadow: 0 1px 1px rgba(0, 0, 0, .3);
-webkit-border-radius: .5em;
-moz-border-radius: .5em;
border-radius: .5em;
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
-moz-box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
color: #faddde;
border: solid 1px #980c10;
background: #d81b21;
background: -webkit-gradient(linear, left top, left bottom, from(#ed1c24), to(#aa1317));
background: -moz-linear-gradient(top, #ed1c24, #aa1317);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ed1c24', endColorstr='#aa1317');
}
.largebuttonwidthC {
width: 60%;
margin-left: 50%;
transform: translateX(-50%);
}
<div class="contain">
<div class="redbutton largebuttonwidthC">SHOW ME HOW</div>
</div>
First, you should clean your CSS and optimize it by not duplicating arguments such as "cursor: pointer", which you ca find two times in the code, also the "outline: none" should only be when the button is focused or active.
Either way, to put an image in the background you should do something similar to :
<button class="my_button" type="">My amazing button</button>
.my_button {
/*height, width, color...*/
background-image: url(img/my_img.png);
/* You can even move the image in the background to better suit your needs*/
background-position-y:-50px; /* Move the image on the Y axes*/
background-position-x: 10px; /* Move the image on the X axes*/
background-size: cover;
}
Try to something like this.
.redbutton {
display: inline-block;
outline: none;
cursor: pointer;
margin: 10px auto 10px auto;
padding: 15px 6px 15px 6px;
font-size: 16px;
font-weight: 700;
text-align: center;
text-transform: uppercase;
cursor: pointer; cursor: hand;
text-decoration: none;
text-shadow: 0 1px 1px rgba(0,0,0,.3);
background: url(https://i.stack.imgur.com/Nb7M7.png) no-repeat;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ed1c24', endColorstr='#aa1317');
}
.largebuttonwidthC{
width: 535px;
min-height:150px;
}
.redbutton p{
background-color: yellow;
height: 35px;
border: 1px solid yellow;
width: 470px;
padding-top: 10px;
}
<div class="redbutton largebuttonwidthC">
<p>Click Here to instantly Download this file</p>
</div>
Not perfect but I guess you will see the idea behind: See this fiddle
.redbutton {
display: inline-block;
z-index: 10;
position: relative;
outline: none;
cursor: pointer;
margin: 0 50px;
padding: 15px 6px 15px 6px;
font-size: 27px;
font-weight: 700;
text-align: center;
text-transform: uppercase;
cursor: pointer;
cursor: hand;
text-decoration: none;
text-shadow: 0 1px 1px rgba(0, 0, 0, .3);
-webkit-border-radius: .5em;
-moz-border-radius: .5em;
border-radius: .5em;
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
-moz-box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
color: #faddde;
border: solid 1px #980c10;
background: #d81b21;
background: -webkit-gradient(linear, left top, left bottom, from(#ed1c24), to(#aa1317));
background: -moz-linear-gradient(top, #ed1c24, #aa1317);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ed1c24', endColorstr='#aa1317');
}
.largebuttonwidthC {
width: 300px;
}
.container {
position: relative;
margin: 50px;
}
.image {
content: "";
position: absolute;
left: -40px;
right: 0;
bottom: 0;
top: -30px;
background: url('https://i.stack.imgur.com/Nb7M7.png') no-repeat;
z-index: 0;
width: 512px;
height: 90px;
}
<div class="container">
<div class="redbutton largebuttonwidthC">SHOW ME HOW</div>
<span class="image"></span>
</div>
https://jsfiddle.net/nf7b2zx1/
.redbutton {
display: inline-block;
outline: none;
cursor: pointer;
margin: 10px auto 10px auto;
padding: 15px 6px 15px 6px;
font-size: 27px;
font-weight: 700;
text-align: center;
text-transform: uppercase;
cursor: pointer;
cursor: hand;
text-decoration: none;
text-shadow: 0 1px 1px rgba(0, 0, 0, .3);
;
color: #faddde;
background: #d81b21;
background: url(https://i.stack.imgur.com/Nb7M7.png) no-repeat;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ed1c24', endColorstr='#aa1317');
}
.largebuttonwidthC {
width: 100%;
min-height: 70px
}
<div class="redbutton largebuttonwidthC">IAM TEXT</div>
change the buttons background to that blue circle
background-image: url(you img here...);
With a bit of CSS you can get something similar
.redbutton:before {
content: '';
position:absolute;
left:-20px;
right:-20px;
top:-20px;
bottom:-20px;
background-image: url('https://i.stack.imgur.com/Nb7M7.png');
background-size: 100% 100%;
}
I want to style the colors of a menu bar.
If the li is "active" then the text color and the border color should be blue, otherwise everything is gray.
On hover, the grey colors should turn blue.
I tried but it doesn't work. This is my code:
#import 'https://fonts.googleapis.com/css?family=Fjalla+One';
ul.dnav {
list-style-type: none;
margin-left: 0px;
margin-right: 0px;
overflow: hidden;
width: 400px;
-webkit-box-shadow: 0px 5px 30px 8px rgba(128, 128, 128, 1);
-moz-box-shadow: 0px 5px 30px 8px rgba(128, 128, 128, 1);
box-shadow: 0px 5px 30px 8px rgba(128, 128, 128, 1);
}
li.dnav {
font-size: 20px;
background-color: #FFF;
width: 100px;
float: left;
margin-top: 10px;
margin-right: 10px;
margin-left: 10px;
margin-bottom: 0px;
border-style: solid;
border-color: grey;
border-bottom-width: 5px;
border-left-width: 0px;
border-top-width: 0px;
border-right-width: 0px;
}
li.dnav a {
color: grey;
font-family: 'Fjalla One', sans-serif;
display: block;
text-align: center;
padding: 10px 10px;
text-decoration: none;
}
li.dnav a:hover {
background-color: #fff;
opacity: 1;
overflow: hidden;
color: rgba(0, 130, 255, 1);
border-color: rgba(0, 130, 255, 1);
}
a:active {
background-color: #fff;
opacity: 1;
overflow: hidden;
color: rgba(0, 130, 255, 1);
}
li.dnav-active {
border-color: rgba(0, 130, 255, 1);
border-bottom-width: 5px;
border-left-width: 0px;
border-top-width: 0px;
border-right-width: 0px;
color: rgba(0, 130, 255, 1);
}
<header>
<ul class="dnav">
<li class="dnav dnav-active"><a class="active" href="#">Home</a>
</li>
<li class="dnav">ser
</li>
<li class="dnav">con
</li>
</ul>
</header>
The problem is you are targeting the 'a' element in the hover selector.
The border is placed on the 'li' element instead.
So when you are hovering over the elemennt, only the border of the 'a' element is changing.
You could rewrite you're css to target the LI when hovering (as i did in the snippet), but i can recommend to fully style the 'a' element instead of the 'li'.
In the code snippet below the hover works with a small change to the 'hover' selector.
#import 'https://fonts.googleapis.com/css?family=Fjalla+One';
ul.dnav {
list-style-type: none;
margin-left: 0px;
margin-right: 0px;
overflow: hidden;
width: 400px;
-webkit-box-shadow: 0px 5px 30px 8px rgba(128, 128, 128, 1);
-moz-box-shadow: 0px 5px 30px 8px rgba(128, 128, 128, 1);
box-shadow: 0px 5px 30px 8px rgba(128, 128, 128, 1);
}
li.dnav {
font-size: 20px;
background-color: #FFF;
width: 100px;
float: left;
margin-top: 10px;
margin-right: 10px;
margin-left: 10px;
margin-bottom: 0px;
border-style: solid;
border-color: grey;
border-bottom-width: 5px;
border-left-width: 0px;
border-top-width: 0px;
border-right-width: 0px;
}
li.dnav a {
color: grey;
font-family: 'Fjalla One', sans-serif;
display: block;
text-align: center;
padding: 10px 10px;
text-decoration: none;
}
li.dnav:hover {
background-color: #fff;
opacity: 1;
overflow: hidden;
color: rgba(0, 130, 255, 1);
border-color: rgba(0, 130, 255, 1);
}
a:active {
background-color: #fff;
opacity: 1;
overflow: hidden;
color: rgba(0, 130, 255, 1);
}
li.dnav-active {
border-color: rgba(0, 130, 255, 1);
border-bottom-width: 5px;
border-left-width: 0px;
border-top-width: 0px;
border-right-width: 0px;
color: rgba(0, 130, 255, 1);
}
<header>
<ul class="dnav">
<li class="dnav dnav-active"><a class="active" href="#">Home</a>
</li>
<li class="dnav">ser
</li>
<li class="dnav">con
</li>
</ul>
</header>
You set up your hover rule only for the included a tag. I added a separate rule for the li element being hovered in the snippet below:
li.dnav:hover {
border-color: rgba(0, 130, 255, 1);
}
#import 'https://fonts.googleapis.com/css?family=Fjalla+One';
ul.dnav {
list-style-type: none;
margin-left: 0px;
margin-right: 0px;
overflow: hidden;
width: 400px;
-webkit-box-shadow: 0px 5px 30px 8px rgba(128, 128, 128, 1);
-moz-box-shadow: 0px 5px 30px 8px rgba(128, 128, 128, 1);
box-shadow: 0px 5px 30px 8px rgba(128, 128, 128, 1);
}
li.dnav {
font-size: 20px;
background-color: #FFF;
width: 100px;
float: left;
margin-top: 10px;
margin-right: 10px;
margin-left: 10px;
margin-bottom: 0px;
border-style: solid;
border-color: grey;
border-bottom-width: 5px;
border-left-width: 0px;
border-top-width: 0px;
border-right-width: 0px;
}
li.dnav a {
color: grey;
font-family: 'Fjalla One', sans-serif;
display: block;
text-align: center;
padding: 10px 10px;
text-decoration: none;
}
li.dnav a:hover {
background-color: #fff;
opacity: 1;
overflow: hidden;
color: rgba(0, 130, 255, 1);
border-color: rgba(0, 130, 255, 1);
}
li.dnav:hover {
border-color: rgba(0, 130, 255, 1);
}
a:active {
background-color: #fff;
opacity: 1;
overflow: hidden;
color: rgba(0, 130, 255, 1);
}
li.dnav-active {
border-color: rgba(0, 130, 255, 1);
border-bottom-width: 5px;
border-left-width: 0px;
border-top-width: 0px;
border-right-width: 0px;
color: rgba(0, 130, 255, 1);
}
<header>
<ul class="dnav">
<li class="dnav dnav-active"><a class="active" href="#">Home</a>
</li>
<li class="dnav">ser
</li>
<li class="dnav">con
</li>
</ul>
</header>
I'm trying to use a dropdown menu that allows user to check information if the mouse pointer is on the menu. If the user removes the pointer then the dropdown menu will disappear. Everything is in the table.
The problem I have now is, in the very end row, the part of a dropdown menu looks hidden ( to more precisely describe, it looks underneath of other element ).
The image should be preferred being over everything ( I hope so ). I tried to touch z-index but it doesn't work.
<table class="table table-striped table-bordered table-advance table-hover">
<tbody>
<td>
<div class="btn-group">
<div class="btn dropdown-toggle" style=" background-color:#EF4836;color:white; margin:2.5px 0;" data-toggle="dropdown" data-hover="dropdown" data-delay="0" data-close-others="true">
</div>
<ul class="dropdown-menu" role="menu" style="width:300px;">
<span style="background-color: rgb(0, 0, 255);"><font color="#ffffff">Hi!<br></font></span>
<li>Hello Stack Overflow</li>
<li>
Google vs Amazon</li>
</ul>
</div>
</td>
...
The below is the computed CSS property of the drowndown menu in Chrome.
background-color: rgb(239, 72, 54);
background-image: none;
border-bottom-color: rgba(0, 0, 0, 0);
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
border-bottom-style: solid;
border-bottom-width: 0px;
border-collapse: collapse;
border-image-outset: 0px;
border-image-repeat: stretch;
border-image-slice: 100%;
border-image-source: none;
border-image-width: 1;
border-left-color: rgba(0, 0, 0, 0);
border-left-style: solid;
border-left-width: 0px;
border-right-color: rgba(0, 0, 0, 0);
border-right-style: solid;
border-right-width: 0px;
border-top-color: rgba(0, 0, 0, 0);
border-top-left-radius: 4px;
border-top-right-radius: 4px;
border-top-style: solid;
border-top-width: 0px;
box-shadow: none;
box-sizing: border-box;
color: rgb(255, 255, 255);
cursor: pointer;
direction: ltr;
display: block;
filter: none;
float: left;
font-family: 'Open Sans', sans-serif;
font-size: 14px;
font-weight: normal;
height: 34px;
line-height: 20px;
margin-bottom: 2.5px;
margin-left: 0px;
margin-right: 0px;
margin-top: 2.5px;
outline-color: rgb(255, 255, 255);
outline-style: none;
outline-width: 0px;
padding-bottom: 7px;
padding-left: 14px;
padding-right: 14px;
padding-top: 7px;
position: relative;
text-align: center;
text-shadow: none;
touch-action: manipulation;
vertical-align: middle;
white-space: nowrap;
width: 115.438px
The below is the computed property of .
border-bottom-color: rgb(221, 221, 221);
border-bottom-style: solid;
border-bottom-width: 1px;
border-collapse: collapse;
border-image-outset: 0px;
border-image-repeat: stretch;
border-image-slice: 100%;
border-image-source: none;
border-image-width: 1;
border-left-color: rgb(221, 221, 221);
border-left-style: solid;
border-left-width: 1px;
border-right-color: rgb(221, 221, 221);
border-right-style: solid;
border-right-width: 1px;
border-top-color: rgb(221, 221, 221);
border-top-style: solid;
border-top-width: 1px;
box-sizing: border-box;
color: rgb(51, 51, 51);
direction: ltr;
display: table-cell;
font-family: 'Open Sans', sans-serif;
font-size: 13px;
height: 173px;
line-height: 18.5714px;
padding-bottom: 8px;
padding-left: 8px;
padding-right: 8px;
padding-top: 8px;
vertical-align: top;
width: 328px;
Where do I need to see to solve this issue? Please let me know! (: Looking forward to receiving good advice from experts!
Best
This is what I have so far:
<style type="text/css">
.signupsubmit {
line-height: 32px;
position: absolute;
left: 36px;
color: white;
top: 527px;
font-family: arial;
font-size: 17px;
font-weight: 600;
width: 137px;
height: 30px;
border-color: #00297A;
border-radius: 4px;
border: 1px solid black;
border-style: solid;
background-color: #FFB630;
text-indent: 30px;
}
<style>
<div class = "signupsubmit">Continue</div>
Can someone write an example of how to make the Continue button look 3D instead of 2D?
https://jsfiddle.net/zt2x0bct/
Just add a box-shadow. Probably the simpliest way:
box-shadow: 0 1px 6px rgba(0, 0, 0, 0.12), 0 1px 4px rgba(0, 0, 0, 0.24);
Edit: Based on your comment, sounds like you are looking for a "gradient". See updated fiddle. You can also use an online gradient generator to help with this. Here's one that you can modify the "start" and "end" background color. Or you can click on the "showcase" and find a button that is close to what you are looking for:
http://css3button.net/
Thanks guys for all your help. I finally got the answer and I will be writing it down. Thanks Niloct for you guide on using inspect element.
<div class = "signupsubmit">Continue<div>
<style type = "text/css">
.signupsubmit {
webkit-appearance: none;
align-items: flex-start;
background-attachment: scroll;
background-clip: border-box;
background-color: #FFA500;
background-origin: padding-box;
background-size: auto;
border-bottom-color: black;
border-bottom-left-radius: 5px;
border-bottom-right-radius: 5px;
border-bottom-style: solid;
border-bottom-width: 1px;
border-image-outset: 0px;
border-image-repeat: stretch;
border-image-slice: 100%;
border-image-source: none;
border-image-width: 1;
border-left-color: black;
border-left-style: solid;
border-left-width: 1px;
border-right-color: black;
border-right-style: solid;
border-right-width: 1px;
border-top-color: black;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
border-top-style: solid;
border-top-width: 1px;
box-shadow: #80B2FF 0px 1px 1px 0px inset;
box-sizing: border-box;
color: rgb(255, 255, 255);
cursor: pointer;
direction: ltr;
display: inline-block;
font-family: 'Arial', 'Helvetica Neue', 'Segoe UI', 'Malgun Gothic', Meiryo, 'Microsoft JhengHei', helvetica, arial, sans-serif;
font-size: 12px;
font-stretch: normal;
font-style: normal;
font-variant: normal;
font-weight: bold;
height: 31px;
letter-spacing: 1px;
line-height: 15.12px;
margin-bottom: 10px;
margin-left: 0px;
margin-right: 0px;
margin-top: 10px;
min-width: 194px;
padding-bottom: 7px;
padding-left: 20px;
padding-right: 20px;
padding-top: 7px;
position: relative;
text-align: center;
text-indent: 0px;
text-rendering: optimizeLegibility;
text-shadow: rgba(0, 0, 0, 0.498039) 0px 1px 2px;
text-transform: none;
width: 194px;
word-spacing: 0px;
writing-mode: lr-tb;
-webkit-writing-mode: horizontal-tb;
zoom: 1;
left: 37px;
top: 515px;
position: absolute;
}
</style>
I'm not sure about 3D but you can make it as though it is in a 3D environment with 'rotate' command.
.signupsubmit {
transform: rotateY(70deg) rotateX(70deg);
-webkit-transform: rotateY(70deg) rotateX(70deg);
transition: 2s;
line-height: 32px;
left: 36px;
color: white;
text-align: center;
top: 527px;
border: none;
font-family: arial;
font-size: 17px;
font-weight: 500;
width: 137px;
height: 30px;
border-radius: 2px;
background-color: #FFB630;
text-indent: 30px;
box-shadow: 0 1px 6px rgba(0, 0, 0, 0.12), 0 1px 4px rgba(0, 0, 0, 0.24);
}
.signupsubmit:hover {
-webkit-transform: rotateY(0deg) rotateX(0deg);
transform: rotateY(0deg) rotateX(0deg);
}
<button class="signupsubmit">continue</button>
<p>You can also make a smooth transition with transition: (ex:2s);</p>
Copied from and credits goes to this
div {
transform:
perspective(75em)
rotateX(18deg);
box-shadow:
rgba(22, 31, 39, 0.42) 0px 60px 123px -25px,
rgba(19, 26, 32, 0.08) 0px 35px 75px -35px;
border-radius: 10px;
border: 1px solid;
border-color:
rgb(213, 220, 226)
rgb(213, 220, 226)
rgb(184, 194, 204);
}