I am building a website with a responsive CSS layout: I have two sections here, "third" and "footer". I would like to stretch the background of third to cover up the whitespace that I have between "third" and "footer".
Here is the HTML that I am using:
<!-- Third -->
<section id="third" class="main">
<header>
<div class="container">
<h2>keep in touch</h2>
<p>we'd love to hear from you. send us your questions and comments.</p>
</div>
</header>
<div class="content dark style3 featured">
<div class="container small">
<form method="post" action="#">
<div class="row half">
<div class="6u"><input type="text" class="text" placeholder="Name" /></div>
<div class="6u"><input type="text" class="text" placeholder="Email" /></div>
</div>
<div class="row half">
<div class="12u"><textarea name="message" placeholder="Message"></textarea></div>
</div>
<div class="row">
<div class="12u">
<ul class="actions">
<li><input type="submit" class="button" value="Send Message" /></li>
<li><input type="reset" class="button alt" value="Clear Form" /></li>
</ul>
</div>
</div>
</form>
</div>
</div>
</section>
<!-- Footer -->
<section id="footer">
<div class="content style3 featured">
<ul class="icons">
<li><span>Twitter</span></li>
<li><span>Facebook</span></li>
<li><span>Instagram</span></li>
<li><span>Pinterest</span></li>
<li><span>Flickr</span></li>
</ul>
</div>
</section>
</body>
and the CSS:
.main
{
position: relative;
margin: 0;
}
.main > header
{
background: #fff;
text-align: center;
padding: 5em 0 5em 0;
margin: 0;
}
.main > header h2
{
font-size: 2.25em;
font-weight: 100;
margin-bottom: 0;
}
.main > header p
{
margin: 2em 0 0 0;
padding: 0;
text-align: center;
}
.main > .content
{
padding: 6em 0 6em 0;
}
.main > .content > .container
{
}
.main > .content.style3
{
background: url('images/bgtr.svg') top right no-repeat,
url('images/bgbl.svg') bottom left no-repeat,
url('images/overlay.png'),
linear-gradient(45deg, #5f796b, #3a4e59, #2f394e);
}
This is what it looks like now: http://imgur.com/2gsv2Xk
How would I be able to fill in that whitespace?
Here is the CSS for the sections:
section,
article
{
margin-bottom: 0;
}
section > :last-child,
article > :last-child
{
margin-bottom: 0;
}
section:last-child,
article:last-child
{
margin-bottom: 0;
}
.row > section,
.row > article
{
margin-bottom: 0;
}
The section article did have a margin-bottom of 3em, but I changed it to 0, and I still see the whitespace.
I have prepared an example for you. You can benefit from this example.
See this DEMO
Also i will give you the code:
HTML
<div class="container">
<div class="text_wrap">
<div class="div_text">
<input type='text' class='cc-mask' placeholder='Name'/>
</div>
<div class="div_text">
<input type='text' class='cc-mask' placeholder='Surname'/>
</div>
<div class="message_text">
<input type='text' class='message-mask' placeholder='Message Here'/>
</div>
<div class="send_message_clearform_wrap">
<div class="send_message">
<input type="submit" class="sendButton" value="Send Message" />
</div>
<div class="clear_form">
<input type="submit" class="clearButton" value="Celar Form" />
</div>
</div>
</div>
</div>
<div class="white_area"></div>
CSS
body {
margin:0px;
padding:0px;
background-image: rgba(235,235,235,1);
background-image: -webkit-linear-gradient(-45deg, #188aad 0%,#00a698 100%);
background-image: -moz-linear-gradient(-45deg, #188aad 0%,#00a698 100%);
background-image: -o-linear-gradient(-45deg, #188aad 0%,#00a698 100%);
background-image: -ms-linear-gradient(135deg, #188aad 0%,#00a698 100%);
background-image: linear-gradient(-45deg, #188aad 0%,#00a698 100%);
-webkit-box-shadow: rgba(128,128,128,1) 0px 0px 0px 0px, inset rgba(255,255,255,1) 0px 0px 0px 0px;
-moz-box-shadow: rgba(128,128,128,1) 0px 0px 0px 0px, inset rgba(255,255,255,1) 0px 0px 0px 0px;
box-shadow: rgba(128,128,128,1) 0px 0px 0px 0px, inset rgba(255,255,255,1) 0px 0px 0px 0px;
}
.container {
width:600px;
height:400px;
margin:10px auto;
}
.div_text {
float:left;
margin-left:10px;
}
.cc-mask {
display:inline-block;
height:40px;
font-size:18px;
background:none;
border-radius:3px;
border:1px solid #c1c1c1;
padding:2px;
outline:none;
width:250px;
}
.message-mask {
display:inline-block;
height:250px;
font-size:18px;
background:none;
border:1px solid #c1c1c1;
padding:2px;
outline:none;
width:518px;
margin-left:10px;
border-radius:3px;
}
.message_text {
float:left;
margin-top:10px;
}
.sendButton {
width: 220px;
height: 54px;
padding: 0;
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
color: #fff;
font: normal 11px/24px "Lucida Grande";
border: none;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
background-image: rgba(235,235,235,1);
background-image: -webkit-linear-gradient(top, #eb5a17 0%,#eb5a17 100%);
background-image: -moz-linear-gradient(top, #eb5a17 0%,#eb5a17 100%);
background-image: -o-linear-gradient(top, #eb5a17 0%,#eb5a17 100%);
background-image: -ms-linear-gradient(top, #eb5a17 0%,#eb5a17 100%);
background-image: linear-gradient(top, #eb5a17 0%,#eb5a17 100%);
-webkit-box-shadow: rgba(128,128,128,1) 0px 0px 0px 0px, inset rgba(255,255,255,1) 0px 0px 0px 0px;
-moz-box-shadow: rgba(128,128,128,1) 0px 0px 0px 0px, inset rgba(255,255,255,1) 0px 0px 0px 0px;
box-shadow: rgba(128,128,128,1) 0px 0px 0px 0px, inset rgba(255,255,255,1) 0px 0px 0px 0px;
}
.send_message {
float:left;
width:200px;
height:56px;
margin-top:10px;
margin-left:30px;
}
.clear_form{
float:left;
width:200px;
height:56px;
margin-top:10px;
margin-left:30px;
}
.clearButton {
width: 220px;
height: 54px;
padding: 0;
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
color: #fff;
border:1px solid #fff;
border-radius:3px;
font: normal 11px/24px "Lucida Grande";
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"; /* IE 8 */
filter: alpha(opacity=50); /* IE 5-7 */
-moz-opacity: 0.5; /* Netscape */
-khtml-opacity: 0.5; /* Safari 1.x */
opacity: 0.5;
}
.white_area {
width:100%;
background-color:#fff;
height:50px;
}
Related
I am trying to get the floating label effect on Contact Form 7 and ran into a problem.
I got the label effect to work on input:focus but I can not get the effect to hold once I enter letters and move to the next input.
In other words I need to label to stay up when the input is not empty.
here's my code:
<div class="wrapper-flex wrapper-form">
<div class="input-wrapper">
<label for="your-name"> [text* your-name]<span class="eticheta">FULL NAME</span></label>
</div><!-- input-wrapper -->
</div><!-- wrapper-flex -->
and the css:
.wpcf7-form .input-wrapper{
width:47%;
height: 50px;
position: relative;
}
.wpcf7-form input{
width:100% !important;
background: none !important;
border:none !important;
height: 30px !important;
margin:20px 0 0 0 !important;
}
.wpcf7-form .eticheta{
width: 100%;
display: block;
transition: all 0.3s ease;
position: absolute;
top:10px;
}
.wpcf7-form label:focus-within .eticheta, .wpcf7-form input:valid + .eticheta
{
top:0px;
}
I understand that .wpcf7-form input:valid + .eticheta doesn't work as they do not have the same parent. The input has a span around it. I am guessing that's why it doesn't work but I cannot figure out how to get it done
.form-parent {
width: 323px;
height: auto;
background: transparent
url("https://3.bp.blogspot.com/-gvfHlb6JnY4/VPnwlkELmhI/AAAAAAAAKDU/9lgOeCd279E/s1600/contact-button.png")
no-repeat right 10px;
position: fixed;
top: 150px;
left: -275px;
z-index: 9999999;
transition: all ease 0.6s;
-moz-transition: all ease 0.6s;
-webkit-transition: all ease 0.6s;
-o-transition: all ease 0.6s;
}
.form-parent:hover {
left: 0;
}
.cc-float-form {
background: -moz-linear-gradient(top, #2b2a2b 5%, #0a0a0a 100%);
background: -webkit-linear-gradient(top, #2b2a2b 5%, #0a0a0a 100%);
background: -o-linear-gradient(top, #2b2a2b 5%, #0a0a0a 100%);
background: -ms-linear-gradient(top, #2b2a2b 5%, #0a0a0a 100%);
background: linear-gradient(to bottom, #2b2a2b 5%, #0a0a0a 100%);
color: #fafafa;
padding: 10px;
width: 250px;
border: 2px solid #000;
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
}
#ContactForm1 {
display: none;
}
.contact-form-area {
background: #222;
width: 245px;
padding: 10px 0px;
border: 1px solid #111;
box-shadow: 2px 2px 2px #111 inset;
-webkit-box-shadow: 2px 2px 2px #111 inset;
font-family: Verdana, Geneva, sans-serif;
color: #fafafa;
font-size: 12px;
}
#cc {
float: right;
font-size: 9px;
margin-top: -10px;
color: #777;
}
#cc a {
color: #777;
text-decoration: none;
}
<div class='form-parent'>
<form name="contact-form" class="cc-float-form">
<p></p>
Name:<br />
<input class="contact-form-area" id="ContactForm1_contact-form-name" name="name" size="30" value="" type="text" />
<p></p>
Email:
<span style="color:red;">*</span><br />
<input class="contact-form-area" id="ContactForm1_contact-form-email" name="email" size="30" value="" type="text" />
<p></p>
Message: <span style="color:red;">*</span><br />
<textarea class="contact-form-area" id="ContactForm1_contact-form-email-message" name="email-message" cols="25" rows="5"></textarea>
<p></p>
<input class="contact-form-button contact-form-button-submit" id="ContactForm1_contact-form-submit" value="Send" type="button" />
<p></p>
<div style="text-align: center; max-width: 222px; width: 100%">
<p class="contact-form-error-message" id="ContactForm1_contact-form-error-message"></p>
<p class="contact-form-success-message" id="ContactForm1_contact-form-success-message"></p>
</div>
<div id="cc">
By Prio-Soft™
</div>
</form>
</div>
In my chat, I would like to have a text message displayed in the balloon for one button and an image from my gallery for the other button. The programming for the text works. How do I get this with the picture?
My HTML Code is this one:
<!DOCTYPE html>
<link rel="stylesheet" href="style.css">
<div class="Webview">
<div class="message_container" id="myForm" >
<div class="Chat_Bubble"></div>
</div>
<form class="send_container">
<input id="textField" type="text">
<img id="Bildverschicken" src="baseline_image_black_18dp.png">
<p>
<input type ="button" id="theButton" value="Nachricht absenden!"
onclick="document.getElementsByClassName('Chat_Bubble')[0].textContent=document.getElementById('textField').value"/>
</p>
<input type="button" id="Button_Bilder" value="Bild verschicken!"
onclick="document.getElementsByClassName('Chat_Bubble')[0].imageContent=document.getElementById('Bildverschicken').value"/>
<h3><div id="div"></div></h3>
</form>
</div>
Can someone help me? Thanks!
#charset "UTF-8";
.Webview{
height: 600px;
width: 380px;
}
.message_container{
height: 80%;
width: 100%;
border:5px solid green;
}
.Chat_Bubble{
box-sizing: border-box;
float: left;
width: auto;
max-width: 80%;
position: relative;
clear: both;
background: #95c2fd;
background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0.15, #bee2ff), color-stop(1, #95c2fd));
background-image: -webkit-linear-gradient(bottom, #bee2ff 15%, #95c2fd 100%);
background-image: -moz-linear-gradient(bottom, #bee2ff 15%, #95c2fd 100%);
background-image: -ms-linear-gradient(bottom, #bee2ff 15%, #95c2fd 100%);
background-image: -o-linear-gradient(bottom, #bee2ff 15%, #95c2fd 100%);
background-image: linear-gradient(bottom, #bee2ff 15%, #95c2fd 100%);
border: solid 1px rgba(0,0,0,0.5);
-webkit-border-radius: 20px;
-moz-border-radius: 20px;
border-radius: 20px;
-webkit-box-shadow: inset 0 8px 5px rgba(255,255,255,0.65), 0 1px 2px rgba(0,0,0,0.2);
-moz-box-shadow: inset 0 8px 5px rgba(255,255,255,0.65), 0 1px 2px rgba(0,0,0,0.2);
box-shadow: inset 0 8px 5px rgba(255,255,255,0.65), 0 1px 2px rgba(0,0,0,0.2);
margin-bottom: 20px;
padding: 6px 20px;
color: #000;
text-shadow: 0 1px 1px rgba(255,255,255,0.8);
word-wrap: break-word;
}
.bubble:before, .bubble:after {
border-radius: 20px / 5px;
content: '';
display: block;
position: absolute;
}
.bubble:before {
border: 10px solid transparent;
border-bottom-color: rgba(0,0,0,0.5);
bottom: 0px;
left: -7px;
z-index: -2;
}
.bubble:after {
border: 8px solid transparent;
border-bottom-color: #bee2ff; /* arrow color */
bottom: 1px;
left: -5px;
}
.bubble-alt {
float: right;
}
.bubble-alt:before {
left: auto;
right: -7px;
}
.bubble-alt:after {
left: auto;
right: -5px;
}
.bubble p {
font-size: 1.4em;
}
}
.send_container{
height: 20;
width: 100%;
}
.send_container input{
width: 70%;
height:20%
border:2px solid #1CE615;
}
.send_container button{
width: 30%;
height:20%;
}
.send_container Button_Bilder{
width: 10%;
height:10% ;
}
<!DOCTYPE html>
<link rel="stylesheet" href="style.css">
<div class="Webview">
<div class="message_container" id="myForm" >
<div class="Chat_Bubble"></div>
</div>
<form class="send_container">
<input id="textField" type="text">
<img id="Bildverschicken" src="baseline_image_black_18dp.png">
<p>
<input type ="button" id="theButton" value="Nachricht absenden!"
onclick="document.getElementsByClassName('Chat_Bubble')[0].textContent=document.getElementById('textField').value"/>
</p>
<input type="button" id="Button_Bilder" value="Bild verschicken!"
onclick="document.getElementsByClassName('Chat_Bubble')[0].imageContent=document.getElementById('Bildverschicken').value"/>
<h3><div id="div"></div></h3>
</form>
</div>
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 9 years ago.
Improve this question
This question has been asked before, however each situation is unique. I have a screenshot of a website that has a login box (registration box) with a sticky note on the side to tell the users what information to enter.
Screenshot below:
The registration box is over lapping the sticky note when the user resizes his browser window. Also the login box is overlapping the logo on the top. A solution that is cross compatible with many browsers would be nice (if possible).
Here is my CSS:
.box
{
background:#fefefe;
border: 1px solid #C3D4DB;
border-top:1px;
-webkit-border-radius:5px;
-moz-border-radius:5px;
border-radius:5px;
-moz-box-shadow:rgba(0,0,0,0.15) 0 0 1px;
-webkit-box-shadow:rgba(0,0,0,0.15) 0 0 1px;
box-shadow:rgba(0,0,0,0.15) 0 0 1px;
color:#444;
font:normal 12px/14px Arial, Helvetica, Sans-serif;
margin:0 auto 30px;
overflow:hidden;
}
.box.login
{
height:480px;
width:332px;
position:absolute;
left:50%;
top:37%;
margin:-130px 0 0 -166px;
}
.boxBody
{
background:#fefefe;
border-top:1px solid #dde0e8;
padding:10px 20px;
}
.box footer
{
background:#eff4f6;
border-top:1px solid #dde0e8;
padding:22px 26px;
overflow:hidden;
height:32px;
}
.box label
{
display:block;
font:14px/22px Arial, Helvetica, Sans-serif;
margin:10px 0 0 6px;
}
.box footer label{
float:left;
margin:4px 0 0;
}
.box footer input[type=checkbox]{
vertical-align:sub;
*vertical-align:middle;
margin-right:10px;
.sticky {
/* General */
margin: 0 auto;
padding: 8px 24px;
/*width: 370px; */
max-width: 370px;
height: auto;
width: auto\9;
position: fixed;
left: 3%;
top: 35%;
/* Font */
font-family: 'Nothing You Could Do', cursive;
font-size: 1.4em;
/* Border */
border:1px #E8Ds47 solid;
/* Shadow */
-moz-box-shadow:0px 0px 6px 1px #333333;
-webkit-box-shadow:0px 0px 6px 1px #333333;
box-shadow:0px 0px 6px 1px #333333;
/* Background */
background: #fefdca; /* Old browsers */
background: -moz-linear-gradient(top, #fefdca 0%, #f7f381 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#fefdca), c$
background: -webkit-linear-gradient(top, #fefdca 0%,#f7f381 100%); /* Chrome10+,Safar$
background: -o-linear-gradient(top, #fefdca 0%,#f7f381 100%); /* Opera11.10+ */
background: -ms-linear-gradient(top, #fefdca 0%,#f7f381 100%); /* IE10+ */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fefdca', endColor$
background: linear-gradient(top, #fefdca 0%,#f7f381 100%); /* W3C; A catch-all for ev$
}
.sticky ol {
margin: 12px;
}
.sticky p {
text-align: center;
}
And here is my HTML:
<!DOCTYPE HTML>
<html>
<head>
<title>Secure Customer Login</title>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0$
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<link rel="stylesheet" type="text/css" href="css/reset.css">
<link rel="stylesheet" type="text/css" href="css/structure_register.css">
<link href='https://fonts.googleapis.com/css?family=Nothing+You+Could+Do' rel='styleshe$
<script>document.createElement('footer');</script>
</head>
<center><img src="/images/logo.png"></center>
<body>
<div class="sticky">
<p>
<strong>Please Note</strong>
<br />
</p>
<ol>
<li>Please use your real name (your information is secure and will NOT be shared)$
<li>Capitalize the first letter of your first name and last name (i.e. John Doe)<$
<li>Use your email address for the username, otherwise you will not be able to ac$
<li>Use a secure password that cannot be easily guessed</li>
</ol>
</div>
<form class="box login" name="register" action="<?php echo $_SERVER['PHP_SELF']; ?>" meth$
<fieldset class="boxBody">
<label>First Name</label>
<input type="text" name="firstname" maxlength="50" tabindex="1" placeholder="First Na$
<label>Last Name</label>
<input type="text" name="lastname" maxlength="50" tabindex="2" placeholder="Last Name$
<label>Username</label>
<input type="email" name="username" maxlength="50" tabindex="3" placeholder="Email" r$
<label>Password</label>
<input type="password" placeholder="Password" name="pass1" tabindex="4" />
<label>Repeat Password</label>
<input type="password" placeholder="Repeat Password" name="pass2" tabindex="5" />
</fieldset>
<footer>
<center><input type="submit" name="submit" value="Register" class="btnLogin" /></cent$
</footer>
</form>
<footer id="main">
© 2014 Rye High Group. All rights reserved.</a>
</footer>
</body>
</html>
Your help is very much appreciated, I love this community!
Thanks,
Fixnode
Try this http://jsfiddle.net/ab5KN/
HTML:
<body>
<div class="img">
<img src="http://rye-high.ca/images/logo.png" />
</div>
<div class="sticky">
<p> <strong>Please Note</strong>
<br />
</p>
<ol>
<li>Please use your real name (your information is secure and will NOT be shared) </li>
<li>Capitalize the first letter of your first name and last name (i.e. John Doe)</li>
<li>Use your email address for the username, otherwise you will not be able to access your account</li>
<li>Use a secure password that cannot be easily guessed</li>
</ol>
</div>
<div class="box">
<form class="login" name="register" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
<fieldset class="boxBody">
<label>First Name</label>
<input type="text" name="firstname" maxlength="50" tabindex="1" placeholder="First Name" required />
<label>Last Name</label>
<input type="text" name="lastname" maxlength="50" tabindex="2" placeholder="Last Name" required />
<label>Username</label>
<input type="email" name="username" maxlength="50" tabindex="3" placeholder="Email" required />
<label>Password</label>
<input type="password" placeholder="Password" name="pass1" tabindex="4" />
<label>Repeat Password</label>
<input type="password" placeholder="Repeat Password" name="pass2" tabindex="5" />
</fieldset>
<footer>
<center>
<input type="submit" name="submit" value="Register" class="btnLogin" />
</center>
</footer>
</form>
</div>
<footer id="main">© 2014 Rye High Group. All rights reserved.</a>
</footer>
</body>
CSS:
body {
background:#eff3f6;
width: 1000px;
}
.img {
/*display: block;*/
width:300px;
margin: 0 auto;
}
.box {
width:332px;
margin: 5px auto;
background:#fefefe;
border: 1px solid #C3D4DB;
border-top:1px;
-webkit-border-radius:5px;
-moz-border-radius:5px;
border-radius:5px;
-moz-box-shadow:rgba(0, 0, 0, 0.15) 0 0 1px;
-webkit-box-shadow:rgba(0, 0, 0, 0.15) 0 0 1px;
box-shadow:rgba(0, 0, 0, 0.15) 0 0 1px;
color:#444;
font:normal 12px/14px Arial, Helvetica, Sans-serif;
/*margin:0 auto 30px;*/
overflow:hidden;
position: block;
z-index: -1;
padding-top: 3px;
}
.box.login {
height:480px;
width:150px;
margin: 0 auto;
}
.login fieldset{
border: 0px;
}
.boxBody {
background:#fefefe;
border-top:1px solid #dde0e8;
padding:10px 20px;
}
.box footer {
background:#eff4f6;
border-top:1px solid #dde0e8;
padding:22px 26px;
overflow:hidden;
height:32px;
}
.box label {
display:block;
font:14px/22px Arial, Helvetica, Sans-serif;
margin:10px 0 0 6px;
}
.box footer label {
float:left;
margin:4px 0 0;
}
.box footer input[type=checkbox] {
vertical-align:sub;
*vertical-align:middle;
margin-right:10px;
}
/*Alert Box*/
.alert {
background: #fff6bf url(../images/exclamation.png) center no-repeat;
background-position: 15px 50%;
text-align: center;
padding: 5px 20px 5px 45px;
border-top: 2px solid #ffd324;
border-bottom: 2px solid #ffd324;
}
.info {
background: #CDFECD url(../images/information.png) center no-repeat;
background-position: 15px 50%;
text-align: center;
padding: 5px 20px 5px 45px;
border-top: 2px solid #90EE90;
border-bottom: 2px solid #90EE90;
}
.error {
background: #FFBFBF url(../images/error.png) center no-repeat;
background-position: 15px 50%;
text-align: center;
padding: 5px 20px 5px 45px;
border-top: 2px solid #FF2424;
border-bottom: 2px solid #FF2424;
}
.box input[type=email], .box input[type=password], .box input[type=text], .txtField, .cjComboBox {
border:6px solid #F7F9FA;
-webkit-border-radius:3px;
-moz-border-radius:3px;
border-radius:3px;
-moz-box-shadow:2px 3px 3px rgba(0, 0, 0, 0.06) inset, 0 0 1px #95a2a7 inset;
-webkit-box-shadow:2px 3px 3px rgba(0, 0, 0, 0.06) inset, 0 0 1px #95a2a7 inset;
box-shadow:2px 3px 3px rgba(0, 0, 0, 0.06) inset, 0 0 1px #95a2a7 inset;
margin:3px 0 4px;
padding:8px 6px;
width:270px;
display:block;
}
.box input[type=email]:focus, .box input[type=password]:focus, .box input[type=text]:focus, .txtField:focus, .cjComboBox:focus {
border:6px solid #f0f7fc;
-moz-box-shadow:2px 3px 3px rgba(0, 0, 0, 0.04) inset, 0 0 1px #0d6db6 inset;
-webkit-box-shadow:2px 3px 3px rgba(0, 0, 0, 0.04) inset, 0 0 1px #0d6db6 inset;
box-shadow:2px 3px 3px rgba(0, 0, 0, 0.04) inset, 0 0 1px #0d6db6 inset;
color:#333;
}
.cjComboBox {
width:294px;
}
.cjComboBox.small {
padding:3px 2px 3px 6px;
width:100px;
border-width:3px !important;
}
.txtField.small {
padding:3px 6px;
width:200px;
border-width:3px !important;
}
.rLink {
padding:0 6px 0 0;
font-size:11px;
float:right;
}
.box a {
color:#999;
}
.box a:hover, .box a:focus {
text-decoration:underline;
}
.box a:active {
color:#f84747;
}
.btnLogin {
-moz-border-radius:2px;
-webkit-border-radius:2px;
border-radius:15px;
background:#a1d8f0;
background:-moz-linear-gradient(top, #badff3, #7acbed);
background:-webkit-gradient(linear, left top, left bottom, from(#badff3), to(#7acbed));
-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorStr='#badff3', EndColorStr='#7acbed')";
border:1px solid #7db0cc !important;
cursor: pointer;
padding:11px 16px;
font:bold 11px/14px Verdana, Tahomma, Geneva;
text-shadow:rgba(0, 0, 0, 0.2) 0 1px 0px;
color:#fff;
-moz-box-shadow:inset rgba(255, 255, 255, 0.6) 0 1px 1px, rgba(0, 0, 0, 0.1) 0 1px 1px;
-webkit-box-shadow:inset rgba(255, 255, 255, 0.6) 0 1px 1px, rgba(0, 0, 0, 0.1) 0 1px 1px;
box-shadow:inset rgba(255, 255, 255, 0.6) 0 1px 1px, rgba(0, 0, 0, 0.1) 0 1px 1px;
margin-left:12px;
padding:7px 21px;
}
.btnLogin:hover, .btnLogin:focus, .btnLogin:active {
background:#a1d8f0;
background:-moz-linear-gradient(top, #7acbed, #badff3);
background:-webkit-gradient(linear, left top, left bottom, from(#7acbed), to(#badff3));
-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorStr='#7acbed', EndColorStr='#badff3')";
}
.btnLogin:active {
text-shadow:rgba(0, 0, 0, 0.3) 0 -1px 0px;
}
footer#main {
/*position:fixed;*/
left:0;
bottom:10px;
text-align:center;
font:normal 11px/16px Arial, Helvetica, sans-serif;
width:100%;
}
.sticky {
/* General */
margin: 0 auto;
padding: 8px 4px;
/*width: 370px; */
max-width: 300px;
height: auto;
width: auto\9;
position: absolute;
left: 3%;
top: 250px;
/* Font */
font-family:'Nothing You Could Do', cursive;
font-size: 1em;
/* Border */
border:1px #E8Ds47 solid;
/* Shadow */
-moz-box-shadow:0px 0px 6px 1px #333333;
-webkit-box-shadow:0px 0px 6px 1px #333333;
box-shadow:0px 0px 6px 1px #333333;
/* Background */
background: #fefdca;
/* Old browsers */
background: -moz-linear-gradient(top, #fefdca 0%, #f7f381 100%);
/* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #fefdca), color-stop(100%, #f7f381));
/* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #fefdca 0%, #f7f381 100%);
/* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #fefdca 0%, #f7f381 100%);
/* Opera11.10+ */
background: -ms-linear-gradient(top, #fefdca 0%, #f7f381 100%);
/* IE10+ */
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fefdca', endColorstr='#f7f381', GradientType=0);
/* IE6-9 */
background: linear-gradient(top, #fefdca 0%, #f7f381 100%);
/* W3C; A catch-all for everything else */
}
/*.sticky ol {
margin: 12px;
}*/
.sticky p {
text-align: center;
}
Basically I added a width to the body, or else adjusting the size of the window will always cause something to overlap. I also added in div wrappers around the image and form (not sure if really needed but added for what I consider better structure). Took out some of the positioning css as well as it causes undue pain when trying to do things.
Add this CSS rule:
.box
{
position: relative;
z-index: -1;
}
How about this?
I removed your position absolute styles and added a wrapper around the sticky and the login controls and applied float:left and float: right on them.
The wrapper itself is center aligned to the page.
I edited the fiddle you posted in the comment on a previous answer and updated it here:
http://jsfiddle.net/va45t/1/
#wrapper {
width: 720px;
position: relative;
margin: 0 auto;
}
The other styles changed were .box.login and .sticky
Maybe it's too late at night.. I'm not sure, but I can't figure out why the bottom of my body is cut off. I've tried playing around with margins/padding, but nothing is working the way it should.
I originally used an ID on my body element, but then decided to add an extra DIV and that's when it broke.
It gets cut off at 601px, which makes me think my margins are off, but I can't tell. I'd like the <div ID='index'> to fill the entire page, but it's not.
Live Example: http://jsfiddle.net/QbUKN/1/
CSS:
body {
margin: 0;
padding: 0;
}
#index {
background: url(../img/bamboo.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
background-color:#b0c4de;
/*
position: absolute;
width: 100%;
height: 100%;
z-index:-1; */
}
#profile {
background: url(../img/lime.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
#bird {
z-index: 0;
position: fixed;
bottom: 0;
left: 0;
}
/******** WELCOME PAGE ********/
#indexContent {
padding-top: 150px;
}
#welcome {
margin-left: 15%;
margin-top: 150px;
text-align: center;
vertical-align: middle;
float:left;
width: 40%;
z-index: 1;
}
#welcome h1, h2 {
color: white;
font-family: 'Poller One', cursive;
}
#login, #signup {
margin: 10px 60%;
background-color: #FCFAEE;
padding: 0 25px 20px 15px;
border:1px solid;
border-radius: 15px;
width: 300px;
position: relative;
z-index: 1;
/*Box shadow to make div look like it is popping off screen
-webkit-box-shadow: 0px 0px 30px rgba(0,0,0,0.75);
-moz-box-shadow: 0px 0px 30px rgba(0,0,0,0.75);
box-shadow: 0px 0px 30px rgba(0,0,0,0.75); */
}
#login h3, #signup h3 {
border-bottom: 1px solid;
padding-bottom: 10px;
border-color: #D8D8D8;
margin-bottom: 10px;
}
#login .button, #signup .button {
width: 104%;
}
.textField{
margin: 3px 0px;
padding: 5px;
width: 100%;
}
/******** PROFILE ********/
.fillPage {
height: 100%;
margin: 0;
padding: 0;
}
#profileContent {
/*background-color: rgba(255,255,255, .50);*/
background-repeat:repeat;
min-height: 100%;
margin: 0 20% 0 20%;
overflow: hidden; /* Removes background-color gap at end of page in IE */
min-width: 600px;
}
#username {
float: left;
line-height: 1.5em;
}
#logout {
float: right;
margin-right: 25px;
}
#left {
width: 250px;
float: left;
position: fixed;
}
#right{
margin-left: 290px;
margin-right: 50px;
}
#left, #right {
padding-top: 70px;
}
.clear{
clear: both;
}
#stickyNav {
position: fixed;
font-size: 1.5em;
color: white;
background: black;
z-index: 1000;
min-width: 100%;
padding: 10px;
}
.menuItem {
margin: 0px 10px 10px 10px;
background-color: #FCFAEE;
padding: 10px;
border:1px solid;
border-radius: 15px;
width: 100%;
position: relative;
z-index: 1;
-webkit-box-shadow: 2px 2px 0px black;
-moz-box-shadow: 2px 2px 0px black;
box-shadow: 2px 2px 0px black;
}
textarea {
width: 100%;
margin-bottom: 5px;
vertical-align: top;
-webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
-moz-box-sizing: border-box; /* Firefox, other Gecko */
box-sizing: border-box; /* Opera/IE 8+ */
overflow: auto;
}
/******** Button Effects ********/
.button {
width: 100%;
-moz-box-shadow:inset 0px 1px 0px 0px #ffe0b5;
-webkit-box-shadow:inset 0px 1px 0px 0px #ffe0b5;
box-shadow:inset 0px 1px 0px 0px #ffe0b5;
background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #fbb450), color-stop(1, #f89306));
background:-moz-linear-gradient(top, #fbb450 5%, #f89306 100%);
background:-webkit-linear-gradient(top, #fbb450 5%, #f89306 100%);
background:-o-linear-gradient(top, #fbb450 5%, #f89306 100%);
background:-ms-linear-gradient(top, #fbb450 5%, #f89306 100%);
background:linear-gradient(to bottom, #fbb450 5%, #f89306 100%);
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fbb450', endColorstr='#f89306',GradientType=0);
background-color:#fbb450;
-moz-border-radius:7px;
-webkit-border-radius:7px;
border-radius:7px;
border:1px solid #c97e1c;
display:inline-block;
color:#ffffff;
font-family:Trebuchet MS;
font-size:17px;
font-weight:normal;
padding:6px 11px;
text-decoration:none;
text-shadow:0px 1px 0px #8f7f24;
}
.button:hover {
background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #f89306), color-stop(1, #fbb450));
background:-moz-linear-gradient(top, #f89306 5%, #fbb450 100%);
background:-webkit-linear-gradient(top, #f89306 5%, #fbb450 100%);
background:-o-linear-gradient(top, #f89306 5%, #fbb450 100%);
background:-ms-linear-gradient(top, #f89306 5%, #fbb450 100%);
background:linear-gradient(to bottom, #f89306 5%, #fbb450 100%);
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f89306', endColorstr='#fbb450',GradientType=0);
background-color:#f89306;
}
.button:active {
position:relative;
top:1px;
}
HTML:
<div id="index">
<div id="indexContent">
<div id="welcome">
<h1>Welcome!</h1>
<h2>MORE STUFF</h2>
</div>
<div id="login">
<form name="login" action="users/profile" method="post">
<h3>Please Sign In</h3>
<input class="textField" type="text" name="email" placeholder="Username or Email"/><br/>
<input class="textField" type="text" name="password" placeholder="Password"/><br/>
<input class="button" type="submit" value="Sign In"/>
</form>
</div>
<div id="signup">
<form>
<h3>Sign up</h3>
<input class="textField" type="text" name="name" placeholder="Full Name"/><br/>
<input class="textField" type="text" name="email" placeholder="Email"/><br/>
<input class="textField" type="text" name="password" placeholder="Password"/><br/>
<input class="button" type="submit" value="Sign Up" />
</form>
</div>
</div>
<div id="bird">
<img src="img/parrot.png" alt="Parrot" />
</div>
</div>
If you want your background to fill the entire page, you should leave your background styles on body. In your index div, you only have 601px of content in height, that's why your background cuts off at 601px.
Edit: this might be what you want.
html {
height: 100%;
}
body {
height: 100%;
}
#index {
height: 100%;
}
fiddle
Adding bottom padding to your existing #indexContent would be the simplest solution.
#indexContent {
padding-top: 150px;
padding-bottom: 150px;
}
#indexContent {
padding-bottom: 100px;
padding-top: 150px;
}
#bird {
bottom: 0;
height: 100px;
left: 0;
position: fixed;
z-index: 0;
}
'#indexContent' div's padding-bottom should be equal or higher than '#bird' div height
Your code works perfectly fine. Just add a small change on id 'index' and 'bird'.
#index {
Display : table;
background: url(../img/bamboo.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
background-color:#b0c4de;
width:100%;
height:100%;
position: relative;
}
#bird {
position:fixed;
bottom: 0;
left: 0;
}
I've got a container that has a contact form in it.. the form is ignoring my width of 140px and somehow computing itself out to 300px. no idea where it's coming from.
HTML:
<div id="main" role="main">
<div id="mail">
<form id="signup" action="<?=$_SERVER['PHP_SELF']; ?>" method="get">
<fieldset>
<span id="response">
<? require_once('php/store-address.php'); if($_GET['submit']){ echo storeAddress(); } ?>
</span>
<input type="email" name="email" id="email" placeholder="Enter your email address" />
<input type="submit" id="submit" class="btn" value="Go" />
</fieldset>
</form>
</div>
</div>
CSS:
#main {
width:300px;
height:110px;
padding:10px 20px 10px 20px;
position:absolute;
bottom:50px;
left:50%;
margin-left:-170px;
background-color: #f0f3f8;
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#f0f3f8), to(#a9a9ad));
background: -moz-linear-gradient(100% 100% 90deg, #a9a9ad, #f0f3f8);
background: -o-linear-gradient(#f0f3f8, #a9a9ad);
border-radius: 10px;
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
//text-shadow: 0 -1px 1px rgba(0,0,0,0.25);
//border-bottom: 1px solid rgba(0,0,0,0.25);
box-shadow: 0 1px 3px rgba(0,0,0,0.5);
-webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.5);
-moz-box-shadow: 0 1px 3px rgba(0,0,0,0.5);
}
////////CONTACT FORM
#mail {
width:140px;
height:95px;
float:right;
display:block;
/*background: #c9d0de; border: 1px solid #e1e1e1;
-moz-box-shadow: 0px 0px 8px #444;
-webkit-box-shadow: 0px 0px 8px #444;*/
}
#response {
width:140px;
height:25px;
margin-bottom:10px;
display:block;
font-style:italic;
}
input {
width: 124px;
height: 9px;
padding: 8px;
margin: 0 0 10px 0;
background: #5E768D;
background: -moz-linear-gradient(top, #546A7F 0%, #5E768D 20%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#546A7F), color-stop(20%,#5E768D));
border-radius: 10px;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
-moz-box-shadow: 0px 1px 0px #f2f2f2;
-webkit-box-shadow: 0px 1px 0px #f2f2f2;
font-family: sans-serif;
font-size: 10px;
color: #f2f2f2;
text-shadow: 0px -1px 0px #334f71;
outline:none;
}
input::-webkit-input-placeholder {
color: #a1b2c3; text-shadow: 0px -1px 0px #38506b;
}
input:-moz-placeholder {
color: #a1b2c3; text-shadow: 0px -1px 0px #38506b;
}
input:focus, textarea:focus {
background: #728eaa;
background: -moz-linear-gradient(top, #668099 0%, #728eaa 20%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#668099), color-stop(20%,#728eaa));
}
input[type=submit] {
width: 40px;
height: 25px;
padding:5px;
margin: 0 auto;
display:block;
-moz-box-shadow: 0px 0px 5px #999;-webkit-box-shadow: 0px 0px 5px #999;
border: 1px solid #556f8c;
background: -moz-linear-gradient(top, #718DA9 0%, #415D79 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#718DA9), color-stop(100%,#415D79));
cursor: pointer;
}
JSFiddle link
You can't have comments with //. Only multi-line comments work with css. You'll have to remove this comment:
////////CONTACT FORM
The rest of your styles should work after you remove that.