I have an email opt in form for Mail Chimp at the top of my site and I cannot get the size of it to change. I want the subscribe button to be on the same line as the email field. Am I doing something wrong?
This is my form code:
<div id="mc_embed_signup">
<form action="//gleefulthings.us12.list-manage.com/subscribe/post?u=0277df98c0e296a094149262c&id=87ac16e6a6" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate>
<div id="mc_embed_signup_scroll">
<div class="mc-field-group">
<input type="email" value="your email address" name="EMAIL" class="email" id="mce-EMAIL" onfocus="if(this.value==this.defaultValue)this.value='';" onblur="if(this.value=='')this.value=this.defaultValue;">
</div>
<div id="mce-responses" class="clear">
<div class="response" id="mce-error-response" style="display:none"></div>
<div class="response" id="mce-success-response" style="display:none"></div>
</div> <!-- real people should not fill this in and expect good things - do not remove this or risk form bot signups-->
<div style="position: absolute; left: -5000px;" aria-hidden="true">
<input type="text" name="b_0277df98c0e296a094149262c_87ac16e6a6" tabindex="-1" value=""></div>
<div class="clear"><input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="button"></div>
</div>
</form>
</div>
And this is my CSS:
<!-- Defines how wide the opt-in will be and centers everything -->
#mc_embed_signup {
width: 880px;
margin: auto auto !important;
}
<!-- Moves the form to the left and sets the width -->
#mc_embed_signup input.email {
float: left !important;
width: 700px !important;
}
<!-- Defines the height of the div surrounding the form -->
#mc_embed_signup .mc-field-group {
min-height: 20px !important;
}
<!-- Moves the button to the right, removes the rounded corners, pushes the button up 45px -->
#mc_embed_signup input.button {
background: #bbcf14 !important;
color: #fff;
font-weight: 600;
display: inline-block !important;
border-radius: 0px !important;
float: right !important;
margin-top: -45px;
}
Here's a link to my test site: http://gleefulthings.com/WPtestblog/. Any help is much appreciated! I've been Googling and can't figure out why it's not working.
input[type="button"], input[type="reset"], input[type="submit"], .button
{
background-color: #111;
border: none;
color: #fff;
cursor: pointer;
font-size: 16px;
font-weight: 300;
padding: 16px 24px;
text-transform: uppercase;
width: 140px;
float: right;
height: 52px;
}
#mce-EMAIL
{
width: 89.9%;
float: left;
}
Dear Friend, I am edit your website online as my inspect element Chrome tool, it work fine.enter image description here This is screen shot of afterward applying CSS into your website.
Still you have any problem feel free to contact me.
Related
I have a text that overflows from its own background, when it reaches this size it stays like this:
I want the font to be smaller and don't overflow so it looks nice but I can't make it work. I tried putting a fixed width and it didn't work, also I wrote an "!important" and it didn't make a difference but when I use another CSS rules for other content it works after that so I guess the code is working.
The stylesheets are well related:
Máster en CSS
This is the HTML of the aside:
<aside id="lateralBar" class="clearfix">
<h3>
Buscar
</h3>
<div id="search">
<form action="#">
<input type="text">
<input type="button" value="L" class="icon">
</form>
</div>
<h3>
Login
</h3>
<div id="login" class="lateralBox">
<form action="">
<label id="user" class="icon">U</label>
<input type="email">
<label id="password" class="icon">w</label>
<input type="password">
<input type="submit" value="Entrar">
<input type="reset" value="Limpiar">
Registrate aquí
¿Has olvidado tu contraseña?
</form>
</div>
<h3>
Redes sociales
</h3>
<div id="socialNetwork" class="lateralBox">
<div class="twitter">
t
<p class="overlay">
Twitter
</p>
</div>
<div class="facebook">
f
<p class="overlay">
Facebook
</p>
</div>
<div class="youtube">
y
<p class="overlay">
Youtube
</p>
</div>
</div>
<h3>
Patrocinadores
</h3>
<div id="sponsors" class="lateralBox">
</div>
</aside>
The normal CSS:
#lateralBar {
width: 300px;
min-height: 1200px;
font-family: "TrebuchetMS";
float: right;
margin: 20px;
margin-right: 82px;
}
#lateralBar h3 {
display: block;
width: auto;
height: 45px;
line-height: 49px;
background: url("../img/pxgray.png"), white;
box-shadow: 0px 1px 0px #393d3f, 1px 2px 0px #393d3f, 2px 3px 0px #393d3f, 3px 4px 0px #393d3f;
font-size: 30px;
font-family: "BebasNeue";
font-weight: normal;
letter-spacing: 2px;
padding-left: 15px;
margin-top: 30px;
margin-bottom: 15px;
}
#lateralBar h3:first-child {
margin-top: 0px;
}
The responsive CSS:
#media (max-width: 899){
#lateralBar {
margin-left: 100px;
}
#lateralBar h3 {
font-size: 10px;
}
}
The issue stands on the way you defined your media.
Try adding 'px' on your max-width and that should work:
#media (max-width: 899px){ .. }
I have been out of the web development scene for a number of years and am getting back into it and developing a website using Bootstrap 4.
This maybe a stupid question but I have some CSS styling for checkboxes for some form elements and when reducing the screen size < 768px the styling vanishes...
Is this something fundamental to Bootstrap (although have not had this happen with any other CSS styled elements?) or am I doing something very obviously wrong?
Here are some code segments:
.question input {
position: absolute;
left: -9999px;
}
.question label {
display: block;
position: relative;
margin: 5px;
padding: 15px 30px 15px 55px;
border: 3px solid #fff;
border-radius: 20px;
color: #fff;
background-color: #005552;
white-space: pre-wrap;
cursor: pointer;
user-select: none;
transition: background-color .2s, box-shadow .2s;
}
.question label::before {
content: '';
display: block;
position: absolute;
top: 10px;
bottom: 10px;
left: 10px;
width: 32px;
border: 3px solid #fff;
border-radius: 20px;
transition: background-color .2s;
}
.question input:checked + label {
background-color: #ab576c;
}
.question input:checked + label::before {
background-color: #fff;
}
<form target="nextQuestion.php" action="post" style="margin-bottom: 0px;">
<input type="hidden" name="percentage" id="percentage">
<input type="hidden" name="currentQuestion" id="currentQuestion" value="1">
<div class="container-fluid">
<div class="row">
<div class="col-12 my-auto toxic-red-background" align="center">
<h6 class="white-text">Your Progress Through Our Questionnaire: </h6>
<div class="progress">
<div class="progress-bar-animated bg-primary" role="progressbar" style="width: 5%" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100"></div>
</div>
</div>
</div>
<div class="row">
<div class="col-12 toxic-teal-background questionnaire-left-section question">
<h3>Q1: Would you use out website again?</h3>
<p> </p>
<input type="hidden" value="Question2">
<input id="yes" type="checkbox" class="QuestionnaureInput">
<label for="yes" class="QuestionnaireLabel">Yes</label>
<input id="no" type="checkbox" class="QuestionnaureInput">
<label for="no" class="QuestionnaireLabel">No</label>
<input id="maybe" type="checkbox" class="QuestionnaureInput">
<label for="maybe" class="QuestionnaireLabel">Maybe</label>
</div>
</div>
<div class="row">
<div class="col-sm-12 clearfix">
<button class="btn btn-primary mb-2 float-left">Prev</button>
<button type="submit" class="btn btn-primary mb-2 float-right">Next</button>
</div>
</div>
</div>
</form>
Here are some screen grabs to illustrate what is happening:
On larger screen - All OK
Screen resized to < 768px and styling is removed
Any suggestions, answers or guidance gratefully received as I am pulling my hair out!!
Thanks in Advance!
I am trying to align some stuff in a login page. I want the pictures to appear left to the input boxes and the buttons on the down part of the div to be left and right. Something like this:
But this is what is happening (on Safari. Chrome works kinda OK as you can see on top image)
The problem is that although it partially works on Chrome, the input boxes are too small and I can't increase their size.
This is the code I am trying to use:
// Outer white DIV for the forms and buttons:
.login-form {
width: 360px;
height: 300px;
text-align: center;
margin-left: auto;
margin-right: auto;
padding: 19px 29px 29px 19px;
color: #444444;
background: rgba(253, 253, 253, 1.000);
border-radius: 7px;
-webkit-border-radius: 7px;
-moz-border-radius: 7px;
border: solid 1px rgba(144, 144, 144, 0.075);
}
// Login field for e-mail:
.login-field-up {
margin-bottom: 5px;
margin-top: 10px;
margin-right: 100px;
float: left;
display: inline-block;
}
/ Login field for password:
.login-field-down {
margin-top: 10px;
margin-bottom: 15px;
float: left;
}
// DIV for Icons of user credential and golden key:
.login-icon {
margin-top: 15px;
margin-right: 15px;
float: left;
display: inline-block;
}
// Right checbox:
.right-col {
float: right;
text-align: center;
margin-top: 10px;
}
Left blue login button:
.left-col {
float: left;
margin-left: 10px;
}
If there is any other easy way to do it, I am up to it. Since I have always worked with backend, I suck with CSS.
<section id="banner">
<h2>Title</h2>
<section>
<div id="skel-layers-wrapper" class="login-form">
<form method="post" action="{% url 'principal' %}">
<div class="login-icon">
<img src="{% static "icons/identity.png" %}" class="icons">
</div>
<div class="login-field-up">
<input type="text" name="username" id="username" placeholder="E-mail" />
</div>
<div class="login-icon">
<img src="{% static "icons/key_user.png" %}" class="icons">
</div>
<div class="login-field-down">
<input type="password" name="password" id="username" placeholder="Password" />
</div>
<div class="left-col">
<input type="submit" value="Login!" class="button" />
</div>
<div class="right-col">
<input type="checkbox" id="remember_login" checked="" name="remember_login" class="6u$ 12u$(3)">
<label for="remember_login" style="color:#5C5C5C">Remember me <img src="{% static "icons/lock_gold_16.png" %}" class="icons"></label>
</div>
</form>
</div>
</section>
</section>
You can increase the size of your input boxes by setting the "font-size" attribute in your style sheet, for example,
input {
font-size:2em;
}
And you can align images with input boxes by using <label></label>, for example,
<label for="email"><img src="image.png" /></label>
<input type="email" placeholder="E-mail" name="email" />
Or, you can also place the images in a separate div and the inputs in another div and then adjust the width, margin or padding to align them the way you want.
But as Billy said, if you post your html code, it will be easier to provide a solution.
EDIT: Thanks for your code. I think you wanted to achieve something like this. I added some borders to help you understand the positioning of the divs. Remove them and change the urls for the images once you are done debugging.
<!DOCTYPE html>
<html>
<head>
<style>
.login-form {
width: 360px;
height: 300px;
margin-left: auto;
margin-right: auto;
padding: 19px 29px 29px 19px;
color: #444444;
background: rgba(253, 253, 253, 1.000);
border-radius: 7px;
-webkit-border-radius: 7px;
-moz-border-radius: 7px;
border: solid 1px rgba(144, 144, 144, 0.075);
border:1px solid black;
}
#title-header {
text-align:center;
}
#username, #password {
margin-left:20px;
}
input {
font-size:1em;
}
img {
width:16px;
height:16px;
}
.login-field-up {
margin-left:50px;
width:250px;
border:1px solid black;
}
.login-field-down {
margin-left:50px;
width:250px;
border:1px solid black;
margin-top:20px;
margin-bottom:20px;
}
.login-icon {
border:1px solid black;
}
.right-col {
float:left;
width:160px;
margin-left:30px;
border:1px solid black;
}
.left-col {
margin-left:50px;
float:left;
width:60px;
border:1px solid red;
}
.inner-wrapper {
margin-top:50px;
width:350px;
height:150px;
border:1px solid red;
}
</style>
<section id="banner">
<h2 id="title-header">Title</h2>
<section>
<div id="skel-layers-wrapper" class="login-form">
<form method="post" action="{% url 'principal' %}">
<div class="inner-wrapper">
<div class="login-field-up">
<img src="image.png">
<input type="text" name="username" id="username" placeholder="E-mail" />
</div>
<div class="login-field-down">
<img src="image.png">
<input type="password" name="password" id="password" placeholder="Password" />
</div>
<div class="left-col">
<input type="submit" value="Login!" class="button" />
</div>
<div class="right-col">
<input type="checkbox" id="remember_login" checked="" name="remember_login" class="6u$ 12u$(3)">
<label for="remember_login" style="color:#5C5C5C">Remember me <img src="{% static "icons/lock_gold_16.png" %}" class="icons"></label>
</div>
</div>
</form>
</div>
</section>
</section>
As you can see by the image. The icon sits high. Any margin or padding I seem to try moves the text box down with it. With it positioned extra high, it also pushed the search text up. Any suggestions on how to fix?
I just want the search icon to be the same height and even with the search box and not mess with the label text.
.icon-btn {
padding: 0;
margin: 0;
display: inline-block;
height: 26px;
}
.icon-magnifier-dark:before {
background-color: white;
border: solid;
content: "\e035";
color: #color-light;
font-family: outlinedFont;
font-style: normal !important;
font-size: 20px;
line-height: 1;
box-sizing: border-box;
}
<div class="col-xs-6 col-sm-6 col-md-6 col-lg-6">
<label for="Search" style="">Search</label>
<input type="text" name="Search" id="Search" size="10" style="" />
<a class="icon-btn" href="#" style="">
<i class="icon-magnifier-dark" style=""></i>
</a>
</div>
I think some other CSS might be overriding or changing the aligning, so you should check your full CSS once. I checked your JSFiddle which you provided in comment on one of the answer, I saw the aligning was OK in the Fiddle.
change font-size
font-family: outlinedFont;
font-style: normal !important;
font-size: 15px;
line-height: 1;
box-sizing: border-box;
}
You made it so difficult. Please Check this code below...
HTML:
<div class="col-xs-6 col-sm-6 col-md-6 col-lg-6">
<label for="Search" style="">Search</label>
<input type="text" name="Search" id="Search" size="10" style="" />
<a class="icon-btn" href="#" style="">
<i class="icon-magnifier-dark" style=""></i>
</a>
</div>
Css:
.icon-btn {
display: inline-block;
width: 26px;
height: 26px;
background-color: red;
text-align: center;
padding:5px;
padding: 3px;
box-sizing: border-box;
}
.icon-magnifier-dark:before {
content: "\e035";
font-family: outlinedFont;
font-style: normal;
}
input[type="text"]{
width:150px;
height:26px;
vertical-align:top;
box-sizing: border-box;
margin-right: -5px;
}
Check the demo on jsfiddle
Disclaimer: I am a VB guy with 4 days of jQuery and CSS experience. I am just trying to figure out the web design world!
I want to learn how to approach a design like this:
!(http://i.imgur.com/tDlRxnh.jpg)
Figuring it out from the image, I believe there's an outer div with an image center aligned and a white border around the image
The image has a left and right button on either sides that overlaps the images (God knows how's that even possible!)
Below the Outer Div are four radio buttons aligned one after the other
How to go about this design? (interested in just the design, not the coding part)
Comments/explanations would help! Thanks.
Edit: With my 16 hrs of experience, this is what I have so far http://jsfiddle.net/29mH2/2/. Sorry for being such a n00b!
<div id="somediv">
<img src=""/>
<img src=""/>
<img src=""/>
</div>
<input type="radio" name="op">
<input type="radio" name="op">
<input type="radio" name="op">
<input type="radio" name="op">
div {
background-color:blue;
border: 2px white;
position: absolute;
}
img {
display: none;
position: absolute;
}
Since you mentioned you're working with jQuery already, take a look at this tutorial and a working example of the result.
Basically, you're going to want to make two list elements.
One will contain the slides, and the other will contain the navigation buttons.
EDIT:
Since you're just looking for an example of the design, Here's a basic example that shows how to make a layout like you're talking about without any actual functionality.
HTML:
<div class="slider">
<img class="image" src="http://i.imgur.com/dL3io.jpg" />
<div class="navigation-arrows">
<div class="arrow left"><</div>
<div class="arrow right">></div>
</div>
</div>
<div class="navigation">
<input type="radio" name="op">
<input type="radio" name="op">
<input type="radio" name="op">
<input type="radio" name="op">
</div>
CSS:
body {
text-align: center;
}
.slider,
.slider .image {
width: 400px;
}
.slider .image,
.navigation-arrows,
.navigation-arrows .arrow {
position: absolute;
}
.navigation-arrows,
.navigation-arrows .arrow {
height: 25px;
}
.slider {
height: 250px;
position: relative;
margin: 20px auto;
}
.slider .image {
height: 250px;
left: 0;
top: 0;
}
.navigation-arrows {
width: 100%;
margin: 0 auto;
top: 125px;
}
.navigation-arrows .arrow {
border-radius: 12.5px;
background: #000000;
color: #ffffff;
width: 25px;
line-height: 25px;
cursor: pointer;
}
.navigation-arrows .left {
left: 5px;
}
.navigation-arrows .right {
right: 5px;
}