User profile error [closed] - css

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 8 years ago.
Improve this question
For some reason the css is not working I'm not sure where the problem is:
This is how it's supposed to look:
http://codepen.io/lukepeters/pen/DtzvE
The JS FIDDLE:
http://jsfiddle.net/Wc3RK/
I don't know what went wrong? The code is the same but it's coming out differen't on the JS Fiddle.
CSS:
html
height: 100%
body
height: 100%
//background: #a7d5cd
+background-image(linear-gradient(#dddddd, #cccccc))
#people
position: relative
margin: 80px auto
padding: 0
width: 480px
font-family: 'Helvetica Neue', Helvetica, sans-serif
font-size: 16px
line-height: 22px
color: #3b3b3b
-webkit-font-smoothing: antialiased
list-style-type: none
li
position: relative
margin: 0 0 40px 0
padding: 10px 8px 8px 54px
height: 42px
border: 1px solid #bbbbbb
border-radius: 4px
box-shadow: 0 1px 3px rgba(0,0,0,0.06), inset 0 1px 0 #ffffff
background: #f6f6f6
img
position: absolute
top: -16px
left: -16px
z-index: 10
margin: 0
padding: 4px
width: 50px
height: 50px
border: 1px solid #bbbbbb
box-shadow: 0 1px 0 #ffffff
border-radius: 50%
background: #ffffff
h2
margin: 0
font-size: 18px
line-height: 22px
font-weight: 400
color: #4b4b4b
text-shadow: -1px -1px 0 rgba(255,255,255,0.7)
.info
margin: 0
display: block
em
margin: 0 18px 0 0
font-size: 11px
line-height: 20px
font-weight: 400
font-style: normal
letter-spacing: 1px
text-transform: uppercase
color: #5b5b5b
float: left

You are using the sass code, not css. I compiled the sass code and forked your fiddle. Search sass on google. Click on sass in the first page(codepen) to see the compiled css
http://jsfiddle.net/m52vb/
html {
height: 100%;
}
body {
height: 100%;
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #dddddd), color-stop(100%, #cccccc));
background-image: -webkit-linear-gradient(#dddddd, #cccccc);
background-image: -moz-linear-gradient(#dddddd, #cccccc);
background-image: -o-linear-gradient(#dddddd, #cccccc);
background-image: linear-gradient(#dddddd, #cccccc);
}
#people {
position: relative;
margin: 80px auto;
padding: 0;
width: 480px;
font-family: "Helvetica Neue", Helvetica, sans-serif;
font-size: 16px;
line-height: 22px;
color: #3b3b3b;
-webkit-font-smoothing: antialiased;
list-style-type: none;
}
#people li {
position: relative;
margin: 0 0 40px 0;
padding: 10px 8px 8px 54px;
height: 42px;
border: 1px solid #bbbbbb;
border-radius: 4px;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), inset 0 1px 0 white;
background: #f6f6f6;
}
#people li img {
position: absolute;
top: -16px;
left: -16px;
z-index: 10;
margin: 0;
padding: 4px;
width: 50px;
height: 50px;
border: 1px solid #bbbbbb;
box-shadow: 0 1px 0 white;
border-radius: 50%;
background: white;
}
#people li h2 {
margin: 0;
font-size: 18px;
line-height: 22px;
font-weight: 400;
color: #4b4b4b;
text-shadow: -1px -1px 0 rgba(255, 255, 255, 0.7);
}
#people li .info {
margin: 0;
display: block;
}
#people li .info em {
margin: 0 18px 0 0;
font-size: 11px;
line-height: 20px;
font-weight: 400;
font-style: normal;
letter-spacing: 1px;
text-transform: uppercase;
color: #5b5b5b;
float: left;
}

No idea what it is, but it's not CSS.
Correct CSS would be:
html
{
height: 100%;
}
body
{
height: 100%;
//background: #a7d5cd
background-image(linear-gradient(#dddddd, #cccccc))
}
#people
{
position: relative;
margin: 80px auto;
padding: 0;
width: 480px;
font-family: 'Helvetica Neue', Helvetica, sans-serif;
font-size: 16px;
line-height: 22px;
color: #3b3b3b;
-webkit-font-smoothing: antialiased;
list-style-type: none;
}
li
{
position: relative;
margin: 0 0 40px 0;
padding: 10px 8px 8px 54px;
height: 42px;
border: 1px solid #bbbbbb;
border-radius: 4px;
box-shadow: 0 1px 3px rgba(0,0,0,0.06), inset 0 1px 0 #ffffff;
background: #f6f6f6;
}
img
{
position: absolute;
top: -16px;
left: -16px;
z-index: 10;
margin: 0;
padding: 4px;
width: 50px;
height: 50px;
border: 1px solid #bbbbbb;
box-shadow: 0 1px 0 #ffffff;
border-radius: 50%;
} background: #ffffff;
h2
{
margin: 0;
font-size: 18px;
line-height: 22px;
font-weight: 400;
color: #4b4b4b;
text-shadow: -1px -1px 0 rgba(255,255,255,0.7);
}
.info
{
margin: 0;
display: block;
}
em
{
margin: 0 18px 0 0;
font-size: 11px;
line-height: 20px;
font-weight: 400;
font-style: normal;
letter-spacing: 1px;
text-transform: uppercase;
color: #5b5b5b;
float: left;
}
Updated fiddle.

Related

Adding a fav icon in a button using only CSS

https://codepen.io/danielworton/pen/ZZLEMO
Hello, I'm trying to re-create the button in the codepen linked above and I have an issue adding the stars without changing the script. Also the different colored double border ~ If anyone has any clue to a solution it would be very welcome!
#My solution is as follows:
a {
border: solid 3px #212121;
border-radius: 12px;
background-image: linear-gradient(0deg,#D3D3D3 0%,#D3D3D3 50%,#e8e8e8 51%);
color: #212121;
padding: 20px;
text-align: center;
text-decoration:none;
text-transform: uppercase;
font-family: "Lucida Console", Courier, monospace;
font-size: 18px;
width: 180px;
height: 14px;
display: inline-block;
margin: auto;
}
You can use pseudo elements to add more elements:
a {
border: solid 2px #555;
border-radius: 12px;
background-image: linear-gradient(0deg, #D3D3D3 0%, #D3D3D3 50%, #e8e8e8 51%);
color: #555;
padding: 20px 20px;
text-align: center;
text-decoration: none;
text-transform: uppercase;
font-family: "Arial";
font-size: 18px;
width: 180px;
height: 14px;
display: inline-block;
margin: auto;
position: relative;
display: inline-flex;
align-items: center;
justify-content: center;
text-shadow: 1px 1px 1px white;
font-weight: 600;
box-shadow: 0 0 0 6px #D3D3D3, 0 0 0 8px #555;
}
a:after, a:before {
content: '★';
position: absolute;
width: 100%;
left: 0;
top: 0;
display: flex;
align-items: center;
height: 100%;
padding: 0 20px;
box-sizing: border-box;
font-size: 24px;
line-height: 24px;
}
a:before {
justify-content: flex-end;
}
<a href="#">
Checkout
</a>
Although, the amount of borders on that button is kind of ridiculous to expect from one element I think.
Edit: you can add multiple borders with boxshadows

CSS giving error: "Expected selector for the style rule"

I am using ASP.net web application, the default CSS when modified with the following CSS gives error:
Expected selector for the style rule
It seems a CSS version problem. How can I know which version of CSS i am using? How can I upgrade?
Here is the CSS taken from Codepen
$white: #fff;
$google-blue: #4285f4;
$button-active-blue: #1669F2;
.google-btn {
width: 184px;
height: 42px;
background-color: $google-blue;
border-radius: 2px;
box-shadow: 0 3px 4px 0 rgba(0,0,0,.25);
.google-icon-wrapper
{
position: absolute;
margin-top: 1px;
margin-left: 1px;
width: 40px;
height: 40px;
border-radius: 2px;
background-color: $white;
}
.google-icon {
position: absolute;
margin-top: 11px;
margin-left: 11px;
width: 18px;
height: 18px;
}
.btn-text {
float: right;
margin: 11px 11px 0 0;
color: $white;
font-size: 14px;
letter-spacing: 0.2px;
font-family: "Roboto";
}
&:hover {
box-shadow: 0 0 6px $google-blue;
}
&:active {
background: $button-active-blue;
}
}
#import url(https://fonts.googleapis.com/css?family=Roboto:500);
You can convert your syntax with the following css syntax
Check the snippet:
#import url(https://fonts.googleapis.com/css?family=Roboto:500);
.google-btn {
width: 184px;
height: 42px;
background-color: #4285f4;
border-radius: 2px;
box-shadow: 0 3px 4px 0 rgba(0, 0, 0, 0.25);
}
.google-btn .google-icon-wrapper {
position: absolute;
margin-top: 1px;
margin-left: 1px;
width: 40px;
height: 40px;
border-radius: 2px;
background-color: #fff;
}
.google-btn .google-icon {
position: absolute;
margin-top: 11px;
margin-left: 11px;
width: 18px;
height: 18px;
}
.google-btn .btn-text {
float: right;
margin: 11px 11px 0 0;
color: #fff;
font-size: 14px;
letter-spacing: 0.2px;
font-family: "Roboto";
}
.google-btn:hover {
box-shadow: 0 0 6px #4285f4;
}
.google-btn:active {
background: #1669F2;
}
<link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Open+Sans" />
<div class="google-btn">
<div class="google-icon-wrapper">
<img class="google-icon" src="https://upload.wikimedia.org/wikipedia/commons/5/53/Google_%22G%22_Logo.svg" />
</div>
<p class="btn-text"><b>Sign in with google</b></p>
</div>

Make Search Box Responsive

How can I make this responsive? I want to change the width from px to %. But I don't get the same result. I want to maintain the size but I want it to be responsive.
.cf:before, .cf:after{content:"";display:table;}
.cf:after{clear:both;}
.cf{zoom:1;}
.form-wrapper {
width: 450px;
padding: 15px;
margin: 0 auto;
background: #444;
background: rgba(0,0,0,.2);
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
border-radius: 10px;
-moz-box-shadow: 0 1px 1px rgba(0,0,0,.4) inset, 0 1px 0 rgba(255,255,255,.2);
-webkit-box-shadow: 0 1px 1px rgba(0,0,0,.4) inset, 0 1px 0 rgba(255,255,255,.2);
box-shadow: 0 1px 1px rgba(0,0,0,.4) inset, 0 1px 0 rgba(255,255,255,.2);
}
.form-wrapper input {
width: 330px;
height: 20px;
padding: 10px 5px;
float: left;
font: bold 15px 'lucida sans', 'trebuchet MS', 'Tahoma';
border: 0;
background: #eee;
-moz-border-radius: 3px 0 0 3px;
-webkit-border-radius: 3px 0 0 3px;
border-radius: 3px 0 0 3px;
}
.form-wrapper input:focus {
outline: 0;
background: #fff;
-moz-box-shadow: 0 0 2px rgba(0,0,0,.8) inset;
-webkit-box-shadow: 0 0 2px rgba(0,0,0,.8) inset;
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-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;
-moz-border-radius: 0 3px 3px 0;
-webkit-border-radius: 0 3px 3px 0;
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;
}
.form-wrapper button:before {
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{
border-right-color: #c42f2f;
}
.form-wrapper button::-moz-focus-inner {
border: 0;
padding: 0;
}
HTML:
<form class="form-wrapper cf">
<input type="text" placeholder="Search here..." required>
<button type="submit">Search</button>
</form>
There is nothing more I can say, so ill just add this text since it won't let me post this question because of too little words. Thanks in advance guys.
*, *:before, *:after{
box-sizing: border-box;
}
.cf:before, .cf:after{content:"";display:table;}
.cf:after{clear:both;}
.cf{zoom:1;}
.form-wrapper {
width: 450px;
padding: 15px;
margin: 0 auto;
background: #444;
background: rgba(0,0,0,.2);
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
border-radius: 10px;
-moz-box-shadow: 0 1px 1px rgba(0,0,0,.4) inset, 0 1px 0 rgba(255,255,255,.2);
-webkit-box-shadow: 0 1px 1px rgba(0,0,0,.4) inset, 0 1px 0 rgba(255,255,255,.2);
box-shadow: 0 1px 1px rgba(0,0,0,.4) inset, 0 1px 0 rgba(255,255,255,.2);
}
.form-wrapper input {
width: 310px;
height: 40px;
padding: 10px 5px;
float: left;
font: bold 15px 'lucida sans', 'trebuchet MS', 'Tahoma';
border: 0;
background: #eee;
-moz-border-radius: 3px 0 0 3px;
-webkit-border-radius: 3px 0 0 3px;
border-radius: 3px 0 0 3px;
}
.form-wrapper input:focus {
outline: 0;
background: #fff;
-moz-box-shadow: 0 0 2px rgba(0,0,0,.8) inset;
-webkit-box-shadow: 0 0 2px rgba(0,0,0,.8) inset;
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-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;
-moz-border-radius: 0 3px 3px 0;
-webkit-border-radius: 0 3px 3px 0;
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;
}
.form-wrapper button:before {
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{
border-right-color: #c42f2f;
}
.form-wrapper button::-moz-focus-inner {
border: 0;
padding: 0;
}
#media only screen and (min-width: 320px) and (max-width: 480px) {
.form-wrapper{
width: 300px;
}
.form-wrapper input{
width: 160px;
}
}
<form class="form-wrapper cf">
<input type="text" placeholder="Search here..." required>
<button type="submit">Search</button>
</form>
You can use "max-width" instead of width it will make it responsive and also maintain the width you don't need to make it in "%"
<pre>
.form-wrapper {
max-width: 450px;
}
.form-wrapper input {
max-width: 330px;
}
</pre>

Div overlap another div

I have an issue I really can't figure out.
My login div overlapping my menu when my screen solution is smaller than XX. (found out when i changed from 21" to 15".)
I godt an menu witch seems to stay where it's placed, but the login box under is overlapping.
I got my css here:
/*******************
FONTS
*******************/
#import url(http://fonts.googleapis.com/css?family=Bree+Serif);
/*******************
SELECTION STYLING
*******************/
::selection {
color: #fff;
background: #f676b2; /* Safari */
}
::-moz-selection {
color: #fff;
background: #f676b2; /* Firefox */
}
/*******************
BODY STYLING
*******************/
* {
margin: 0;
padding: 0;
border: 0;
}
/*******************
TOPBAR
*******************/
#topbar {
list-style: none;
font-family: "Lucida Sans Unicode", "Lucida Grande", Verdana, Arial, Helvetica, sans-serif;
letter-spacing: -0.5px;
font-size: 13px;
text-shadow: 0 -1px 3px #202020;
width: 100%;
height: 30px;
background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #787878), color-stop(0.5, #5E5E5E), color-stop(0.51, #707070), color-stop(1, #838383));
background-image: -moz-linear-gradient(center bottom, #787878 0%, #5E5E5E 50%, #707070 51%, #838383 100%);
background-color:#5f5f5f;
/*-moz-border-radius: 4px;
-webkit-border-radius: 4px;
border-radius: 4px;*/
-moz-box-shadow: 0px 3px 3px #cecece;
-webkit-box-shadow: 0px 3px 3px #cecece;
box-shadow: 0 3px 4px #8b8b8b;
}
#wrapper1 {
font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
font-weight:300;
text-align: left;
text-decoration: none;
/* Center wrapper perfectly */
width: 300px;
height: 400px;
position: absolute;
left: 50%;
top: 50%;
margin-left: -150px;
margin-top: -200px;
}
/*
.gradient {
width: 600px;
height: 600px;
position: fixed;
left: 50%;
top: 50%;
margin-left: -300px;
margin-top: -300px;
background: url(../img/gradient.png) no-repeat;
}
*/
.gradient {
/* Center Positioning */
width: 600px;
height: 600px;
position: fixed;
left: 50%;
top: 50%;
margin-left: -300px;
margin-top: -300px;
/* Fallback */
background-image: url(../img/gradient.png);
background-repeat: no-repeat;
/* CSS3 Gradient */
background-image: -webkit-gradient(radial, 0% 0%, 0% 100%, from(rgba(213,246,255,1)), to(rgba(213,246,255,0)));
background-image: -webkit-radial-gradient(50% 50%, 40% 40%, rgba(213,246,255,1), rgba(213,246,255,0));
background-image: -moz-radial-gradient(50% 50%, 50% 50%, rgba(213,246,255,1), rgba(213,246,255,0));
background-image: -ms-radial-gradient(50% 50%, 50% 50%, rgba(213,246,255,1), rgba(213,246,255,0));
background-image: -o-radial-gradient(50% 50%, 50% 50%, rgba(213,246,255,1), rgba(213,246,255,0));
}
/*******************
MENU
*******************/
#menu {
margin: 40px 0;
list-style: none;
font-family: "Lucida Sans Unicode", "Lucida Grande", Verdana, Arial, Helvetica, sans-serif;
letter-spacing: -0.5px;
font-size: 13px;
text-shadow: 0 -1px 3px #202020;
width: 980px;
height: 34px;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
border-radius: 4px;
-moz-box-shadow: 0px 3px 3px #cecece;
-webkit-box-shadow: 0px 3px 3px #cecece;
box-shadow: 0 3px 4px #8b8b8b;
}
#menu li {
display: block;
float: left;
border-right: 1px solid #5d5d5d;
border-left: 1px solid #929292;
width: 105px;
height: 34px;
border-bottom: 1px solid #575757;
border-top: 1px solid #797979;
background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #787878), color-stop(0.5, #5E5E5E), color-stop(0.51, #707070), color-stop(1, #838383));
background-image: -moz-linear-gradient(center bottom, #787878 0%, #5E5E5E 50%, #707070 51%, #838383 100%);
background-color:#5f5f5f;
}
#menu li:not(:last-child):hover {
background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #3F3F3F), color-stop(0.5, #383838), color-stop(0.51, #434343), color-stop(1, #555555));
background-image: -moz-linear-gradient(center bottom, #3F3F3F 0%, #383838 50%, #434343 51%, #555555 100% );
background-color:#383838;
-moz-box-shadow: inset 0 0 5px 5px #535353;
-webkit-box-shadow: inset 0 0 5px 5px #535353;
box-shadow: inset 0 0 5px 5px #535353;
}
#menu li:not(:last-child):active {
background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #3F3F3F), color-stop(0.5, #383838), color-stop(0.51, #434343), color-stop(1, #555555));
background-image: -moz-linear-gradient(center bottom, #3F3F3F 0%, #383838 50%, #434343 51%, #555555 100% );
background-color:#383838;
-moz-box-shadow: inset 0 1px 2px 2px #000;
-webkit-box-shadow: inset 0 1px 2px 2px #000;
box-shadow: inset 0 1px 2px 2px #000;
}
#menu li a {
color: white;
text-decoration: none;
text-align: center;
display: block;
line-height: 34px;
outline: none;
}
#menu form input {
width: 76px;
height: 20px;
margin-left: 9px;
margin-top: 8px;
border: none;
padding-left: 20px;
padding-right: 10px;
color: #eee;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
border-radius: 10px;
background-image: url("../img/magnifier.png"), -webkit-gradient(linear, left bottom, left top, color-stop(0, #747474), color-stop(0.5, #6E6E6E), color-stop(0.51, #7E7E7E), color-stop(1, #8D8D8D));
background-image: url("../img/magnifier.png"), -moz-linear-gradient(center bottom, #747474 0%, #6E6E6E 50%, #7E7E7E 51%, #8D8D8D 100%);
background-repeat: no-repeat;
background-color: #6E6E6E;
-moz-box-shadow: inset 0 2px 1px 1px #363636;
-webkit-box-shadow: inset 0 2px 1px 1px #363636;
box-shadow: inset 0 2px 1px 1px #363636;
}
#menu li:first-child {
-moz-border-radius: 4px 0 0 4px;
-webkit-border-radius: 4px 0 0 4px;
border-radius: 4px 0 0 4px;
border-left: none;
}
#menu li:first-child a img {
vertical-align: middle;
margin-top: -2px;
}
#menu li:last-child {
-moz-border-radius: 0 4px 4px 0;
-webkit-border-radius: 0 4px 4px 0;
border-radius: 0 4px 4px 0;
border-right: none;
width: 124px;
}
#-webkit-keyframes showMenu {
from { opacity: 0; top: -20px; }
to { opacity: 1; }
}
#menu {
-webkit-animation: showMenu 1s;
position: relative;
}
/*******************
LOGIN FORM
*******************/
.login-form {
width: 300px;
margin: 0px auto;
position: absolute;
z-index:5;
background: #f3f3f3;
border: 1px solid #fff;
border-radius: 5px;
box-shadow: 0 1px 3px rgba(0,0,0,0.5);
-moz-box-shadow: 0 1px 3px rgba(0,0,0,0.5);
-webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.5);
}
/*******************
HEADER
*******************/
.login-form .header {
padding: 40px 30px 30px 30px;
}
.login-form .header h1 {
font-family: 'Bree Serif', serif;
font-weight: 300;
font-size: 28px;
line-height:34px;
color: #414848;
text-shadow: 1px 1px 0 rgba(256,256,256,1.0);
margin-bottom: 10px;
}
.login-form .header span {
font-size: 11px;
line-height: 16px;
color: #678889;
text-shadow: 1px 1px 0 rgba(256,256,256,1.0);
}
/*******************
CONTENT
*******************/
.login-form .content1 {
padding: 0 30px 25px 30px;
}
/* Input field */
.login-form .content1 .input {
width: 188px;
padding: 15px 25px;
font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
font-weight: 400;
font-size: 14px;
color: #9d9e9e;
text-shadow: 1px 1px 0 rgba(256,256,256,1.0);
background: #fff;
border: 1px solid #fff;
border-radius: 5px;
box-shadow: inset 0 1px 3px rgba(0,0,0,0.50);
-moz-box-shadow: inset 0 1px 3px rgba(0,0,0,0.50);
-webkit-box-shadow: inset 0 1px 3px rgba(0,0,0,0.50);
}
/* Second input field */
.login-form .content1 .password, .login-form .content .pass-icon {
margin-top: 25px;
}
.login-form .content1 .input:hover {
background: #dfe9ec;
color: #414848;
}
.login-form .content1 .input:focus {
background: #dfe9ec;
color: #414848;
box-shadow: inset 0 1px 2px rgba(0,0,0,0.25);
-moz-box-shadow: inset 0 1px 2px rgba(0,0,0,0.25);
-webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,0.25);
}
.user-icon, .pass-icon {
width: 46px;
height: 47px;
display: block;
position: absolute;
left: 0px;
padding-right: 2px;
z-index: 3;
-moz-border-radius-topleft: 5px;
-moz-border-radius-bottomleft: 5px;
-webkit-border-top-left-radius: 5px;
-webkit-border-bottom-left-radius: 5px;
}
.user-icon {
top:147px; /* Positioning fix for slide-in, got lazy to think up of simpler method. */
background: rgba(65,72,72,0.75) url(../img/user-icon.png) no-repeat center;
}
.pass-icon {
top:221px;
background: rgba(65,72,72,0.75) url(../img/pass-icon.png) no-repeat center;
}
/* Animation */
.input, .user-icon, .pass-icon, .button, .register {
transition: all 0.5s;
-moz-transition: all 0.5s;
-webkit-transition: all 0.5s;
-o-transition: all 0.5s;
-ms-transition: all 0.5s;
}
/*******************
FOOTER
*******************/
.login-form .footer {
padding: 25px 30px 40px 30px;
overflow: auto;
background: #d4dedf;
border-top: 1px solid #fff;
box-shadow: inset 0 1px 0 rgba(0,0,0,0.15);
-moz-box-shadow: inset 0 1px 0 rgba(0,0,0,0.15);
-webkit-box-shadow: inset 0 1px 0 rgba(0,0,0,0.15);
}
/* Login button */
.login-form .footer .button {
float:left;
padding: 11px 25px;
font-family: 'Bree Serif', serif;
font-weight: 300;
font-size: 18px;
color: #fff;
text-shadow: 0px 1px 0 rgba(0,0,0,0.25);
background: #56c2e1;
border: 1px solid #46b3d3;
border-radius: 5px;
cursor: pointer;
box-shadow: inset 0 0 2px rgba(256,256,256,0.75);
-moz-box-shadow: inset 0 0 2px rgba(256,256,256,0.75);
-webkit-box-shadow: inset 0 0 2px rgba(256,256,256,0.75);
}
.login-form .footer .button:hover {
background: #3f9db8;
border: 1px solid rgba(256,256,256,0.75);
box-shadow: inset 0 1px 3px rgba(0,0,0,0.5);
-moz-box-shadow: inset 0 1px 3px rgba(0,0,0,0.5);
-webkit-box-shadow: inset 0 1px 3px rgba(0,0,0,0.5);
}
.login-form .footer .button:focus {
position: relative;
bottom: -1px;
background: #56c2e1;
box-shadow: inset 0 1px 6px rgba(256,256,256,0.75);
-moz-box-shadow: inset 0 1px 6px rgba(256,256,256,0.75);
-webkit-box-shadow: inset 0 1px 6px rgba(256,256,256,0.75);
}
/* Register button
.login-form .footer .register {
display: block;
float: right;
padding: 10px;
margin-right: 20px;
background: none;
border: none;
cursor: pointer;
font-family: 'Bree Serif', serif;
font-weight: 300;
font-size: 18px;
color: #414848;
text-shadow: 0px 1px 0 rgba(256,256,256,0.5);
}
.login-form .footer .register:hover {
color: #3f9db8;
}
.login-form .footer .register:focus {
position: relative;
bottom: -1px;
}*/
I'm not a genius in CSS, so im glad to see people helps in here, and so damn fast generally!
Thank you! :-)
edit #wrapper1 like this:
#wrapper1 {
font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
font-weight: 300;
text-align: left;
text-decoration: none;
width: 300px;
height: 400px;
position: absolute;
left: 50%;
top: 145px; /* or more */
margin-left: -150px;
}
and your gradient like this:
.gradient {
width: 600px;
height: 600px;
position: fixed;
left: 50%;
top: 145px; /* as the top of wrapper */
margin-left: -300px;
margin-top: 0px;
background-image: url(../img/gradient.png);
background-repeat: no-repeat;
background-image: -webkit-gradient(radial, 0% 0%, 0% 100%, from(rgba(213,246,255,1)), to(rgba(213,246,255,0)));
background-image: -webkit-radial-gradient(50% 50%, 40% 40%, rgba(213,246,255,1), rgba(213,246,255,0));
background-image: -moz-radial-gradient(50% 50%, 50% 50%, rgba(213,246,255,1), rgba(213,246,255,0));
background-image: -ms-radial-gradient(50% 50%, 50% 50%, rgba(213,246,255,1), rgba(213,246,255,0));
background-image: -o-radial-gradient(50% 50%, 50% 50%, rgba(213,246,255,1), rgba(213,246,255,0));
}
jsFiddle
Update:
as the #Atul you can use position:relative for #wrapper1 too. look at this code:
#wrapper1 {
font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
font-weight: 300;
text-align: left;
text-decoration: none;
width: 300px;
height: 400px;
position: relative;
left: 50%;
margin-left: -150px;
}
jsFiddle
Since you position your inlogbox absolute it will overlap the menu at some point. (When the window size is smaller than the height of the menu and inlogbox together).
The only thing you can do is position your inlogbox static.
Therefor, change:
#wrapper1 {
font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
font-weight:300;
text-align: left;
text-decoration: none;
/* Center wrapper perfectly */
width: 300px;
height: 400px;
position: absolute;
left: 50%;
top: 50%;
margin-left: -150px;
margin-top: -200px;
}
To:
#wrapper1 {
font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
font-weight:300;
text-align: left;
text-decoration: none;
width: 300px;
height: 400px;
margin: 0 auto;
}
The inlogbox will then be under the menu . If you want extra space between the menu and inlogbox, simply add a margin-top to the inlogbox.

How to reduce minimum top-padding?

I'm trying to copy the Facebook's notification's blobs by using CSS3 ::before pseudo-element. I added a maximum height value and everything I tried isn't enough to reduce the space between the number and the beginning of the box. Any ideas on how to reduce/eliminate it?
Code:
HTML: <li notificaciones="3">[...]
SCSS:
*[notificaciones]:not([notificaciones="0"]){
&::before{
content: attr(notificaciones);
position: absolute;
color: $color-cajas-notificaciones-texto;
background-color: $color-cajas-notificaciones-fondo;
max-width: 25px;
font-size: 16px;
font-family: 'lucida grande',tahoma,verdana,arial,sans-serif;
font-weight: 800;
height: 20px;
float: left;
z-index: 999;
width: 20px;
text-align: center;
vertical-align: top;
top: 0px;
padding: 0 1px;
color: white;
text-shadow: 0px 0px 1px;
background-color: #f03d25;
border: 1px solid #d83722;
border-bottom: 1px solid #c0311e;
border-top: 1px solid #e23923;
border-radius: 2px;
box-shadow: 0 1px 0 rgba(0, 39, 121, 0.77);
display: block;
}
I didn't understand question well, but maybe you want like this
http://jsfiddle.net/zxshz/36/
<ul>
<li data="3"></li>
<li data="7"></li>
<li data="15"></li>
</ul>
/* css */
ul{
width: 250px;
}
li{
list-style: none;
float: left;
margin-right: 8px;
width: 18px;
height: 18px;
background: #9c0;
position: relative;
}
li:after{
content:attr(data);
padding: 1px 2px 2px 3px;
position: absolute;
background: red;
right: -3px;
top: -5px;
font-weight: bold;
text-align: center;
font-size: 9px;
border-radius:2px ;
color: #fff;
}
li:nth-child(1){
background: #fff url(https://dl.dropboxusercontent.com/u/77028632/sarhov.com/fb.png) 0 0 no-repeat;
}
li:nth-child(2){
background: #fff url(https://dl.dropboxusercontent.com/u/77028632/sarhov.com/fb.png) 0 -58px no-repeat;
}
li:nth-child(3){
background: #fff url(https://dl.dropboxusercontent.com/u/77028632/sarhov.com/fb.png) 0 -29px no-repeat;
}
I can't understand what is your problem, put your code please
It's was just a matter of referring to the official documentantion on Line Height Calculations
line-height: /*same as height property*/
vertical-align: top;

Resources