I have the following code for my webpage, and when I use it in Chrome every thing is fine, but when I use it in Firefox the style is changed.
I need to make the Firefox style same like Chrome style, so any suggestion for that?
I mention in the code below what I tried to do.
<html>
<head>
<style>
div
{
background-color: #FFFFFF;
border: 1px solid #86B3E6;
color: 2F62AC;
display: block;
font-size: 17px;
font-weight: bold;
margin: 10px;
padding: 5px 5px;
text-decoration: none;
direction:rtl;
border-radius: 8px;
}
a
{
background-color: #FFFFFF;
color: 2F62AC;
font-size: 17px;
font-weight: bold;
text-decoration: none;
direction:rtl;
position: relative;
border-radius: 8px;
border: none;
padding: 12px 10px;
text-align: center;
}
a.option1
{
//Not centered but filled all area
display: flex;
display: -webkit-box;
-webkit-box-pack: center;
-webkit-box-align: center;
}
a.option2
{
//Not centered and not filled all area
display: -webkit-box;
-webkit-box-pack: center;
-webkit-box-align: center;
display: -moz-box;
-moz-box-pack: center;
-moz-box-align: center; */
}
a:active, a:hover {
background-color: #2F62AC;
color: #FFFFFF;
}
</style>
</head>
<body>
<div><a class="option1" href="#">Option 1</a></div>
<div><a class="option2" href="#">Option 2</a></div>
</body>
</html>
Best regards.
You do not need Flexbox for this purpose: just display: block on your anchor:
http://cssdeck.com/labs/ocotcmpf
div
{
background-color: #FFFFFF;
border: 1px solid #86B3E6;
color: 2F62AC;
display: block;
font-size: 17px;
font-weight: bold;
margin: 10px;
padding: 5px 5px;
text-decoration: none;
direction:rtl;
border-radius: 8px;
}
a
{
background-color: #FFFFFF;
color: 2F62AC;
font-size: 17px;
font-weight: bold;
text-decoration: none;
direction:rtl;
position: relative;
border-radius: 8px;
border: none;
padding: 12px 10px;
text-align: center;
display: block; /* here */
}
a:active, a:hover {
background-color: #2F62AC;
color: #FFFFFF;
}
Related
I have a div with inline a few items but the item on the right is an image which must be align right in that div.
html
<div class='row'>
<div class='col-md-12'>
<div class='bank_tribune_speler' data-spelerid='77'>
<div class='positie'>K</div>
<img src='img/clubs/shirt.png' class='bank_tribune_shirt' alt='shirt'>
<div class='bank_tribune_naam_info'>
<span class='ellipsis font-weight-bold club_margin_top'>Name</span>
</div>
<div class='bank_tribune_wissel'>
<div class='bank_tribune_wissel_icon'></div>
</div>
</div>
</div>
</div>
css
.bank_tribune_speler {
display: flex;
padding-top: 8px;
padding-left: 10px;
border: solid 1px #b5b5b5;
margin-top: 10px;
}
.bank_tribune_shirt {
height: 50px;
width: 50px;
margin-left: 12px;
margin-top: -5px;
}
.positie {
color: #fff;
font-size: 22px;
font-weight: 700;
height: 40px;
line-height: 40px;
position: relative;
text-align: center;
width: 40px;
}
.bank_tribune_naam_info {
font-size: 20px;
line-height: 22px;
margin-left: 10px;
margin-top: -3px;
}
.bank_tribune_wissel_icon {
background: url("../img/wissel4.jpg");
height: 40px;
margin-right: 15px;
width: 48px;
}
See JSFiddle
I want the image with the red and green arrow to align right in the div with the grey border
I have tried float: right, text-align: right but so far no luck .... :-(
Any idea how to achieve this?
Kind regards,
Arie
I have achieved it by using float: right .... ;-)
See JSFiddle
body {
font-family: 'Hind', sans-serif;
}
.bank_tribune_speler {
padding-top: 8px;
padding-left: 10px;
border: solid 1px #b5b5b5;
margin-top: 10px;
height: 50px;
}
.bank_tribune_shirt {
height: 50px;
width: 50px;
margin-left: 12px;
margin-top: -5px;
float: left;
}
.positie {
color: #fff;
font-size: 22px;
font-weight: 700;
height: 40px;
line-height: 40px;
position: relative;
text-align: center;
width: 40px;
float: left;
}
.linie-positie-keeper {
background-color: red;
}
.bank_tribune_naam_info {
font-size: 20px;
line-height: 22px;
margin-left: 10px;
margin-top: -3px;
float: left;
}
.club_margin_top {
margin-top: 0.8rem!important;
}
.font-weight-bold {
font-weight: 700!important;
}
.bank_tribune_wissel {
height: 40px;
width: 40px;
margin-right: 15px;
}
.float-right {
float: right!important;
}
I can't apply fixed height with scroll. When I fixed height container blow up all div's height. How can I fixed height div? Fixed tree items in container. I made fix container height '200px' but it doesn't work. Maybe there is something simple but I can't see.
Here's my simple code:
<div class="container-Atanan">
<div class="container-Atanan-Header">
<i class="fas fa-american-sign-language-interpreting fa-2x"></i>
<div class="container-Atanan-Header-Title"><span>Başlık</span></div>
</div>
<div class="container-Atanan-ListItem">
<a class="listItem" href="#">
<div class="container-Atanan-ListItem-Avatar">
<img src="https://cdn.vuetifyjs.com/images/lists/1.jpg" alt="">
</div>
<div class="container-Atanan-ListItem-Content">
<div class="Content-Title">Lorem ipsum.</div>
<div class="Content-Subtitle">
<span>Lorem ipsum dolor sit. <span class="italic">-25.2.2019</span></span>
<span class="italic oldline">Lorem ipsum dolor sit amet. </span>
</div>
</div>
</a>
</div>
and my scss:
.container-Atanan {
box-shadow:0px 3px 1px -2px rgba(0,0,0,0.2), 0px 2px 2px 0px rgba(0,0,0,0.14), 0px 1px 5px 0px rgba(0,0,0,0.12);
display: flex;
flex-direction: column;
box-sizing: border-box;
// background-color : #7AD3B1;
width: 470px;
height: 80%;
overflow: auto;
padding-bottom : 30px;
font-family: 'Roboto', sans-serif;
&-Header {
display: inline-flex;
background-color: #e2e2e2;
height: 50px;
align-items: center;
&-Title{
padding:15px;
}
}
&-ListItem{
display: inline-flex;
.listItem{
display: inline-flex;
width: 100%;
height: 72px;
text-decoration: none;
color:black;
padding: 15px 15px;
}
&-Avatar {
margin-right: 10px;
display: inline-flex;
align-items: center;
img{
border-radius: 50%;
width: 40px;
height: auto;
}
}
&-Content {
display: inline-flex;
padding-right: 30px;
flex-direction: column;
justify-content: center;
padding-left:10px;
width: 362px;
height: 72px;
box-shadow: 0 8px 6px -20px rgba(0,0,0,0.2), 0px 2px 2px 0px rgba(0,0,0,0.14), 0px 1px 5px 0px rgba(0,0,0,0.12);
transition: background-color 0.5s ease-out;
.Content-Title{
font-weight: 500;
}
.Content-Subtitle {
font-weight: 300;
display: inline-flex;
flex-direction: column;
.italic{
font-weight : lighter;
font-style: italic;
font-size :1em;
}
.oldline{
text-decoration:line-through;
}
}
&:hover{
background: rgba(0,0,0,0.05)
}
}
}
.divider{
display: block;
margin-left: 72px;
border: solid;
border-width: thin 0 0 0;
margin-left: 0;
margin-right: 0;
margin-bottom : 0;
&-Light{
border-color: rgba(0,0,0,0.12);
}
}
}
and my fiddle
Use this instead
display:grid;
grid-template-columns :max-content max-content;
In &-header and remove inline-flex from &-ListItem and you can set the height in .container-Atanan to any value you want
body{
background-color:#FEFCFC;
}
.container-Atanan {
box-shadow:0px 3px 1px -2px rgba(0,0,0,0.2), 0px 2px 2px 0px rgba(0,0,0,0.14), 0px 1px 5px 0px rgba(0,0,0,0.12);
display: flex;
flex-direction: column;
box-sizing: border-box;
// background-color : #7AD3B1;
width: 470px;
height:350px;
overflow: auto;
padding-bottom : 30px;
font-family: 'Roboto', sans-serif;
&-Header {
display:grid;
grid-template-columns :max-content max-content;
background-color: #e2e2e2;
height: 50px;
align-items: center;
&-Title{
padding:15px;
}
}
&-ListItem{
.listItem{
display: inline-flex;
width: 100%;
height: 72px;
text-decoration: none;
color:black;
padding: 15px 15px;
}
&-Avatar {
margin-right: 10px;
display: inline-flex;
align-items: center;
img{
border-radius: 50%;
width: 40px;
height: auto;
}
}
&-Content {
display: inline-flex;
padding-right: 30px;
flex-direction: column;
justify-content: center;
padding-left:10px;
width: 362px;
height: 72px;
box-shadow: 0 8px 6px -20px rgba(0,0,0,0.2), 0px 2px 2px 0px rgba(0,0,0,0.14), 0px 1px 5px 0px rgba(0,0,0,0.12);
transition: background-color 0.5s ease-out;
.Content-Title{
font-weight: 500;
}
.Content-Subtitle {
font-weight: 300;
display: inline-flex;
flex-direction: column;
.italic{
font-weight : lighter;
font-style: italic;
font-size :1em;
}
.oldline{
text-decoration:line-through;
}
}
&:hover{
background: rgba(0,0,0,0.05)
}
}
}
.divider{
display: block;
margin-left: 72px;
border: solid;
border-width: thin 0 0 0;
margin-left: 0;
margin-right: 0;
margin-bottom : 0;
&-Light{
border-color: rgba(0,0,0,0.12);
}
}
}
JSFIDDLE
I''ve written an app in lua using the Corona SDK, I'm trying to download some images from a google drive folder.
I've used the OAth playground to authroize the scopes I need and I've obtained a refresh token and have a method to obtain a new access token when necessary. This is how I download the images:
network.download(
"https://drive.google.com/uc?export=download&id="..decodedResponse.files[index].id,
"GET",
networkListener,
params,
decodedResponse.files[index].name,
system.DocumentsDirectory
)
where decodedResponse refers to the json obtained that lists all the files in the specified folder. This was working fine a few days ago but now whenever I try it, the image downloaded is invalid and corrupt. I even tried using a new folder in the drive.
I've tried other links such like
https://www.googleapis.com/drive/v3/files/FILE_ID_HERE?alt=media
and some others I've seen online but these give me a
code 403
"Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup."
error. I read somewhere that specifying scope could fix the code 403 error but I'm not sure where exactly to specify this.
I'd appreciate the help, thanks!
Edit: I took a look at one of the images with a text editor, the result was some html that look to be code for a google auth page, some of it is below:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta content="width=300, initial-scale=1" name="viewport">
<meta name="description" content="Google Drive is a free way to keep your files backed up and easy to reach from any phone, tablet, or computer. Start with 15GB of Google storage – free.">
<meta name="google-site-verification" content="LrdTUW9psUAMbh4Ia074-BPEVmcpBxF6Gwf0MSgQXZs">
<title>Meet Google Drive – One place for all your files</title>
<style>
#font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 300;
src: local('Open Sans Light'), local('OpenSans-Light'), url(//fonts.gstatic.com/s/opensans/v15/DXI1ORHCpsQm3Vp6mXoaTYnF5uFdDttMLvmWuJdhhgs.ttf) format('truetype');
}
#font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
src: local('Open Sans'), local('OpenSans'), url(//fonts.gstatic.com/s/opensans/v15/cJZKeOuBrn4kERxqtaUH3aCWcynf_cDxXwCLxiixG1c.ttf) format('truetype');
}
</style>
<style>
h1, h2 {
-webkit-animation-duration: 0.1s;
-webkit-animation-name: fontfix;
-webkit-animation-iteration-count: 1;
-webkit-animation-timing-function: linear;
-webkit-animation-delay: 0;
}
#-webkit-keyframes fontfix {
from {
opacity: 1;
}
to {
opacity: 1;
}
}
</style>
<style>
html, body {
font-family: Arial, sans-serif;
background: #fff;
margin: 0;
padding: 0;
border: 0;
position: absolute;
height: 100%;
min-width: 100%;
font-size: 13px;
color: #404040;
direction: ltr;
-webkit-text-size-adjust: none;
}
button,
input[type=button],
input[type=submit] {
font-family: Arial, sans-serif;
font-size: 13px;
}
a,
a:hover,
a:visited {
color: #427fed;
cursor: pointer;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
h1 {
font-size: 20px;
color: #262626;
margin: 0 0 15px;
font-weight: normal;
}
h2 {
font-size: 14px;
color: #262626;
margin: 0 0 15px;
font-weight: bold;
}
input[type=email],
input[type=number],
input[type=password],
input[type=tel],
input[type=text],
input[type=url] {
-moz-appearance: none;
-webkit-appearance: none;
appearance: none;
display: inline-block;
height: 36px;
padding: 0 8px;
margin: 0;
background: #fff;
border: 1px solid #d9d9d9;
border-top: 1px solid #c0c0c0;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
-moz-border-radius: 1px;
-webkit-border-radius: 1px;
border-radius: 1px;
font-size: 15px;
color: #404040;
}
input[type=email]:hover,
input[type=number]:hover,
input[type=password]:hover,
input[type=tel]:hover,
input[type=text]:hover,
input[type=url]:hover {
border: 1px solid #b9b9b9;
border-top: 1px solid #a0a0a0;
-moz-box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
-webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}
input[type=email]:focus,
input[type=number]:focus,
input[type=password]:focus,
input[type=tel]:focus,
input[type=text]:focus,
input[type=url]:focus {
outline: none;
border: 1px solid #4d90fe;
-moz-box-shadow: inset 0 1px 2px rgba(0,0,0,0.3);
-webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,0.3);
box-shadow: inset 0 1px 2px rgba(0,0,0,0.3);
}
input[type=checkbox],
input[type=radio] {
-webkit-appearance: none;
display: inline-block;
width: 13px;
height: 13px;
margin: 0;
cursor: pointer;
vertical-align: bottom;
background: #fff;
border: 1px solid #c6c6c6;
-moz-border-radius: 1px;
-webkit-border-radius: 1px;
border-radius: 1px;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
position: relative;
}
input[type=checkbox]:active,
input[type=radio]:active {
background: #ebebeb;
}
input[type=checkbox]:hover {
border-color: #c6c6c6;
-moz-box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
-webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}
input[type=radio] {
-moz-border-radius: 1em;
-webkit-border-radius: 1em;
border-radius: 1em;
width: 15px;
height: 15px;
}
input[type=checkbox]:checked,
input[type=radio]:checked {
background: #fff;
}
input[type=radio]:checked::after {
content: '';
display: block;
position: relative;
top: 3px;
left: 3px;
width: 7px;
height: 7px;
background: #666;
-moz-border-radius: 1em;
-webkit-border-radius: 1em;
border-radius: 1em;
}
input[type=checkbox]:checked::after {
content: url(https://ssl.gstatic.com/ui/v1/menu/checkmark.png);
display: block;
position: absolute;
top: -6px;
left: -5px;
}
input[type=checkbox]:focus {
outline: none;
border-color: #4d90fe;
}
.stacked-label {
display: block;
font-weight: bold;
margin: .5em 0;
}
.hidden-label {
position: absolute !important;
clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
clip: rect(1px, 1px, 1px, 1px);
height: 0px;
width: 0px;
overflow: hidden;
visibility: hidden;
}
input[type=checkbox].form-error,
input[type=email].form-error,
input[type=number].form-error,
input[type=password].form-error,
input[type=text].form-error,
input[type=tel].form-error,
input[type=url].form-error {
border: 1px solid #dd4b39;
}
.error-msg {
margin: .5em 0;
display: block;
color: #dd4b39;
line-height: 17px;
}
.help-link {
background: #dd4b39;
padding: 0 5px;
color: #fff;
font-weight: bold;
display: inline-block;
-moz-border-radius: 1em;
-webkit-border-radius: 1em;
border-radius: 1em;
text-decoration: none;
position: relative;
top: 0px;
}
.help-link:visited {
color: #fff;
}
.help-link:hover {
color: #fff;
background: #c03523;
text-decoration: none;
}
.help-link:active {
opacity: 1;
background: #ae2817;
}
.wrapper {
position: relative;
min-height: 100%;
}
.content {
padding: 0 44px;
}
.main {
padding-bottom: 100px;
}
/* For modern browsers */
.clearfix:before,
.clearfix:after {
content: "";
display: table;
}
.clearfix:after {
clear: both;
}
/* For IE 6/7 (trigger hasLayout) */
.clearfix {
zoom:1;
}
.google-header-bar {
height: 71px;
border-bottom: 1px solid #e5e5e5;
overflow: hidden;
}
.header .logo {
background-image: url(https://ssl.gstatic.com/accounts/ui/logo_1x.png);
background-size: 116px 38px;
background-repeat: no-repeat;
margin: 17px 0 0;
float: left;
height: 38px;
width: 116px;
}
I can't post the entire thing cause it exceeds the body character limit
I was able to get it to work by using a different url and adding this:
local params = {}
params.progress = true
params.headers = headers
This was the URL I used:
https://www.googleapis.com/drive/v3/files/FILE_ID_HERE?alt=media
What is the proper way to create a fluid row with Foundation 6 and scss? Currently I am doing it by setting $width: none, but I'm not sure if this is correct:
.topBanner {
#include grid-row($width: none);
background-color: $secondary-color;
padding: 5px;
text-align: center;
}
The produced CSS from this is:
.topBanner {
max-width: none;
margin-left: auto;
margin-right: auto;
margin: 0;
list-style-type: none;
background-color: #4990E2;
padding: 5px;
text-align: center;
}
I'm trying to use the example here:
http://jsfiddle.net/UNs9J/1/
HTML:
<p>Hover here<span>some text here ?</span></p>
CSS:
span{
background:#F8F8F8;
border: 5px solid #DFDFDF;
color: #717171;
font-size: 13px;
height: 30px;
letter-spacing: 1px;
line-height: 30px;
position: relative;
text-align: center;
text-transform: uppercase;
top: -80px;
left:-30px;
display:none;
padding:0 20px;
}
span:after{
content:'';
position:absolute;
bottom:-10px;
width:10px;
height:10px;
border-bottom:5px solid #dfdfdf;
border-right:5px solid #dfdfdf;
background:#f8f8f8;
left:50%;
margin-left:-10px;
-moz-transform:rotate(45deg);
-webkit-transform:rotate(45deg);
transform:rotate(45deg);
}
p{
margin:100px;
float:left;
position:relative;
cursor:pointer;
}
p:hover span{
display:block;
}
So, my problem is, when the text is too long, how do I get it to put the overflowing part in a new line?
Just change
span{
background:#F8F8F8;
border: 5px solid #DFDFDF;
color: #717171;
font-size: 13px;
height: 30px;
letter-spacing: 1px;
line-height: 30px;
position: relative;
text-align: center;
text-transform: uppercase;
top: -80px;
left:-30px;
display:none;
padding:0 20px;
}
to
span{
background:#F8F8F8;
border: 5px solid #DFDFDF;
color: #717171;
font-size: 13px;
height: auto;
letter-spacing: 1px;
line-height: 30px;
position: relative;
text-align: center;
text-transform: uppercase;
top: -80px;
left:-30px;
display:none;
padding:0 20px;
}
then you probably have to adjust the top-attribute to your needs.