I'm trying to stylize my checkbox inputs. Everything works fine except the CHECKED option.
input:checked is working ok alone.... but when I add .filter__checkgroup::after nothing happens.
CSS:
.filter__checkgroup input[type="checkbox"] {
opacity: 0;
cursor: pointer;
width: 50px;
}
.filter__checkgroup-title {
padding-left: 6px;
}
.filter__checkgroup::before{
position: absolute;
margin-top: 5px;
border-radius: 1px;
width: 12px;
height: 12px;
border: 1px solid #999;
content: "";
cursor: pointer;
}
.filter__checkgroup::after {
position: absolute;
left: 37px;
margin-top: 7px;
height: 6px;
width: 8px;
border-left: 2px solid;
border-bottom: 2px solid;
color: #d19b4d;
transform: rotate(-45deg);
cursor: pointer;
content: "";
opacity: 0;
}
.filter__checkgroup:hover::after {
content: "";
opacity: 100 !important;
}
input:checked + .filter__checkgroup::after {
content: "" !important;
opacity: 100 !important;
}
HTML:
<section id="premmerce_filter_filter_widget-3" class="widget widget_premmerce_filter_filter_widget">
<div class="titulo-filtro"><span>SHOP BY</span></div>
<div class="filter filter--style-default" data-premmerce-filter="">
<div class="filter__item filter__item--type-checkbox" data-premmerce-filter-drop-scope="">
<div class="filter__header">
<div class="filter__title">
Categoria </div>
</div>
<div class="filter__inner " data-premmerce-filter-inner="">
<div class="filter__properties-list">
<div class="filter__properties-item ">
<div class="filter__checkgroup" data-filter-control-checkgroup="">
<div class="filter__checkgroup-body">
<div class="filter__checkgroup-link">
<input class="filter__checkgroup-control" type="checkbox" data-filter-control="" id="filter-checkgroup-id-product_cat-blazers-e-jaquetas" data-premmerce-filter-link="https://ouipetite.com.br/loja?filter_product_cat=blazers-e-jaquetas&query_type_product_cat=or">
<label class="filter__checkgroup-check" data-filter-control-label="" for="filter-checkgroup-id-product_cat-blazers-e-jaquetas"></label>
<label class="filter__checkgroup-title " for="filter-checkgroup-id-product_cat-blazers-e-jaquetas">
Blazers e Jaquetas </label>
</div>
</div>
<div class="filter__checkgroup-aside">
<span class="filter__checkgroup-count">
1 </span>
</div>
</div>
</div>
<div class="filter__properties-item ">
<div class="filter__checkgroup" data-filter-control-checkgroup="">
<div class="filter__checkgroup-body">
<div class="filter__checkgroup-link">
<input class="filter__checkgroup-control" type="checkbox" data-filter-control="" id="filter-checkgroup-id-product_cat-calcas" data-premmerce-filter-link="https://ouipetite.com.br/loja?filter_product_cat=calcas&query_type_product_cat=or">
<label class="filter__checkgroup-check" data-filter-control-label="" for="filter-checkgroup-id-product_cat-calcas"></label>
<label class="filter__checkgroup-title " for="filter-checkgroup-id-product_cat-calcas">
Calças </label>
</div>
</div>
<div class="filter__checkgroup-aside">
<span class="filter__checkgroup-count">
1 </span>
</div>
</div>
</div>
<div class="filter__properties-item ">
<div class="filter__checkgroup" data-filter-control-checkgroup="">
<div class="filter__checkgroup-body">
<div class="filter__checkgroup-link">
<input class="filter__checkgroup-control" type="checkbox" data-filter-control="" id="filter-checkgroup-id-product_cat-sem-categoria" data-premmerce-filter-link="https://ouipetite.com.br/loja?filter_product_cat=sem-categoria&query_type_product_cat=or">
<label class="filter__checkgroup-check" data-filter-control-label="" for="filter-checkgroup-id-product_cat-sem-categoria"></label>
<label class="filter__checkgroup-title " for="filter-checkgroup-id-product_cat-sem-categoria">
Sem categoria </label>
</div>
</div>
<div class="filter__checkgroup-aside">
<span class="filter__checkgroup-count">
13 </span>
</div>
</div>
</div>
<div class="filter__properties-item ">
<div class="filter__checkgroup" data-filter-control-checkgroup="">
<div class="filter__checkgroup-body">
<div class="filter__checkgroup-link">
<input class="filter__checkgroup-control" type="checkbox" data-filter-control="" id="filter-checkgroup-id-product_cat-shorts-saias" data-premmerce-filter-link="https://ouipetite.com.br/loja?filter_product_cat=shorts-saias&query_type_product_cat=or">
<label class="filter__checkgroup-check" data-filter-control-label="" for="filter-checkgroup-id-product_cat-shorts-saias"></label>
<label class="filter__checkgroup-title " for="filter-checkgroup-id-product_cat-shorts-saias">
Shorts e saias </label>
</div>
</div>
<div class="filter__checkgroup-aside">
<span class="filter__checkgroup-count">
1 </span>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="filter__item filter__item--type-checkbox" data-premmerce-filter-drop-scope="">
<div class="filter__header">
<div class="filter__title">
Cor </div>
</div>
<div class="filter__inner " data-premmerce-filter-inner="">
<div class="filter__properties-list">
<div class="filter__properties-item ">
<div class="filter__checkgroup" data-filter-control-checkgroup="">
<div class="filter__checkgroup-body">
<div class="filter__checkgroup-link">
<input class="filter__checkgroup-control" type="checkbox" data-filter-control="" id="filter-checkgroup-id-cor-dourado" data-premmerce-filter-link="https://ouipetite.com.br/loja?filter_cor=dourado&query_type_cor=or">
<label class="filter__checkgroup-check" data-filter-control-label="" for="filter-checkgroup-id-cor-dourado"></label>
<label class="filter__checkgroup-title " for="filter-checkgroup-id-cor-dourado">
Dourado </label>
</div>
</div>
<div class="filter__checkgroup-aside">
<span class="filter__checkgroup-count">
1 </span>
</div>
</div>
</div>
<div class="filter__properties-item ">
<div class="filter__checkgroup" data-filter-control-checkgroup="">
<div class="filter__checkgroup-body">
<div class="filter__checkgroup-link">
<input class="filter__checkgroup-control" type="checkbox" data-filter-control="" id="filter-checkgroup-id-cor-marrom" data-premmerce-filter-link="https://ouipetite.com.br/loja?filter_cor=marrom&query_type_cor=or">
<label class="filter__checkgroup-check" data-filter-control-label="" for="filter-checkgroup-id-cor-marrom"></label>
<label class="filter__checkgroup-title " for="filter-checkgroup-id-cor-marrom">
Marrom </label>
</div>
</div>
<div class="filter__checkgroup-aside">
<span class="filter__checkgroup-count">
1 </span>
</div>
</div>
</div>
<div class="filter__properties-item ">
<div class="filter__checkgroup" data-filter-control-checkgroup="">
<div class="filter__checkgroup-body">
<div class="filter__checkgroup-link">
<input class="filter__checkgroup-control" type="checkbox" data-filter-control="" id="filter-checkgroup-id-cor-xadrez" data-premmerce-filter-link="https://ouipetite.com.br/loja?filter_cor=xadrez&query_type_cor=or">
<label class="filter__checkgroup-check" data-filter-control-label="" for="filter-checkgroup-id-cor-xadrez"></label>
<label class="filter__checkgroup-title " for="filter-checkgroup-id-cor-xadrez">
Xadrez </label>
</div>
</div>
<div class="filter__checkgroup-aside">
<span class="filter__checkgroup-count">
1 </span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
In order for input:checked + .filter__checkgroup::after to work, the input would have to be a sibling of .filter__checkgroup, but instead it's a child.
There's no way to select this way in CSS, but you could use JS to do it. Like:
var checks = document.querySelectorAll('.filter__checkgroup-control')
checks.forEach( function(el) {
var root = el.closest('.filter__checkgroup')
el.addEventListener('click', function() {
root.classList.toggle("checked")
})
})
.filter__checkgroup::after {
content: "something";
display: block !important;
padding: 1em;
background: blue;
color: white;
clear: both;
opacity: 0;
}
.filter__checkgroup.checked::after {
opacity: 1;
}
<div class="filter__properties-item">
<div class="filter__checkgroup">
<div class="filter__checkgroup-body">
<div class="filter__checkgroup-link">
<input class="filter__checkgroup-control" type="checkbox">
<label class="filter__checkgroup-check"></label>
<label class="filter__checkgroup-title">Dourado</label>
</div>
</div>
<div class="filter__checkgroup-aside">
<span class="filter__checkgroup-count">1</span>
</div>
</div>
</div>
Related
I am currently working on a webpage login/signup screen and I can't get the content to display on the whole screen. I am using Bulma as the library and handlebars. On my dashboard page after login, the content displays full screen but I can't get the login page to do the same.
Any help would be appreciated.
body {
background-repeat: no-repeat;
background-size: cover;
background-image: url("https://wallpaperaccess.com/full/1431610.jpg");
}
.login-container {
display: flex;
justify-content: center;
text-align: left;
}
.card-header {
justify-content: center;
padding: 10px 0px;
}
.country-label {
color: white;
text-shadow: 2px 2px black;
}
.signin-title {
color: white;
text-shadow: 2px 2px black;
font-size: 40px;
}
<section class="hero" style="background-color: rgb(10, 163, 125); border-bottom: rgb(12, 14, 15) 5px solid; border-left: rgb(12, 14, 15) 5px solid; border-right: rgb(12, 14, 15) 5px solid ">
<div class="hero-body">
<div class="container">
<h1 class="title has-text-centered animated lightSpeedIn">
Take Me Away....<i class="fa-solid fa-earth-africa"></i>
</h1>
</section>
<section class="section">
<div class="login-container">
<div class="columns">
<div class="column is-half">
<h1 class="signin-title"> Sign in</h1>
<form class="form login-form">
<div class="field">
<label for="email-login">Email</label>
<p class="control has-icons-left has-icons-right">
<input class="input" type="email" name="email" placeholder="Email" id="email-login">
<span class="icon is-small is-left">
<i class="fa-solid fa-envelope"></i>
</span>
</p>
</div>
<div class="field">
<label for="password-login">Password</label>
<p class="control has-icons-left has-icons-right">
<input class="input" type="password" name="password" placeholder="Password" id="password-login">
<span class="icon is-small is-left">
<i class="fa-solid fa-key"></i>
</span>
</p>
</div>
<div class="field">
<p class="control">
<button class="btn btn-primary" type="submit">
Login
</button>
</p>
</div>
</form>
</div>
<form class="form signup-form">
<div class="column">
<h1 class="signin-title">Sign Up</h1>
<div class="field">
<label for="name-signup">Name</label>
<p class="control has-icons-left has-icons-right">
<input class="input" type="text" name="name" placeholder="Name" id="name-signup">
<span class="icon is-small is-left">
<i class="fa-solid fa-user"></i>
</span>
</p>
</div>
<div class="field">
<label for="email-signup">Email</label>
<p class="control has-icons-left has-icons-right">
<input class="input" type="email" name="email" placeholder="Email" id="email-signup">
<span class="icon is-small is-left">
<i class="fa-solid fa-envelope"></i>
</span>
</p>
</div>
<div class="field">
<label for="password-signup">Password</label>
<p class="control has-icons-left has-icons-right">
<input class="input" type="password" name="password" placeholder="Password" id="password-signup">
<span class="icon is-small is-left">
<i class="fa-solid fa-key"></i>
</span>
</p>
</div>
<div class="field">
<p class="control">
<button class="btn btn primary" type="submit">
Sign up
</button>
</p>
</div>
</div>
</div>
</form>
</div>
</section>
<section class="hero" style="background-color: rgb(10, 163, 125); border-top: rgb(12, 14, 15) 5px solid; border-left: rgb(12, 14, 15) 5px solid; border-right: rgb(12, 14, 15) 5px solid ">
<div class="hero-body">
<div class="container">
<h1 class="title has-text-centered animated lightSpeedIn">
Take Me Away....<i class="fa-solid fa-earth-africa"></i>
</h1>
</section>
<script src="/js/login.js"></script>
In the default CSS code for radio buttonn, it is gray when it is not selected and is blue when it is selected:
I however need it to be black in both states. Thus, I have overriden SCSS for radio buttons. Here comes my code:
HTML:
<div class="col-md-2 col-sm-6">
<div class="row">
<div class="col-md-12">
<label>Earlier experience in this field?</label>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="radio">
<label><input type="radio" formControlName="earlierExperience" value="1">Yes</label>
</div>
</div>
<div class="col-md-6">
<div class="radio">
<label><input type="radio" formControlName="earlierExperience" value="0">No</label>
</div>
</div>
</div>
</div>
CSS:
input[type='radio']:after {
width: 15px;
height: 15px;
border-radius: 50%;
top: -2px;
left: -1px;
position: relative;
background-color:white;
display: inline-block;
visibility: visible;
border: 1px solid black;
}
input[type='radio']:checked:after {
border: 4.5px solid black;
}
The problem with this code is that the small circle in the middle of the checked button is not shown anymore:
Can you help me with this?
You can use the new property accent-color which sets the colour for the input. Broswer support is limited to Chrome and Firefox at the moment so you will create fallbacks for other browsers.
input {accent-color: black;}
input {
accent-color: black;
}
<div class="col-md-2 col-sm-6">
<div class="row">
<div class="col-md-12">
<label>Earlier experience in this field?</label>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="radio">
<label><input type="radio" formControlName="earlierExperience" value="1">Yes</label>
</div>
</div>
<div class="col-md-6">
<div class="radio">
<label><input type="radio" formControlName="earlierExperience" value="0">No</label>
</div>
</div>
</div>
</div>
For solution, you can use property filter in css.
input[type='radio'] {
filter: grayscale(100%) contrast(200%);
}
input[type='radio'] {
filter: grayscale(100%) contrast(200%);
}
<div class="col-md-2 col-sm-6">
<div class="row">
<div class="col-md-12">
<label>Earlier experience in this field?</label>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="radio">
<label>
<input
type="radio"
formControlName="earlierExperience"
value="1"
/>Yes
</label>
</div>
</div>
<div class="col-md-6">
<div class="radio">
<label>
<input
type="radio"
formControlName="earlierExperience"
value="0"
/>No
</label>
</div>
</div>
</div>
</div>
Custom solution with box-shadow, pseudo-element and input binding to label
.radio {
margin-left: 0.125em;
}
.radio label {
position: relative;
padding-left: 1.5em;
cursor: pointer;
}
.radio label::after {
content: '';
width: 1em;
height: 1em;
position: absolute;
top: 0;
left: 0.25em;
border-radius: 50%;
box-shadow: inset 0 0 0 2px black;
}
input[type='radio'] {
position: absolute;
visibility: hidden;
}
input[type='radio']:checked~label::after {
box-shadow: inset 0 0 0 2px black, inset 0 0 0 4px white, inset 0 0 0 10px rgb(0, 0, 0);
}
<div class="col-md-2 col-sm-6">
<div class="row">
<div class="col-md-12">
<label>Earlier experience in this field?</label>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="radio">
<input id="yes" type="radio" name="radio" formControlName="earlierExperience" value="1" />
<label for="yes"> Yes </label>
</div>
</div>
<div class="col-md-6">
<div class="radio">
<input id="no" type="radio" name="radio" formControlName="earlierExperience" value="0" />
<label for="no"> No </label>
</div>
</div>
</div>
</div>
This question already has an answer here:
Vertical Tree with CSS and HTML
(1 answer)
Closed 6 years ago.
How can I design a tree without using (:before, :last-child and :after) because they are not supported in my project (I am using IE7). The problem is that the left border of the list does not stop at the last item.
Example of the problem:
error
The solution should look like:
ok
Here is a fragment of my jsp code:
<s:if test="testDev == ''">
<s:if test="reponseDTO.testDevItemDTOMap.size > 0">
<div class="misc_pad" style="position:relative">
<p class="p_spacer"><b>Dev</b></p>
<s:iterator value="reponseDTO.testDevItemDTOMap" status="testDevStatus">
<div class="menu_test">
<div>
<a href="expandtestDev_<s:property value="#testDevStatus.index" />" rel="expandtest">
<s:if test="reponseDTO.testDevNiveau2ItemDTOMap.get(key).size > 0"><img id="expandTree" src="<portal-logic:urlFindInTheme file="images/sdin/layout/open_content.gif" />" />
</s:if>
</a>
<a href="<s:property value="value.valeurP" />" rel="testDev" class="menu_test_lien">
<s:property value="value.libelle" /> (<s:property value="value.nombreDocuments" />)</a>
</div>
<s:if test="reponseDTO.testDevNiveau2ItemDTOMap.get(key).size > 0">
<ul id="expandtestDev_<s:property value="#testDevStatus.index" />">
<s:iterator value="reponseDTO.testDevNiveau2ItemDTOMap.get(key)" status="testDevNiveau2Status">
<li>
<div class="menu_test">
<div>
<a href="expandtestDevNiveau2_<s:property value="#testDevStatus.index" />_<s:property value="#testDevNiveau2Status.index" />" rel="expandtest">
<s:if test="reponseDTO.testDevNiveau3ItemDTOMap.get(valeurP).size > 0">
<img id="expandTree" src="<portal-logic:urlFindInTheme file="images/sdin/layout/open_content.gif" />" />
</s:if>
</a>
<a href="<s:property value="valeurP" />" rel="testDev" class="menu_test_lien">
<s:property value="libelle" /> (<s:property value="nombreDocuments" />)
</a>
</div>
<s:if test="reponseDTO.testDevNiveau3ItemDTOMap.get(valeurP).size > 0">
<ul id="expandtestDevNiveau2_<s:property value="#testDevStatus.index" />_<s:property value="#testDevNiveau2Status.index" />">
<s:iterator value="reponseDTO.testDevNiveau3ItemDTOMap.get(valeurP)" status="testDevNiveau3Status">
<li>
<s:property value="libelle" /> (<s:property value="nombreDocuments" />)
</li>
</s:iterator>
</ul>
</s:if>
</div>
</li>
</s:iterator>
</ul>
</s:if>
</div>
</s:iterator>
</div>
</s:if>
</s:if>
I found this piece of code that looks like what I want:
.test ul {
padding:0;
margin: 0;
margin-left:6px;
list-style:none;
background: #fff;
color:#000;
position:relative;
}
.test ul:before {
content:"";
position:absolute;
top:0;
bottom:0;
left:0;
border-left:1px solid #000;
}
.test li {
margin:0;
padding:0 16px;
line-height:2em;
font-weight:bold;
position:relative;
}
.test li:before {
content:"";
display:block;
width:10px;
height:0;
border-top:1px solid #000;
margin-top:-1px;
position:absolute;
top:1em;
left:0;
}
.test li:last-child:before {
background:white;
height:auto;
top:1em;
bottom:0;
}
<html>
<head>
<link rel="stylesheet" href="test.css">
</head>
<body>
<div class="test">
<div>
+
Label A
</div>
<ul>
<li>
<div class="test">
<div>
+
Label A1
</div>
<ul>
<li>
<div class="test">
<div>
+
Label A11
</div>
</div>
</li>
<li>
<div class="test">
<div>
+
Label A12
</div>
</div>
</li>
</ul>
</div>
</li>
</ul>
</div>
</body>
</html>
Any help will be appreciated.
I have made it using flex box refer the snippet below. Hope you are looking something like this
.outerBdr{
border-left:1px solid #dfdfdf;
position:relative;
display:flex;
flex-flow: column wrap;
align-items:flex-start;
justify-content:space-between;
overflow:auto
}
.cenBdr{
position:relative;
padding-left:30px;
display:flex;
align-items:center;
margin-bottom:10px
}
.cenBdr label,.cenBdrInr label{
position:relative;
margin-right:5px;
align-self:flex-start
}
.cenBdr label:before, .cenBdrInr label:before{
content: '';
position: absolute;
left: -51px;
width: 33px;
height: 1px;
border-top: 1px solid #dfdfdf;
top: 50%;
}
.cenBdrInr label:before{
width:30px;
left:-48px
}
.cenBdrInr{
align-items: flex-start;
display: flex;
flex-flow: column nowrap;
justify-content: space-around;
padding-left: 30px;
border-left: 1px solid #dfdfdf;
position:relative
}
.cenBdrInr > div{
margin-bottom:10px;
display:flex
}
.cenBdr input{
align-self:flex-start;
}
<div class="outerBdr">
<div class="cenBdr">
<input type="checkbox" id="name">
<label for="name">Name</label>
</div>
<div class="cenBdr">
<input type="checkbox" id="mark">
<label for="mark">Marks</label>
<div class="cenBdrInr">
<div>
<input type="checkbox" id="subj1">
<label for="sub1">Subj1</label>
<div class="cenBdrInr">
<div>
<input type="checkbox" id="subj1">
<label for="sub1">Subj1</label>
</div>
<div>
<input type="checkbox" id="subj2">
<label for="subj2">subj2</label>
</div>
<div>
<input type="checkbox" id="subj3">
<label for="subj3">subj3</label>
<div class="cenBdrInr">
<div>
<input type="checkbox" id="subj1">
<label for="sub1">Subj1</label>
</div>
<div>
<input type="checkbox" id="subj2">
<label for="subj2">subj2</label>
</div>
</div>
</div>
</div>
</div>
<div>
<input type="checkbox" id="subj2">
<label for="subj2">subj2</label>
</div>
<div>
<input type="checkbox" id="subj3">
<label for="subj3">subj3</label>
</div>
</div>
</div>
<div class="cenBdr">
<input type="checkbox" id="id">
<label for="id"> ID</label>
</div>
<div class="cenBdr">
<input type="checkbox" id="rank">
<label for="rank"> Rank</label>
</div>
<div class="cenBdr">
<input type="checkbox" id="rating">
<label for="rating"> rating</label>
<div class="cenBdrInr">
<div>
<input type="checkbox" id="subj1">
<label for="sub1">Subj1</label>
<div class="cenBdrInr">
<div>
<input type="checkbox" id="subj1">
<label for="sub1">Subj1</label>
</div>
<div>
<input type="checkbox" id="subj2">
<label for="subj2">subj2</label>
</div>
<div>
<input type="checkbox" id="subj3">
<label for="subj3">subj3</label>
<div class="cenBdrInr">
<div>
<input type="checkbox" id="subj1">
<label for="sub1">Subj1</label>
</div>
<div>
<input type="checkbox" id="subj2">
<label for="subj2">subj2</label>
</div>
</div>
</div>
</div>
</div>
<div>
<input type="checkbox" id="subj2">
<label for="subj2">subj2</label>
</div>
<div>
<input type="checkbox" id="subj3">
<label for="subj3">subj3</label>
</div>
</div>
</div>
<div class="cenBdr">
<input type="checkbox" id="class">
<label for="class"> class</label>
</div>
</div>
How do I get the subscribe button to go beside the email field of the form.. and the hover doesn't seem to be working on the subscribe button
using bootstrap and HTML5 and CSS
<form class="subscribe_form">
<div class="subscrive_group wow fadeInUp">
<input class="form-control subscribe_mail" type="email" placeholder="Enter your email address">
<input class="btn-form" type="submit" value="Subscribe">
</div>
</form>
CSS
subscribe_form {
border: 1px solid #DDDDDD;
color: #CCCCC6;
font-family: 'Roboto', sans-serif;
font-size: 16px;
margin-top: 0;
outline: medium none;
width: 75%;
}
.subscribe_form .btn-form {
margin: 10px;
}
.btn-form {
color: #00bfff;
padding: 10px 30px;
font-weight: 500;
text-decoration: none;
border-radius: 200px;
transition: background-color 0.2s, border 0.2s, color 0.2s;
border: 1px solid #00bfff;
background-color: #fff;
letter-spacing: .5px;
font-size: 16px;
}
.btn-form:hover,
.btn-form:active {
border: 1px solid #00bfff;
background-color: #fff;
color: #00bfff;}
heres what happened when I tried this below (image attached)
Here is the rest of the code for that section
<section class="works service-page">
<div class="container">
<h2 class="subtitle wow fadeInUp animated" data-wow-delay=".3s" data-wow-duration="500ms">TEXT </h2>
<p class="subtitle-des wow fadeInUp animated" data-wow-delay=".5s" data-wow-duration="500ms">
TEXT
</p>
<div class="row">
<div class="col-sm-4 ">
<figure class="wow fadeInLeft animated portfolio-item" data-wow-duration="500ms" data-wow-delay="0ms">
<figcaption>
<h2>
<a href="#" class="figma">
text</a> <span class="par-text-one">text</span>
</h2>
<p class="para">
text
</p>
</figcaption>
<div class="img-wrapper">
<img src="images/" class="img-responsive" alt="this is a title" >
<div class="overlay">
<div class="buttons">
<a target="_blank" href="">Discover</a>
</div>
</div>
</div>
<figcaption>
<p class="para">text
<br>
text
</p>
</figcaption>
</figure>
</div>
<div class="col-sm-4 ">
<figure class="wow fadeInLeft animated portfolio-item" data-wow-duration="500ms" data-wow-delay="0ms">
<figcaption>
<h2>
<a href="#" class="figma">
text </a> <span class="par-text-one">text </span>
</h2>
<p class="para">text
</p>
</figcaption>
<div class="img-wrapper">
<img src="images/.jpg" class="img-responsive" alt="this is a title" >
<div class="overlay">
<div class="buttons">
<a target="_blank" href="">Discover</a>
</div>
</div>
</div>
<figcaption>
<p class="para">text
<br>text
</p>
</figcaption>
</figure>
</div>
<div class="col-sm-4 boxed">
<h2> More Products Coming Soon! </h2>
<p class="para-form">
text
</p>
<p class="para-blue">text
</p>
<div class="container">
<form class="subscribe_form">
<div class="subscrive_group wow fadeInUp row col-sm-12">
<div class="col-sm-6">
<input class="form-control subscribe_mail" type="email" placeholder="Enter your email address">
</div>
<div class="col-sm-6">
<input class="btn-form" type="submit" value="Subscribe">
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</section>
You can add the form-inline class on your <form> tag.
http://getbootstrap.com/css/#forms-inline.
<form class="subscribe_form form-inline">
<div class="subscrive_group wow fadeInUp">
<input class="form-control subscribe_mail" type="email" placeholder="Enter your email address">
<input class="btn-form" type="submit" value="Subscribe">
</div>
</form>
try this:
<form class="subscribe_form">
<div class="subscrive_group wow fadeInUp row col-sm-12">
<div class="col-sm-6">
<input class="form-control subscribe_mail" type="email" placeholder="Enter your email address">
</div>
<div class="col-sm-6">
<input class="btn-form" type="submit" value="Subscribe">
</div>
</div>
</form>
I have difficulties to arrange the css bootstrap form .
On top of the picture below is the layout I get and just under is the layout I would like to obtain:
http://s27.postimg.org/dfztgn35v/flow_Root3665.png
This is: the first column witn names aligned on their last letter, and aligned input fields on the left and on the right.
Here is the css I used:
<div class="well">
<form class="form-horizontal" method="post">
<fieldset>
<legend>Event</legend>
<div class="form-group">
<label for="input-append date" class="col-lg-1 control-label">Date</label>
<div class="col-lg-3">
<div class="input-group input-append date" id="startDatePicker">
<input type="text" class="form-control" name="datepicker" id="datepicker1" readonly style="background-color: white" /><span class="input-group-addon add-on"><span class="glyphicon glyphicon-calendar"></span></span>
</div>
</div>
<div class="form-group">
<label for="input-append type" class="col-lg-1 control-label">Type</label>
<div class="col-lg-2">
<select class="form-control" id="select">
<option>select1</option>
<option>select2</option>
</select>
</div>
</div>
<div class="form-group">
<label for="inputTitle" class="col-lg-1 control-label">Title</label>
<div class="col-lg-6">
<input kl_virtual_keyboard_secure_input="on" class="form-control" id="inputTitle" placeholder="Title" type="text" maxlength="30">
</div>
</div>
<div class="form-group">
<label for="textArea" class="col-lg-1 control-label">Description</label>
<div class="col-lg-6">
<textarea class="form-control" rows="3" id="textArea" placeholder="Description" maxlength="200"></textarea>
</div>
</div>
</div>
</fieldset>
</form>
</div>
Thanks!
With some minor CSS you can acheive that. See example.
#soForm input,
#soForm select {
height: 50px;
font-size: 16px;
-webkit-border-radius: 0;
border-radius: 0;
border: 4px solid #444;
}
#soForm textarea {
font-size: 16px;
-webkit-border-radius: 0;
border-radius: 0;
border: 4px solid #444;
}
#soForm .input-group-addon {
height: 50px;
font-size: 13px;
-webkit-border-radius: 0;
border-radius: 0;
border-right: 4px solid #444;
border-top: 4px solid #444;
border-bottom: 4px solid #444;
}
.btn.btn-submit {
border-radius: 0;
height: 50px;
width: 100px;
border: 4px solid #444;
}
#media (min-width: 768px) {
#soForm .soForm {
margin: 10px auto;
}
#soForm .control-label {
margin-top: 25px;
}
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet" />
<div class="well">
<div class="container">
<form id="soForm" name="soForm">
<div class="form-group">
<label for="date" class="col-sm-2 control-label">Date</label>
<div class="col-sm-5">
<div class="input-group soForm">
<input type="text" class="form-control" id="date" /> <span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span>
</div>
</div>
</div>
<div class="form-group">
<label for="type" class="col-sm-2 control-label">Type</label>
<div class="col-sm-3">
<select class="form-control soForm" id="type">
<option>select1</option>
<option>select2</option>
</select>
</div>
</div>
<div class="form-group">
<label for="title" class="col-sm-2 control-label">Title</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="title" />
</div>
</div>
<div class="form-group">
<label for="description" class="col-sm-2 control-label">Description</label>
<div class="col-sm-10">
<textarea class="form-control soForm" rows="5" id="desc"></textarea>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="submit" class="btn btn-default btn-submit">Submit</button>
</div>
</div>
</form>
</div>
</div>