not able to select all the when checked - css

hope i can get some help.
First, i'm new in to programming. I found a great tuto on youtube and wanted to recopied it. It works almost fine, but for some reason I don't get the same result.
When the mouse goes hover the stars it only shows some part of it and when i checked ex. 4 stars it only shows the last part of the 4th star.
thans for the help
HTML:
enter image description here
```
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Rating Star</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css" integrity="sha512-5A8nwdMOWrSz20fDsjczgUidUBR8liPYU+WymTZP1lmY9G6Oc7HlZv156XqnsgNUzTyMefFTcsFH/tnJE/+xBg==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="container">
<h2>5 Star Skills Rating Bar</h2>
<div class="skills">
<h3 class="name"> Html</h3>
<div class="rating">
<input type="radio" name="html">
<input type="radio" name="html">
<input type="radio" name="html">
<input type="radio" name="html">
<input type="radio" name="html">
<input type="radio" name="html">
<input type="radio" name="html">
<input type="radio" name="html">
<input type="radio" name="html">
<input type="radio" name="html">
</div>
</div>
<div class="skills">
<h3 class="name"> CSS</h3>
<div class="rating">
<input type="radio" name="CSS">
<input type="radio" name="CSS">
<input type="radio" name="CSS">
<input type="radio" name="CSS">
<input type="radio" name="CSS">
<input type="radio" name="CSS">
<input type="radio" name="CSS">
<input type="radio" name="CSS">
<input type="radio" name="CSS">
<input type="radio" name="CSS">
</div>
</div>
<div class="skills">
<h3 class="name"> Javascript</h3>
<div class="rating">
<input type="radio" name="Javascript">
<input type="radio" name="Javascript">
<input type="radio" name="Javascript">
<input type="radio" name="Javascript">
<input type="radio" name="Javascript">
<input type="radio" name="Javascript">
<input type="radio" name="Javascript">
<input type="radio" name="Javascript">
<input type="radio" name="Javascript">
<input type="radio" name="Javascript">
</div>
</div>
<div class="skills">
<h3 class="name"> Photoshop</h3>
<div class="rating">
<input type="radio" name="Photoshop">
<input type="radio" name="Photoshop">
<input type="radio" name="Photoshop">
<input type="radio" name="Photoshop">
<input type="radio" name="Photoshop">
<input type="radio" name="Photoshop">
<input type="radio" name="Photoshop">
<input type="radio" name="Photoshop">
<input type="radio" name="Photoshop">
<input type="radio" name="Photoshop">
</div>
</div>
<!-- <p style="color:white">Fournir un commentaire:</p>
<textarea name="message" id="" cols="30" rows="10"></textarea> -->
</div>
</div>
</body>
</html>
```
here the css:
#import url('https://fonts.googleapis.com/css?family=Poppins:200,300,400,500,600,700,800,900&display=swap');
*
{
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Poppins', sans-serif;
}
body
{
display:flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background: #0a2b3c;
}
.container
{
position: relative;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
padding: 30px;
border-radius: 10px;
box-shadow: -1px -1px 2px rgba(255, 255, 255,0.25),
inset 2px 2px 2px rgba(255, 255, 255,0.25),
8px 30px 30px rgba(0, 0, 0, 0.4),
inset -2px -2px 5px rgba(0, 0, 0, 0.3);
}
.container h2
{
margin-bottom: 10px;
font-weight: 500px;
color: #1f9cff;
}
.container .skills
{
display: flex;
justify-content: center;
align-items: center;
margin: 10px 0;
padding-right: 10px;
box-shadow: -1px -1px 2px rgba(255, 255, 255,0.25),
inset 2px 2px 2px rgba(255, 255, 255,0.25),
8px 30px 30px rgba(0, 0, 0, 0.4),
inset -2px -2px 5px rgba(0, 0, 0, 0.3);
transition: 0.5s;
}
.container:hover .skills
{
filter: blur(0px);
opacity: 0.2;
}
.container .skills:hover
{
filter: blur(0px);
opacity: 2;
}
.container .skills h3
{
min-width: 180px;
text-align: right;
padding-right: 20px;
color:#fff;
font-size: 20px;
font-weight: 400px;
letter-spacing: 2px;
}
.container .skills .rating
{
position: relative;
display: flex;
margin: 10px;
flex-direction: row-reverse;
}
.container .skills .rating input
{
position: relative;
width: 20px;
height: 40px;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
-webkit-appearance: none;
appearance: none;
overflow: hidden;
}
.container .skills .rating input::before
{
content: '\f005 ';
position: absolute;
font-family: fontAwesome;
font-size: 34px;
position: absolute;
left: 4px;
color:#030b0f;
transition: 0.5s;
}
.container .skills .rating input:nth-child(2n + 1)::before
{
right: 4px;
left: initial;
}
.container .skills .rating input:hover ∼ input::before,
.container .skills .rating input:hover::before
{
color:#1f9cff;
}
here the result:
I tried like 3x the same video

Related

How to put a textarea and text inut over each other next to a radio?

I have to make a website homework and I have a problem with positioning a text input and a text area above each other next to a bigger radio box.
I've seen a similar post on stack overflow but my problem wasn't solved with that.I'd need something like this: https://i.stack.imgur.com/MUApR.png
.szavazas {
margin-left: 5%;
margin-top: 3%;
}
.raddio {
float: left;
width: 200px;
margin-bottom: 5%;
color: white;
background: green;
border-radius: 8px;
border: 1px solid #003300;
text-align: left;
box-shadow: 0 0 2px 1px black;
height: 350px;
}
input[type="radio"] {
text-align: left;
margin-top: 10px;
margin-bottom: 10px;
}
.velemeny {
float: left;
box-shadow: 0 0 2px 1px black;
width: 200px;
height: 175px;
}
.textin {
float: left;
border: 1px solid black;
background-color: #003300;
color: white;
width: 200px;
height: 165px;
}
<div class="szavazas">
<form class="raddio" action="/action_page.php">
<input type="radio" name="noveny" value="Nagy Flamingóvirág">Nagy Flamingóvirág<br>
<input type="radio" name="noveny" value="Gerbera">Gerbera<br>
<input type="radio" name="noveny" value="Szobai Futóka">Szobai Futóka<br>
<input type="radio" name="noveny" value="Rákvirág">Rákvirág<br>
<input type="radio" name="noveny" value="Zöldike">Zöldike<br>
<input type="radio" name="noveny" value="Borostyán">Borostyán<br>
<input type="radio" name="noveny" value="Azálea">Azálea<br>
<input type="radio" name="noveny" value="Anyósnyelv">Anyósnyelv<br>
<input type="radio" name="noveny" value="Tarka Sárkányfa">Tarka Sárkányfa<br>
<input type="radio" name="noveny" value="Filodendron">Filodendron<br>
</form>
<textarea class="velemeny" rows="7" cols="40" placeholder="Irja le a véleményét a növényről/virágról és hogy találkozott-e már vele? "></textarea>
<form class="textin" action="/action_page.php">
Itt lesz valami hosszu szoveg amit ide fogok irni <br>
<input type="text" name="masiknoveny">
</form>
</div>
You can use flexproperty to align them the way you want. It is a very strong css property and can be used to create any layout you need.
the code below should help you to understand and get started with it.
More about flex : https://codepen.io/enxaneta/full/adLPwv/
.layout {
display: flex;
}
.right-side {
display: flex;
flex-direction: column;
}
.szavazas {
margin-left: 5%;
margin-top: 3%;
}
.raddio {
float: left;
width: 200px;
margin-bottom: 5%;
color: white;
background: green;
border-radius: 8px;
border: 1px solid #003300;
text-align: left;
box-shadow: 0 0 2px 1px black;
height: 350px;
}
input[type="radio"] {
text-align: left;
margin-top: 10px;
margin-bottom: 10px;
}
.velemeny {
float: left;
box-shadow: 0 0 2px 1px black;
width: 200px;
height: 175px;
}
.textin {
float: left;
border: 1px solid black;
background-color: #003300;
color: white;
width: 200px;
height: 165px;
}
<div class="layout">
<div class="left-side">
<form class="raddio" action="/action_page.php">
<input type="radio" name="noveny" value="Nagy Flamingóvirág">Nagy Flamingóvirág<br>
<input type="radio" name="noveny" value="Gerbera">Gerbera<br>
<input type="radio" name="noveny" value="Szobai Futóka">Szobai Futóka<br>
<input type="radio" name="noveny" value="Rákvirág">Rákvirág<br>
<input type="radio" name="noveny" value="Zöldike">Zöldike<br>
<input type="radio" name="noveny" value="Borostyán">Borostyán<br>
<input type="radio" name="noveny" value="Azálea">Azálea<br>
<input type="radio" name="noveny" value="Anyósnyelv">Anyósnyelv<br>
<input type="radio" name="noveny" value="Tarka Sárkányfa">Tarka Sárkányfa<br>
<input type="radio" name="noveny" value="Filodendron">Filodendron<br>
</form>
</div>
<div class="right-side">
<textarea class="velemeny" rows="7" cols="40" placeholder="Irja le a véleményét a növényről/virágról és hogy találkozott-e már vele? "></textarea>
<form class="textin" action="/action_page.php">
Itt lesz valami hosszu szoveg amit ide fogok irni <br>
<input type="text" name="masiknoveny">
</form>
</div>
</div>
I have made some change to your code and achieved the bellow result. Hope this is what you want.
.raddio, .right-side {
float: left;
width: 300px;
margin-bottom: 5%;
color: white;
background: green;
border-radius: 8px;
border: 1px solid #003300;
text-align: left;
box-shadow: 0 0 2px 1px black;
height: 350px;
}
.right-side{
width: 205px;
margin-left: 15px;
border-width:0;
background: transparent;
box-shadow: none;
}
input[type="radio"] {
text-align: left;
margin-top: 10px;
margin-bottom: 10px;
}
.velemeny {
/* float: left; */
box-shadow: 0 0 2px 1px black;
width: 200px;
height: 175px;
border-radius: 8px;
box-sizing: border-box;
margin-bottom: 15px;
}
.textin {
/* float: left; */
border: 1px solid black;
background-color: #003300;
color: white;
width: 200px;
height: 160px;
border-radius: 8px;
padding: 10px;
box-sizing: border-box;
box-shadow: 0 0 2px 1px black;
}
<div class="layout">
<form class="" action="/action_page.php">
<div class="left-side raddio">
<input type="radio" name="noveny" value="Nagy Flamingóvirág">Nagy Flamingóvirág<br>
<input type="radio" name="noveny" value="Gerbera">Gerbera<br>
<input type="radio" name="noveny" value="Szobai Futóka">Szobai Futóka<br>
<input type="radio" name="noveny" value="Rákvirág">Rákvirág<br>
<input type="radio" name="noveny" value="Zöldike">Zöldike<br>
<input type="radio" name="noveny" value="Borostyán">Borostyán<br>
<input type="radio" name="noveny" value="Azálea">Azálea<br>
<input type="radio" name="noveny" value="Anyósnyelv">Anyósnyelv<br>
<input type="radio" name="noveny" value="Tarka Sárkányfa">Tarka Sárkányfa<br>
<input type="radio" name="noveny" value="Filodendron">Filodendron<br>
</div>
<div class="right-side">
<textarea class="velemeny" rows="7" cols="40" placeholder="Irja le a véleményét a növényről/virágról és hogy találkozott-e már vele? "></textarea>
<div class="textin">
Itt lesz valami hosszu szoveg amit ide fogok irni <br>
<input type="text" name="masiknoveny">
</div>
</div>
</form>
</div>

Prevent flexbox overflow

I'm making a series of quiz questions and am utilizing flexboxes for each answer choice.
Ultimately, I'd like each row banded, but the answer choices (the flexboxes) are overflowing outside of the "band."
I want the answer choices to not wrap, so I'm not sure how to accomplish this.
I made a fiddle:
https://jsfiddle.net/4L8e2s9r/1/
input[type="radio"] {
display: none;
}
input[type="radio"]:checked+.quizlabel {
border: 2px solid #0052e7;
transition: .1s;
background-color: #0052e7;
box-shadow: 2px 2px 3px #c8c8c8;
color: #fff;
}
input[type="radio"]:hover+.quizlabel {
border: 2px solid #0052e7;
}
.quizlabel {
padding: 5px;
margin: 5px;
border: 2px solid #484848;
color: #000;
font-family: sans-serif;
font-size: 14px;
}
.quizform>div {
padding: 10px;
margin-top: 10px;
}
.quizlabel:first-of-type {
margin-left: 0;
}
.quizform {
padding: 10px;
font-family: sans-serif;
}
.quizform p {
margin: 2px;
font-weight: Bold;
}
.quizrow:nth-of-type(odd) {
background-color: #e2e3e5;
}
.quizlist {
display: flex;
justify-content: flex-start;
flex-direction: row;
flex-wrap: nowrap;
margin: 0 padding: 0;
}
#result_div {
font-family: sans-serif;
color: #000;
border: 3px solid #000;
padding: 10px;
}
#result_div p {
color: #000;
}
.quiz-submit {
font-family: sans-serif;
color: #fff;
background-color: #000;
padding: 10px;
cursor: pointer;
}
.quiz-submit:hover {
background-color: #0052e7;
}
<form name="quizform" class="quizform">
<div class="quizrow">
<p>Q1</p>
<div class="quizlist">
<input type="radio" name="q1" value="1" id="q1-1"><label for="q1-1" class="quizlabel"><span>Strongly Disagree</span></label>
<input type="radio" name="q1" value="2" id="q1-2"><label for="q1-2" class="quizlabel"><span>Disagree</span></label>
<input type="radio" name="q1" value="3" id="q1-3"><label for="q1-3" class="quizlabel">Neutral</label>
<input type="radio" name="q1" value="4" id="q1-4"><label for="q1-4" class="quizlabel">Agree</label>
<input type="radio" name="q1" value="5" id="q1-5"><label for="q1-5" class="quizlabel">Strongly Agree</label>
</div>
</div>
<div class="quizrow">
<p>Q2</p>
<div class="quizlist">
<input type="radio" name="q2" value="1" id="q2-1"><label for="q-1" class="quizlabel"><span>Strongly Disagree</span></label>
<input type="radio" name="q2" value="2" id="q2-2"><label for="q1-2" class="quizlabel"><span>Disagree</span></label>
<input type="radio" name="q2" value="3" id="q2-3"><label for="q1-3" class="quizlabel">Neutral</label>
<input type="radio" name="q2" value="4" id="q2-4"><label for="q1-4" class="quizlabel">Agree</label>
<input type="radio" name="q2" value="5" id="q2-5"><label for="q1-5" class="quizlabel">Strongly Agree</label>
</div>
</div>
<p></p>
<button type="submit" class="quiz-submit">Submit</button>
</form>
If you really don't want to wrap you can use #media queries to change flex-direction of your quizlist class to column.
input[type="radio"] {
display: none;
}
input[type="radio"]:checked+.quizlabel {
border: 2px solid #0052e7;
transition: .1s;
background-color: #0052e7;
box-shadow: 2px 2px 3px #c8c8c8;
color: #fff;
}
input[type="radio"]:hover+.quizlabel {
border: 2px solid #0052e7;
}
.quizlabel {
padding: 5px;
margin: 5px;
border: 2px solid #484848;
color: #000;
font-family: sans-serif;
font-size: 14px;
}
.quizform>div {
padding: 10px;
margin-top: 10px;
}
.quizlabel:first-of-type {
margin-left: 0;
}
.quizform {
padding: 10px;
font-family: sans-serif;
}
.quizform p {
margin: 2px;
font-weight: Bold;
}
.quizrow:nth-of-type(odd) {
background-color: #e2e3e5;
}
.quizlist {
display: flex;
justify-content: flex-start;
flex-direction: row;
flex-wrap: nowrap;
margin: 0 padding: 0;
}
#media (max-width: 500px){
.quizlist {
display: flex;
flex-direction: column;
flex-wrap: nowrap;
text-align: center;
}
}
#result_div {
font-family: sans-serif;
color: #000;
border: 3px solid #000;
padding: 10px;
}
#result_div p {
color: #000;
}
.quiz-submit {
font-family: sans-serif;
color: #fff;
background-color: #000;
padding: 10px;
cursor: pointer;
}
.quiz-submit:hover {
background-color: #0052e7;
}
<form name="quizform" class="quizform">
<div class="quizrow">
<p>Q1</p>
<div class="quizlist">
<input type="radio" name="q1" value="1" id="q1-1"><label for="q1-1" class="quizlabel"><span>Strongly Disagree</span></label>
<input type="radio" name="q1" value="2" id="q1-2"><label for="q1-2" class="quizlabel"><span>Disagree</span></label>
<input type="radio" name="q1" value="3" id="q1-3"><label for="q1-3" class="quizlabel">Neutral</label>
<input type="radio" name="q1" value="4" id="q1-4"><label for="q1-4" class="quizlabel">Agree</label>
<input type="radio" name="q1" value="5" id="q1-5"><label for="q1-5" class="quizlabel">Strongly Agree</label>
</div>
</div>
<div class="quizrow">
<p>Q2</p>
<div class="quizlist">
<input type="radio" name="q2" value="1" id="q2-1"><label for="q-1" class="quizlabel"><span>Strongly Disagree</span></label>
<input type="radio" name="q2" value="2" id="q2-2"><label for="q1-2" class="quizlabel"><span>Disagree</span></label>
<input type="radio" name="q2" value="3" id="q2-3"><label for="q1-3" class="quizlabel">Neutral</label>
<input type="radio" name="q2" value="4" id="q2-4"><label for="q1-4" class="quizlabel">Agree</label>
<input type="radio" name="q2" value="5" id="q2-5"><label for="q1-5" class="quizlabel">Strongly Agree</label>
</div>
</div>
<p></p>
<button type="submit" class="quiz-submit">Submit</button>
<div> </div>
<div> </div>
<div id="result_div" style="display:none;">
<p id="result_text"></p>
</div>
</form>
I think this is what you're aiming for?
The boxes weren't getting smaller because of the text inside of them, so you needed to add flex-wrap:wrap; to the .quizlist so that way they would go onto the next row. You also needed to add a flex and flex-grow to specify the widths you want them to flex to. If you don't want them to increase widths to match that of the screen size, then remove the flex-grow.
input[type="radio"] {
display: none;
}
input[type="radio"]:checked+.quizlabel {
border: 2px solid #0052e7;
transition: .1s;
background-color: #0052e7;
box-shadow: 2px 2px 3px #c8c8c8;
color: #fff;
}
input[type="radio"]:hover+.quizlabel {
border: 2px solid #0052e7;
}
.quizlabel {
padding: 5px;
margin: 5px;
border: 2px solid #484848;
color: #000;
font-family: sans-serif;
font-size: 14px;
flex: 0 0 5%;
flex-grow: 1;
}
.quizform>div {
padding: 10px;
margin-top: 10px;
}
.quizlabel:first-of-type {
margin-left: 0;
}
.quizform {
padding: 10px;
font-family: sans-serif;
}
.quizform p {
margin: 2px;
font-weight: Bold;
}
.quizrow:nth-of-type(odd) {
background-color: #e2e3e5;
}
.quizlist {
display: flex;
justify-content: flex-start;
flex-direction: row;
flex-wrap: wrap;
margin: 0;
padding: 0;
}
#result_div {
font-family: sans-serif;
color: #000;
border: 3px solid #000;
padding: 10px;
}
#result_div p {
color: #000;
}
.quiz-submit {
font-family: sans-serif;
color: #fff;
background-color: #000;
padding: 10px;
cursor: pointer;
}
.quiz-submit:hover {
background-color: #0052e7;
}
<form name="quizform" class="quizform">
<div class="quizrow">
<p>Q1</p>
<div class="quizlist">
<input type="radio" name="q1" value="1" id="q1-1"><label for="q1-1" class="quizlabel"><span>Strongly Disagree</span></label>
<input type="radio" name="q1" value="2" id="q1-2"><label for="q1-2" class="quizlabel"><span>Disagree</span></label>
<input type="radio" name="q1" value="3" id="q1-3"><label for="q1-3" class="quizlabel">Neutral</label>
<input type="radio" name="q1" value="4" id="q1-4"><label for="q1-4" class="quizlabel">Agree</label>
<input type="radio" name="q1" value="5" id="q1-5"><label for="q1-5" class="quizlabel">Strongly Agree</label>
</div>
</div>
<div class="quizrow">
<p>Q2</p>
<div class="quizlist">
<input type="radio" name="q2" value="1" id="q2-1"><label for="q-1" class="quizlabel"><span>Strongly Disagree</span></label>
<input type="radio" name="q2" value="2" id="q2-2"><label for="q1-2" class="quizlabel"><span>Disagree</span></label>
<input type="radio" name="q2" value="3" id="q2-3"><label for="q1-3" class="quizlabel">Neutral</label>
<input type="radio" name="q2" value="4" id="q2-4"><label for="q1-4" class="quizlabel">Agree</label>
<input type="radio" name="q2" value="5" id="q2-5"><label for="q1-5" class="quizlabel">Strongly Agree</label>
</div>
</div>
<p></p>
<button type="submit" class="quiz-submit">Submit</button>
</form>

Content none on hover in a label

on hover i would like to remove the content inside a label. I have tried with the Portugal tab only. Is it restricted when working inside an element? Thank you
.tablabel {
background: rgba(0, 0, 0, .6);
border: 1px solid #000;
color: #fff !important;
height: 40px;
line-height: 37px;
width: auto;
padding: 2px 8px 2px 8px;
box-shadow: inset 0 0 0 0.1 transparent;
-webkit-transition: ease-out 0.4s;
-moz-transition: ease-out .4s;
transition: ease-out .4s;
transform: translate3d(0, 0, 0);
font-size: 1.15em;
}
.tablabel:hover {
color: #000 !important;
}
#portimg {
content: 'PORTUGAL';
}
#portimg:hover {
content: none;
background: url("/images/flags/portugal-flag.svg");
background-position: center 10%;
background-size: 200px;
transform: translate3d(0, 0, 0);
}
#portimg:hover:after {
content: none;
}
<div class="col-8 justify-content-center">
<input id="tab-1" type="radio" checked="checked" name="tab-groupa" />
<input id="tab-2" type="radio" name="tab-groupa" />
<input id="tab-3" type="radio" name="tab-groupa" />
<input id="tab-4" type="radio" name="tab-groupa" />
<input id="tab-5" type="radio" name="tab-groupa" />
<p class="row text-center justify-content-center text-center">
<label id="portimg" class="tablabel" for="tab-1"></label>
<label id="ukimg" class="tablabel" for="tab-2">UNTIED KINGDOM</label>
<label class="tablabel btn btn-dark white text-center" for="tab-3">CYPRUS</label>
<label class="tablabel btn btn-dark white text-center" for="tab-4">SPAIN</label>
<label class="tablabel btn btn-dark white text-center" for="tab-5">GREECE</label>
</p>
Just edit the #porting selector to this:
#portimg:after {
display: inline;
content: 'PORTUGAL';
}
Here your code edited.
.tablabel {
background: rgba(0, 0, 0, .6);
border: 1px solid #000;
color: #fff !important;
height: 40px;
line-height: 37px;
width: auto;
padding: 2px 8px 2px 8px;
box-shadow: inset 0 0 0 0.1 transparent;
-webkit-transition: ease-out 0.4s;
-moz-transition: ease-out .4s;
transition: ease-out .4s;
transform: translate3d(0, 0, 0);
font-size: 1.15em;
}
.tablabel:hover {
color: #000 !important;
}
#portimg:after {
display: inline;
content: 'PORTUGAL';
}
#portimg:hover {
content: none;
background: url("/images/flags/portugal-flag.svg");
background-position: center 10%;
background-size: 200px;
transform: translate3d(0, 0, 0);
}
#portimg:hover::after {
content: none;
}
<div class="col-8 justify-content-center">
<input id="tab-1" type="radio" checked="checked" name="tab-groupa" />
<input id="tab-2" type="radio" name="tab-groupa" />
<input id="tab-3" type="radio" name="tab-groupa" />
<input id="tab-4" type="radio" name="tab-groupa" />
<input id="tab-5" type="radio" name="tab-groupa" />
<p class="row text-center justify-content-center text-center">
<label id="portimg" class="tablabel" for="tab-1"></label>
<label id="ukimg" class="tablabel" for="tab-2">UNTIED KINGDOM</label>
<label class="tablabel btn btn-dark white text-center" for="tab-3">CYPRUS</label>
<label class="tablabel btn btn-dark white text-center" for="tab-4">SPAIN</label>
<label class="tablabel btn btn-dark white text-center" for="tab-5">GREECE</label>
</p>
</div>

How to give the style to chosen-select and align radio by using bootstrap classes?

I want to give the same style to my chosen-select drop down list and want to align chosen-select and radio button and other controls within the same line.
i am trying like this . please correct me where i am wrong ?
$(document).ready(function () {
$(".chosen-select").chosen({ no_results_text: "Oops, nothing found!" });
});
function submitForm() {
if ($("#frmR").valid()) {
var form = $("#frmR").serialize();
$.post("/Portal/Registration/RegisterP", form, function (msg) {
});
}
}
function Shift() {
window.history.back();
return false;
}
.form-control {
display: block;
width: 100%;
height: 34px;
padding: 6px 12px;
font-size: 18px;
line-height: 1.428571429;
vertical-align: middle;
background-color: #edf8f7;
background-image: none;
border: 1px solid #8dc6cd;
/* border-radius: 4px; */
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,0.075);
box-shadow: inset 0 1px 1px rgba(0,0,0,0.075);
-webkit-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
height: 49px;
}
input[type="checkbox"], input[type="radio"] {
padding: 0;
box-sizing: border-box;
width: 30px;
height: 30px;
background-color: #edf8f7;
/* background-image: none; */
border: 1px solid #8dc6cd;
border-radius: 0px;
}
input[type=checkbox], input[type=radio] {
margin: 4px 0 0;
margin-top: 1px\9;
line-height: normal;
}
input[type=checkbox], input[type=radio] {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
padding: 0;
}
button, input, select, textarea {
font-family: inherit;
font-size: inherit;
line-height: inherit;
}
input {
line-height: normal;
}
button, input, optgroup, select, textarea {
margin: 0;
font: inherit;
color: inherit;
}
* {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
input[type="radio" i] {
margin: 3px 3px 0px 5px;
}
input[type="radio" i] {
-webkit-appearance: radio;
box-sizing: border-box;
}
input[type="radio" i], input[type="checkbox" i] {
background-color: initial;
margin: 3px 0.5ex;
padding: initial;
border: initial;
}
input {
-webkit-appearance: textfield;
background-color: white;
-webkit-rtl-ordering: logical;
user-select: text;
cursor: auto;
padding: 1px;
border-width: 2px;
border-style: inset;
border-color: initial;
border-image: initial;
}
input, textarea, select, button {
text-rendering: auto;
color: initial;
letter-spacing: normal;
word-spacing: normal;
text-transform: none;
text-indent: 0px;
text-shadow: none;
display: inline-block;
text-align: start;
margin: 0em;
font: 13.3333px Arial;
}
input, textarea, select, button, meter, progress {
-webkit-writing-mode: horizontal-tb;
}
label {
display: inline-block;
margin-bottom: 5px;
/* font-weight: bold; */
color: #6b7b8a;
font-size: 18px;
font-weight: bold;
}
label {
display: inline-block;
max-width: 100%;
margin-bottom: 5px;
font-weight: 700;
}
body {
background: #fff;
font-family: 'Roboto', sans-serif;
color: #54667a;
line-height: 22px;
}
body {
font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
font-size: 14px;
line-height: 1.42857143;
color: #333;
background-color: #fff;
}
label>input[type="radio"]{
vertical-align: -30%;
}
<html>
<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link href="https://cdnjs.cloudflare.com/ajax/libs/chosen/1.7.0/chosen.min.css" rel="stylesheet" />
<script
src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js" > </script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.16.0/jquery.validate.min.js" > </script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validation-unobtrusive/3.2.6/jquery.validate.unobtrusive.min.js" > </script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/chosen/1.7.0/chosen.jquery.js" > </script>
</head>
<body>
<form id="frmR" action="#" method="post">
<div class="validation-summary-valid" data-valmsg-summary="true"><ul><li style="display:none"></li>
</ul></div>
<div class="col-xs-6 remove-padding">
<h4>Type</h4>
</div>
<div class="col-xs-6">
<button type="submit" id="register-submit-btn" onclick="submitForm(); return false;" class="btn-primarySmall pull-right">
Register
</button>
</div>
<div class="row">
<div class="col-xs-12">
<div class="col-xs-12">
<div>
<label class="">Type</label>
<label><input type="radio" name="Type" checked="" value="Walk-In">Walk-In</label>
<label><input type="radio" name="Type" value="Telephonic">Telephonic</label>
</div>
</div>
<div class="col-xs-12 remove-padding">
<hr />
<h4>Personal Information</h4>
<hr />
</div>
<div class="col-xs-4">
<div class="form-group">
<label>First Name<span style="color:#FF0000">*</span></label>
<input class="form-control" type="text" placeholder="First Name" name="vFirstName" id="vFirstName" required="required" />
</div>
</div>
<div class="col-xs-4">
<div class="form-group">
<label>Country<span style="color:#FF0000"></span></label>
<select class="form-control chosen-select" data-val="true" data-val-required="The Country field is required." id="vCountry" name="vCountry" required="required"><option value="">-- Select your country--</option>
<option value="1">Australia</option>
<option value="120">Lithuania</option>
<option value="174">Rwanda</option>
<option value="175">Saint Helena</option>
<option value="176">Saint Kitts And Nevis</option>
</select>
</div>
</div>
<div class="col-xs-4">
<div class="form-group">
<label>Gender<span style="color:#FF0000"></span></label>
<label class="checkbox-label"><input type="radio" name="vGender" checked="" value="1">Male</label>
<label class="checkbox-label"><input type="radio" name="vGender" value="2">Female</label>
</div>
</div>
</div>
</div>
</form>
</body>
</html>
You can try this to align select and radio controls...
$(document).ready(function () {
$(".chosen-select").chosen({ no_results_text: "Oops, nothing found!" });
});
function submitForm() {
if ($("#frmR").valid()) {
var form = $("#frmR").serialize();
$.post("/Portal/Registration/RegisterP", form, function (msg) {
});
}
}
function Shift() {
window.history.back();
return false;
}
.form-control {
display: block;
width: 100%;
height: 34px;
padding: 6px 12px;
font-size: 18px;
line-height: 1.428571429;
vertical-align: middle;
background-color: #edf8f7;
background-image: none;
border: 1px solid #8dc6cd;
/* border-radius: 4px; */
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,0.075);
box-shadow: inset 0 1px 1px rgba(0,0,0,0.075);
-webkit-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
height: 49px;
}
input[type="checkbox"], input[type="radio"] {
padding: 0;
box-sizing: border-box;
width: 30px;
height: 30px;
background-color: #edf8f7;
/* background-image: none; */
border: 1px solid #8dc6cd;
border-radius: 0px;
}
input[type=checkbox], input[type=radio] {
margin: 4px 0 0;
margin-top: 1px\9;
line-height: normal;
}
<html>
<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link href="https://cdnjs.cloudflare.com/ajax/libs/chosen/1.7.0/chosen.min.css" rel="stylesheet" />
<script
src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js" > </script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.16.0/jquery.validate.min.js" > </script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validation-unobtrusive/3.2.6/jquery.validate.unobtrusive.min.js" > </script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/chosen/1.7.0/chosen.jquery.js" > </script>
</head>
<body>
<form id="frmR" action="#" method="post">
<div class="validation-summary-valid" data-valmsg-summary="true"><ul><li style="display:none"></li>
</ul></div>
<div class="col-xs-6 remove-padding">
<h4>Type</h4>
</div>
<div class="col-xs-6">
<button type="submit" id="register-submit-btn" onclick="submitForm(); return false;" class="btn-primarySmall pull-right">
Register
</button>
</div>
<div class="row">
<div class="col-xs-12">
<div class="col-xs-12">
<div>
<label class="">Type</label>
<label><input type="radio" name="Type" checked="" value="Walk-In">Walk-In</label>
<label><input type="radio" name="Type" value="Telephonic">Telephonic</label>
</div>
</div>
<div class="col-xs-12 remove-padding">
<hr />
<h4>Personal Information</h4>
<hr />
</div>
</div>
<div class="row" style="margin-left: 15px!important;"/>
<div class="col-xs-4">
<div class="form-group">
<label>First Name<span style="color:#FF0000">*</span></label>
<input class="form-control" type="text" placeholder="First Name" name="vFirstName" id="vFirstName" required="required" />
</div>
</div>
<div class="col-xs-4">
<div class="form-group">
<label>Country<span style="color:#FF0000"></span></label>
<select class="form-control chosen-select" data-val="true" data-val-required="The Country field is required." id="vCountry" name="vCountry" required="required"><option value="">-- Select your country--</option>
<option value="1">Australia</option>
<option value="120">Lithuania</option>
<option value="174">Rwanda</option>
<option value="175">Saint Helena</option>
<option value="176">Saint Kitts And Nevis</option>
</select>
</div>
</div>
<div class="col-xs-4">
<div class="form-group" style="padding-top: 10px;">
<label>Gender<span style="color:#FF0000"></span></label>
<label class="checkbox-label"><input type="radio" name="vGender" checked="" value="1">Male</label>
<label class="checkbox-label"><input type="radio" name="vGender" value="2">Female</label>
</div>
</div>
</div>
</div>
</form>
</body>
</html>

z-index not working with li psuedo element

grrrrrrr, I have been struggling with this for a while.
I try to create a progress bar with connectors, I would the connectors to be under the Circles I have, when the circle is with class active the connector is shown and I would like to avoid it.
Take a look at my fiddle.
/*custom font*/
#import url(http://fonts.googleapis.com/css?family=Montserrat);
body {
font-family: montserrat, arial, verdana;
margin:0;
padding:0;
background-image:url("Capture.PNG");
}
.modal{
position: fixed;
z-index: 1000;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-color: rgb(0,0,0);
background-color: rgba(0,0,0,0.4);
}
.modal-content{
background-color: #fefefe;
margin: 8% auto;
border: 1px solid #888;
width: 662px;
height: 662px;
}
.modal-header{
height:100px;
}
.right-header{
float:right;
width:50%;
}
#msform .formPage {
height: 662px;
padding: 35px;
box-sizing: border-box;
position: relative;
font-family: Arial, Helvetica, sans-serif;
}
/*Hide all except first fieldset*/
#msform > .formPage ~ .formPage{
display: none;
}
/*inputs*/
#msform input, #msform textarea {
padding: 15px;
border: 1px solid #ccc;
border-radius: 3px;
margin-bottom: 10px;
width: 100%;
box-sizing: border-box;
font-family: montserrat;
color: #2C3E50;
font-size: 13px;
}
/*buttons*/
#msform .action-button {
width: 100px;
background: #27AE60;
font-weight: bold;
color: white;
border: 0 none;
border-radius: 1px;
cursor: pointer;
padding: 10px 5px;
margin: 10px 5px;
}
#msform .action-button:hover, #msform .action-button:focus {
box-shadow: 0 0 0 2px white, 0 0 0 3px #27AE60;
}
/*headings*/
.fs-title {
font-size: 15px;
text-transform: uppercase;
color: #2C3E50;
margin-bottom: 10px;
}
.fs-subtitle {
font-weight: normal;
font-size: 13px;
color: #666;
margin-bottom: 20px;
}
/*progressbar*/
#progressbar {
/*CSS counters to number the steps*/
counter-reset: step;
}
/*This is the li circle*/
#progressbar li {
counter-increment: step;
width: 27px;
height: 27px;
background-color:#dcdedf;
margin-left: 35px;
border-radius: 50%;
list-style-type: none;
float: left;
}
/*Display the li number*/
#progressbar li:before {
content: counter(step);
text-align: center;
line-height: 26px;
display: block;
color:white;
}
/*progressbar connectors*/
#progressbar li:after {
content: "";
width: 38px;
height: 10px;
background-color: #dcdedf;
position: relative;
top: -18px;
left: -36px;
display: block;
z-index: -1;
}
#progressbar li:first-child:after {
/*connector not needed before the first step*/
content: none;
}
/*marking active/completed steps green*/
/*The number of the step and the connector before it = green*/
#progressbar li.active, #progressbar li.active:after{
background: #3395ff;
color: white;
}
#progressbar li:first-child{
margin-left:0;
}
.close {
color: #aaa;
float: right;
font-size: 24px;
padding: 5px 15px;
}
.close:hover, .close:focus {
color: black;
text-decoration: none;
cursor: pointer;
}
<div class="modal">
<div class='modal-content'>
<div class='modal-header'>
<span class="close" data-action="close-modal">x</span>
<div class="left-header">
<span>Add new App</span>
<span></span>
</div>
<div class="right-header">
<!-- progressbar -->
<ul id="progressbar">
<li class="active"></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
</div>
</div>
<hr/>
<div class="modal-inner-content">
<form id="msform">
<div class="formPage">
<h2 class="fs-title">Create your account</h2>
<h3 class="fs-subtitle">This is step 1</h3>
<input type="text" name="email" placeholder="Email" />
<input type="password" name="pass" placeholder="Password" />
<input type="password" name="cpass" placeholder="Confirm Password" />
<input type="button" name="next" class="next action-button" value="Next" />
</div>
<div class="formPage">
<h2 class="fs-title">Social Profiles</h2>
<h3 class="fs-subtitle">Your presence on the social network</h3>
<input type="text" name="twitter" placeholder="Twitter" />
<input type="text" name="facebook" placeholder="Facebook" />
<input type="text" name="gplus" placeholder="Google Plus" />
<input type="button" name="previous" class="previous action-button" value="Previous" />
<input type="button" name="next" class="next action-button" value="Next" />
</div>
<div class="formPage">
<h2 class="fs-title">Personal Details</h2>
<h3 class="fs-subtitle">We will never sell it</h3>
<input type="text" name="fname" placeholder="First Name" />
<input type="text" name="lname" placeholder="Last Name" />
<input type="text" name="phone" placeholder="Phone" />
<textarea name="address" placeholder="Address"></textarea>
<input type="button" name="previous" class="previous action-button" value="Previous" />
<input type="submit" name="submit" class="submit action-button" value="Submit" />
</div>
<div class="formPage">
<h2 class="fs-title">Social Profiles</h2>
<h3 class="fs-subtitle">Your presence on the social network</h3>
<input type="text" name="twitter" placeholder="Twitter" />
<input type="text" name="facebook" placeholder="Facebook" />
<input type="text" name="gplus" placeholder="Google Plus" />
<input type="button" name="previous" class="previous action-button" value="Previous" />
<input type="button" name="next" class="next action-button" value="Next" />
</div>
<div class="formPage">
<h2 class="fs-title">Social Profiles</h2>
<h3 class="fs-subtitle">Your presence on the social network</h3>
<input type="text" name="twitter" placeholder="Twitter" />
<input type="text" name="facebook" placeholder="Facebook" />
<input type="text" name="gplus" placeholder="Google Plus" />
<input type="button" name="previous" class="previous action-button" value="Previous" />
<input type="button" name="next" class="next action-button" value="Next" />
</div>
</form>
</div>
</div>
</div>
You need to set the z-index of the immediate parent i.e #progressbar to raise it above the other ancestors.
#progressbar {
position: relative;
z-index: 1;
}
/*custom font*/
#import url(http://fonts.googleapis.com/css?family=Montserrat);
body {
font-family: montserrat, arial, verdana;
margin: 0;
padding: 0;
background-image: url("Capture.PNG");
}
.modal {
position: fixed;
z-index: 1000;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-color: rgb(0, 0, 0);
background-color: rgba(0, 0, 0, 0.4);
}
.modal-content {
background-color: #fefefe;
margin: 8% auto;
border: 1px solid #888;
width: 662px;
height: 662px;
}
.modal-header {
height: 100px;
}
.right-header {
float: right;
width: 50%;
}
#msform .formPage {
height: 662px;
padding: 35px;
box-sizing: border-box;
position: relative;
font-family: Arial, Helvetica, sans-serif;
}
/*Hide all except first fieldset*/
#msform>.formPage~.formPage {
display: none;
}
/*inputs*/
#msform input,
#msform textarea {
padding: 15px;
border: 1px solid #ccc;
border-radius: 3px;
margin-bottom: 10px;
width: 100%;
box-sizing: border-box;
font-family: montserrat;
color: #2C3E50;
font-size: 13px;
}
/*buttons*/
#msform .action-button {
width: 100px;
background: #27AE60;
font-weight: bold;
color: white;
border: 0 none;
border-radius: 1px;
cursor: pointer;
padding: 10px 5px;
margin: 10px 5px;
}
#msform .action-button:hover,
#msform .action-button:focus {
box-shadow: 0 0 0 2px white, 0 0 0 3px #27AE60;
}
/*headings*/
.fs-title {
font-size: 15px;
text-transform: uppercase;
color: #2C3E50;
margin-bottom: 10px;
}
.fs-subtitle {
font-weight: normal;
font-size: 13px;
color: #666;
margin-bottom: 20px;
}
/*progressbar*/
#progressbar {
/*CSS counters to number the steps*/
counter-reset: step;
position: relative;
z-index: 1;
}
/*This is the li circle*/
#progressbar li {
counter-increment: step;
width: 27px;
height: 27px;
background-color: #dcdedf;
margin-left: 35px;
border-radius: 50%;
list-style-type: none;
float: left;
}
/*Display the li number*/
#progressbar li:before {
content: counter(step);
text-align: center;
line-height: 26px;
display: block;
color: white;
}
/*progressbar connectors*/
#progressbar li:after {
content: "";
width: 38px;
height: 10px;
background-color: #dcdedf;
position: relative;
top: -18px;
left: -36px;
display: block;
z-index: -1;
}
#progressbar li:first-child:after {
/*connector not needed before the first step*/
content: none;
}
/*marking active/completed steps green*/
/*The number of the step and the connector before it = green*/
#progressbar li.active,
#progressbar li.active:after {
background: #3395ff;
color: white;
}
#progressbar li:first-child {
margin-left: 0;
}
.close {
color: #aaa;
float: right;
font-size: 24px;
padding: 5px 15px;
}
.close:hover,
.close:focus {
color: black;
text-decoration: none;
cursor: pointer;
}
<div class="modal">
<div class='modal-content'>
<div class='modal-header'>
<span class="close" data-action="close-modal">x</span>
<div class="left-header">
<span>Add new App</span>
<span></span>
</div>
<div class="right-header">
<!-- progressbar -->
<ul id="progressbar">
<li class="active"></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
</div>
</div>
<hr/>
<div class="modal-inner-content">
<form id="msform">
<div class="formPage">
<h2 class="fs-title">Create your account</h2>
<h3 class="fs-subtitle">This is step 1</h3>
<input type="text" name="email" placeholder="Email" />
<input type="password" name="pass" placeholder="Password" />
<input type="password" name="cpass" placeholder="Confirm Password" />
<input type="button" name="next" class="next action-button" value="Next" />
</div>
<div class="formPage">
<h2 class="fs-title">Social Profiles</h2>
<h3 class="fs-subtitle">Your presence on the social network</h3>
<input type="text" name="twitter" placeholder="Twitter" />
<input type="text" name="facebook" placeholder="Facebook" />
<input type="text" name="gplus" placeholder="Google Plus" />
<input type="button" name="previous" class="previous action-button" value="Previous" />
<input type="button" name="next" class="next action-button" value="Next" />
</div>
<div class="formPage">
<h2 class="fs-title">Personal Details</h2>
<h3 class="fs-subtitle">We will never sell it</h3>
<input type="text" name="fname" placeholder="First Name" />
<input type="text" name="lname" placeholder="Last Name" />
<input type="text" name="phone" placeholder="Phone" />
<textarea name="address" placeholder="Address"></textarea>
<input type="button" name="previous" class="previous action-button" value="Previous" />
<input type="submit" name="submit" class="submit action-button" value="Submit" />
</div>
<div class="formPage">
<h2 class="fs-title">Social Profiles</h2>
<h3 class="fs-subtitle">Your presence on the social network</h3>
<input type="text" name="twitter" placeholder="Twitter" />
<input type="text" name="facebook" placeholder="Facebook" />
<input type="text" name="gplus" placeholder="Google Plus" />
<input type="button" name="previous" class="previous action-button" value="Previous" />
<input type="button" name="next" class="next action-button" value="Next" />
</div>
<div class="formPage">
<h2 class="fs-title">Social Profiles</h2>
<h3 class="fs-subtitle">Your presence on the social network</h3>
<input type="text" name="twitter" placeholder="Twitter" />
<input type="text" name="facebook" placeholder="Facebook" />
<input type="text" name="gplus" placeholder="Google Plus" />
<input type="button" name="previous" class="previous action-button" value="Previous" />
<input type="button" name="next" class="next action-button" value="Next" />
</div>
</form>
</div>
</div>
</div>
It seems to work fine when using z-index...
http://www.codeply.com/go/NklFtnx5ks
#progressbar li:after {
content: "";
width: 47px;
height: 10px;
background-color: #dcdedf;
position: relative;
top: -18px;
left: -45px;
display: block;
opacity: .99;
z-index: -1;
}

Resources