Opera - something terrible with focus and hover events - html

I have some CSS that works well in Chrome, FireFox, and IE, but looks very strange in Opera.
Link to the fiddle
Also, I took screenshots:
This what happens on just forgot link hover:
This happens on form focus (complete disaster):
Normal look in Chrome:
Submit button on focus loses it's border color (why in hell?!)
Some mess on focus, I can't explain, just take a look on second pic
I tested on the latest version of Opera. What the hell is wrong with this browser? Even IE8 shows everything as I expect it.
CSS:
.sign_in {
position: fixed;
top: 50%;
left: 50%;
margin-top: -100px;
margin-left: -255px;
background: #ffffff;
width: 510px ;
height: 240px;
font-family: Arial,Liberation Sans,DejaVu Sans,sans-serif;
z-index: 9999999;
font-size: 14px;
-webkit-box-shadow: 0 0 5px black;
-moz-box-shadow: 0 0 5px black;
box-shadow: 0 0 5px black;
}
.signs_form{
border-right-style: solid;
border-color: rgba(80, 140, 255, 0.83);
border-width: 1px;
margin-top: 40px;
vertical-align: 100%;
margin-left: 50px;
padding-right: 50px;
font-weight: 500;
display: inline-block;
}
input#email{
border-style: solid;
border-color: #378de5;
border-width: 1px;
padding: 3px 3px 3px 3px;
font-size: 14px;
outline: none;
font-style: normal;
font-weight: 400;
}
input#email:focus{
border-color: rgba(2, 22, 222, 0.97);
}
input#password{
border-style: solid;
border-color: #378de5;
border-width: 1px;
padding: 3px 3px 3px 3px;
font-size: 14px;
outline: none;
font-style: normal;
font-weight: 400;
}
input#password:focus{
border-color: rgba(2, 22, 222, 0.97);
}
.sign_in_submit {
margin-top: 0;
border: solid 1px #378de5;;
background-color: #ffffff;
color: #378de5;
padding: 2px 5px 2px 5px ;
font-family: Arial,Liberation Sans,DejaVu Sans,sans-serif;
font-size: 16px;
font-weight: 500;
}
.sign_in_submit:hover {
cursor: pointer;
border-color: rgba(2, 22, 222, 0.97);
color: rgba(2, 22, 222, 0.97);
}
#close {
float: right;
padding-left:-10px;
padding-top: -10px;
margin-right: 5px;
}
#close_sign_in_popup {
text-decoration: none;
font-family: Arial,Liberation Sans,DejaVu Sans,sans-serif;
font-size: 20px;
color: #d61354;
}
#close_sign_in_popup:hover {
color: #fc145f;
}
.forgot_pass{
display: block;
margin-top: 5px;
margin-bottom: 0;
margin-left: 2px;
font-family: Arial,Liberation Sans,DejaVu Sans,sans-serif;
color: #378de5;
font-size: 13px;
font-weight: 400;
text-decoration: none;
}
.forgot_pass:hover{
height: 100%;
text-decoration: underline;
}

Forked http://jsfiddle.net/w29WQ/1/
.sign_in {
/*top: 50%; // so it seems the positioning gets all funky in opera
left: 50%;*/
margin-top: 0;
margin-left: 0;
/* Your other styles for this element */
}
Anyhow, seems your fixed positioning was causing errors, I simply commented out the top and left positioning in the containing div, and reset the margins to keep the element displayed.

Ok, guys.
1) Shifts in form
The reason is that Opera strongly dislikes inline-block as form property, which is quite logical, actually, but all other browser undertand this and it is convinient
2) Loosing border-color of submit button on field focus
But here - Opera bug, can be fixed by placing before real tag invisible copy - so it is like bait to this Opera bug.

Related

Hey guys! I need to create an effect with 'hover' on several buttons in the CSS, but I can't. What do I do?

Well, I need applicable the effect ::hover in many buttons, but I don't know to do this. Look my code:
`.button-password-simples, .button-password-with-numbers, .button-password-shuffled, .chooser_button {
cursor: pointer;
display: inline-block;
position: relative;
margin: 0;
margin-top: 8px;
padding: 0;
font-size: 10pt;
text-align: center;
width: 90%;
height: 40px;
left: 10.5px;
background-color: #121213c0;
color: rgba(255, 255, 255, 0.856);
font-family: Verdana, Geneva, Tahoma, sans-serif;
border-radius: 3.5px;
border: none;
box-shadow: 3px 3px 3px 1px rgb(0 0 0 / 11%);
}
`
Can seem strange, but this CSS connects that all the buttons haha
Ok! I accept suggestions for the updates and, the principal: solve my problem...
Thanks! <3
Try this, it's the simplest way to achieve the hover effect. Be careful here, applying the same style on buttons with different attributes may lead to undesired results in your code functionality.
.button-password-simples:hover, .button-password-with-numbers:hover, .button-password-shuffled:hover, .chooser_button:hover {
cursor: pointer;
display: inline-block;
position: relative;
margin: 0;
margin-top: 8px;
padding: 0;
font-size: 10pt;
text-align: center;
width: 90%;
height: 40px;
left: 10.5px;
background-color: #121213c0;
color: rgba(255, 255, 255, 0.856);
font-family: Verdana, Geneva, Tahoma, sans-serif;
border-radius: 3.5px;
border: none;
box-shadow: 3px 3px 3px 1px rgb(0 0 0 / 11%);
}

How to increase multiple lines with <select> option on Firefox?

I got problem with <select> element on Firefox, It should list an option as text wrap like Google Chrome or Safari
here is my CSS(SASS) code
select.form-control.bare-select{
#include appearance(none);
margin: 6px 0 10px;
padding: 8px 24px 8px 12px;
border: 1px solid $grey;
border-radius: 4px;
background: $white url(/img/hero-select-caret.png) right center no-repeat;
white-space: pre-line;
word-wrap: break-word;
background-size: 23px 50px;
height: auto;
color: $black;
cursor: pointer;
font-size: 14px;
line-height: 1.6;
&:hover {
color: darken($dark-blue, 10%);
}
}
CodePen here: https://codepen.io/anon/pen/xYVKoY

Activating one button also affects the other?

Here's the demo: https://jsfiddle.net/krycLxb0/
The way this is set up is so that to create the illusion that the button is pressed, the padding of the outer container (.button) is changed, making the top padding more than the bottom. However, when this is activated, the other button seems to shrink down as well. Why does this happen, and how do I fix it?
Here's the source:
header {
letter-spacing: .04em;
font-weight: 900;
font-family: sans-serif;
}
.button {
padding: 4px;
padding-bottom: 12px;
border-radius: 6px;
display: inline-block;
transition: 300ms ease;
will-change: auto;
text-transform: uppercase;
text-align: center;
font-size: 14px;
text-shadow: 0px 4px 0px rgba(0, 0, 0, 0.2);
}
.button span {
display: inline-block;
width: 10em;
padding: 1.2em;
border-radius: 2px;
background: #FF4A50;
}
.button:hover {
box-shadow: 0px 6px 0px 0px rgba(0, 0, 0, 0.2);
}
.button:active {
transition: none;
padding-top: 12px;
padding-bottom: 4px;
}
.button--filled {
background: #BC2E56;
color: white;
}
.button--filled span {
background: #FF4A50;
}
.button--dark {
background: rgba(65, 57, 76, 0.6);
}
.button--dark span {
background: #FFF8F2;
}
<header>
<a class="button button--filled" href="#"><span>Get Started</span></a>
<a class="button button--dark" href="#"><span>Learn more</span></a>
</header>
Because your buttons are now vertical-align: baseline. Just add vertical-align: top; to your .button. See fiddle

How to make a Div box look 3D

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);
}

Search box in CSS3 not the right size

I'm trying to make one of those pretty CSS3 search boxes based on the code from this site: http://speckyboy.com/2012/02/15/how-to-build-a-stylish-css3-search-box/
Everything looks like it does in the picture on that site except for the actual search box, which instead looks like this (in both Safari and Chrome):
Any help getting the search box to look the way it should?
UPDATE: Here is the code (you can also get this at the link above):
/* Form wrapper styling */
.form-wrapper {
width: 450px;
padding: 15px;
margin: 150px auto 50px auto;
background: #444;
background: rgba(0,0,0,.2);
border-radius: 10px;
box-shadow: 0 1px 1px rgba(0,0,0,.4) inset, 0 1px 0 rgba(255,255,255,.2);
}
/* Form text input */
.form-wrapper input {
width: 330px;
height: 20px;
padding: 10px 5px;
float: left;
font: bold 15px 'lucida sans', 'trebuchet MS', 'Tahoma';
border: 0;
background: #eee;
border-radius: 3px 0 0 3px;
}
.form-wrapper input:focus {
outline: 0;
background: #fff;
box-shadow: 0 0 2px rgba(0,0,0,.8) inset;
}
.form-wrapper input::-webkit-input-placeholder {
color: #999;
font-weight: normal;
font-style: italic;
}
.form-wrapper input:-moz-placeholder {
color: #999;
font-weight: normal;
font-style: italic;
}
.form-wrapper input:-ms-input-placeholder {
color: #999;
font-weight: normal;
font-style: italic;
}
/* Form submit button */
.form-wrapper button {
overflow: visible;
position: relative;
float: right;
border: 0;
padding: 0;
cursor: pointer;
height: 40px;
width: 110px;
font: bold 15px/40px 'lucida sans', 'trebuchet MS', 'Tahoma';
color: #fff;
text-transform: uppercase;
background: #d83c3c;
border-radius: 0 3px 3px 0;
text-shadow: 0 -1px 0 rgba(0, 0 ,0, .3);
}
.form-wrapper button:hover{
background: #e54040;
}
.form-wrapper button:active,
.form-wrapper button:focus{
background: #c42f2f;
outline: 0;
}
.form-wrapper button:before { /* left arrow */
content: '';
position: absolute;
border-width: 8px 8px 8px 0;
border-style: solid solid solid none;
border-color: transparent #d83c3c transparent;
top: 12px;
left: -6px;
}
.form-wrapper button:hover:before{
border-right-color: #e54040;
}
.form-wrapper button:focus:before,
.form-wrapper button:active:before{
border-right-color: #c42f2f;
}
.form-wrapper button::-moz-focus-inner { /* remove extra button spacing for Mozilla Firefox */
border: 0;
padding: 0;
}
Box-sizing is your friend:
.font-wrapper input {
...
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}