Is it possible to remove the first transparent border-left without increasing the height of the first box? I initially tried using margins, but this cannot work due to the use of percentages. Here is what I have - http://jsfiddle.net/KCbgM/1/
Update: The border that I am trying to remove is already transparent - the left border of the first box. I am trying to get the boxes to fit in the 100% with no gap before the first child - which at the moment is a transparent border using the '.grid ul li .grid-item' class.
HTML:
<div class="grid">
<ul>
<li>
<div class="grid-item grid-five">
<div class="grid-person-wrapper">
<img class="grid-person-mug" src="http://boardingarea.wpengine.netdna-cdn.com/deltapoints/files/2012/07/test.jpg">
</div>
</div>
</li>
<li>
<div class="grid-item grid-five">
<div class="grid-person-wrapper">
<img class="grid-person-mug" src="http://boardingarea.wpengine.netdna-cdn.com/deltapoints/files/2012/07/test.jpg">
</div>
</div>
</li>
<li>
<div class="grid-item grid-five">
<div class="grid-person-wrapper">
<img class="grid-person-mug" src="http://boardingarea.wpengine.netdna-cdn.com/deltapoints/files/2012/07/test.jpg">
</div>
</div>
</li>
<li>
<div class="grid-item grid-five">
<div class="grid-person-wrapper">
<img class="grid-person-mug" src="http://boardingarea.wpengine.netdna-cdn.com/deltapoints/files/2012/07/test.jpg">
</div>
</div>
</li>
<li>
<div class="grid-item grid-five">
<div class="grid-person-wrapper">
<img class="grid-person-mug" src="http://boardingarea.wpengine.netdna-cdn.com/deltapoints/files/2012/07/test.jpg">
</div>
</div>
</li>
</ul>
</div>
CSS:
.grid {
display: block;
float: left;
border:1px solid #000;
}
.grid ul {
list-style: none;
margin: 0;
padding: 0;
}
.grid ul li {
display: inline;
text-align: -webkit-match-parent;
}
.grid-five {
width: 20%;
}
.grid-item {
float: left;
display: block;
background: transparent;
position: relative;
overflow: hidden;
}
.grid ul li .grid-item {
border-left: 34px solid transparent;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.grid ul li:first-child .grid-item {
margin-left:0px;
}
.grid-person-wrapper {
border: 8px solid #cad7c5;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
background: #fff;
float: left;
position: relative;
z-index: 1;
width: 100%;
cursor: pointer;
display: block;
-webkit-transition: All 0.1s ease;
-moz-transition: All 0.1s ease;
-o-transition: All 0.1s ease;
-ms-transition: All 0.1s ease;
transition: All 0.1s ease;
}
.grid-person-wrapper:hover {
border: 8px solid #a9f001;
opacity: 0.8;
}
.grid-person-mug {
width: 100%;
border: none;
max-width: 100%;
}
Remove the transparent borders, and instead set text-align:justify; on the list and use a pseudo element to stretch contents to 100% width:
FIDDLE
(Relevant) CSS
.grid ul {
list-style: none;
margin: 0;
padding: 0;
text-align:justify;
}
.grid ul:after {
content: '';
width: 100%;
display: inline-block;
}
.grid ul li {
display: inline;
}
.grid-five {
width: 18%;
}
You can try this...
Fiddle here..
.grid ul li:first-child .grid-person-wrapper
{
border-left:transparent;
}
If your requirement is different then let me know..
Good Luck...:)
You need to address the width change also. Try :
.grid ul li:first-child .grid-item {
border-left: none;
width: 15%;
}
Fiddle : http://jsfiddle.net/KCbgM/5/
Edit 1 :
How about changing the margin between the divs to account for the variation ?
.grid ul li .grid-item {
-moz-box-sizing: border-box;
border-left: 34px solid rgba(0, 0, 0, 0);
margin-left: 1.25%;
}
.grid ul li:first-child .grid-item {
border-left: medium none;
margin-left: 0;
width: 15%;
}
Fiddle : http://jsfiddle.net/KCbgM/6/
Let me know if this is what you want.
Try:
.grid ul li .grid-item {
padding-left: 34px;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
EDITED:
Ok, now I see the issue.
This should solve the problem:
.grid ul li:first-child .grid-item {
margin-left:-34px;
}
Related
I am trying to add an efficient box-shadow to my flex elements by following this article.
Problem is it doesn't work, this is the minified example.
I've tried setting the position: relative on nav, but it just made the ::after element the size of the whole navbar.
<nav>
<div class="nav-left">
<a href="#">
hello
</a>
</div>
<div class="nav-center"></div>
<div class="nav-right"></div>
</nav>
nav {
display: flex;
min-height: 5rem;
background-color: #402424;
align-items: stretch;
}
nav a,
nav .brand {
text-decoration: none;
align-items: center;
display: flex;
color: #AFAFAF;
}
nav a::after {
content: '';
position: absolute;
z-index: -1;
width: 100%;
height: 100%;
opacity: 0;
border-radius: 5px;
box-shadow: 0 5px 15px rgba(0,0,0,0.3);
transition: opacity 0.3s ease-in-out;
}
nav a:hover::after {
opacity: 1;
}
Try this instead,
Add to nav a
nav a{position:relative;}
also add to nav a::after
nav a::after{
top:0;
right:0;
left:0;
bottom:0;
}
body {
background: #20262E;
padding: 0;
margin: 0;
font-family: Helvetica;
}
nav {
display: flex;
min-height: 5rem;
background-color: #402424;
align-items: stretch;
}
nav a,
nav .brand {
text-decoration: none;
align-items: center;
display: flex;
color: #AFAFAF;
position:relative;
}
nav a::after {
content: '';
position: absolute;
z-index: 1;
opacity: 0;
top:0;
right:0;
left:0;
bottom:0;
border-radius: 5px;
box-shadow: 0 5px 15px rgba(0,0,0,0.3);
transition: opacity 0.3s ease-in-out;
}
nav a:hover::after {
opacity: 1;
}
.nav-left,
.nav-center,
.nav-right {
display: flex;
flex: 1;
}
.nav-left {
justify-content: flex-start;
}
.nav-center {
justify-content: center;
}
.nav-right {
justify-content: flex-end;
}
<nav>
<div class="nav-left">
<a href="#">
hello
</a>
</div>
<div class="nav-center">
</div>
<div class="nav-right">
World
</div>
</nav>
So i am currently working on a website and i have a problem aligning the flexbox items(logo and title) in the header. They always align underneath each other and i need them side by side.
I read through the similar problems of others in stackoverflow and i also have googled for min. 2 hours.
I have to say learned many things about positioning and flexbox but i can't solve it.
There are many more things that i havent really cared about yet on the website but they don't matter for now, just overlook them :'D
But if you have some Tip's i still would be very thankful cause im new into creating websites :)
#import url('https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css');
#import url('https://fonts.googleapis.com/css?family=Sniglet');
#import url('https://fonts.googleapis.com/css?family=Dosis&display=swap');
#import url('https://fonts.googleapis.com/css?family=Dancing+Script');
/*all*/
html,
body {
margin: 0;
padding: 0;
width: 100vw;
height: 100vh;
max-width: 100%;
box-sizing: border-box;
}
* {
box-sizing: inherit;
font-family: 'Dosis', sans-serif;
/*, cursive |zum kursiv*/
}
/*For PC's*/
#media screen and (min-width: 950px) {
.wrapper {
display: grid;
grid-template-columns: 100%;
grid-template-rows: auto auto auto;
/*NOT sur about the auto*/
grid-template-areas: "header" "main" "footer";
background-color: #ffc5c9;
}
/*Nav Menu*/
.navigation_wrapper {
position: relative;
}
.navigation_button {
will-change: transform;
display: flex;
align-items: center;
justify-content: center;
flex-wrap: wrap;
position: fixed;
z-index: 1;
top: 40px;
left: 100px;
background: transparent;
cursor: pointer;
}
.navigation_button .fa {
border: 2px solid white;
border-radius: 3px;
padding: 10px;
color: white;
}
.navigation_menu ul li {
list-style: none;
font-weight: 250;
color: #79E2DD;
/*font-family: impact; könnte hier noch geändert werden*/
}
.navigation_menu {
content: '';
position: fixed;
top: 0;
right: 0;
width: 50%;
background: white;
height: 100%;
transform: skewX(0deg) translate(100%, 0);
transform-origin: top right;
transition: all .2s ease-in;
z-index: -1;
}
.navigation_menu ul {
transform: skewX(-8deg);
transform-origin: top left;
position: fixed;
left: 100px;
top: 100px;
width: 400px;
text-align: left;
}
.navigation_menu ul li {
position: relative;
z-index: 999;
font-size: 32px;
color: #F4E1A6;
line-height: 64px;
}
.navigation_menu ul li a {
border: none;
color: #FFC59;
text-decoration: none;
}
.navigation_menu.active {
transform: skewX(8deg) translate(0, 0);
}
.navigation_menu li {
opacity: 0;
transform: translate(0, 10px);
transition: all .0s ease-in .3s;
}
.navigation_menu.active li {
opacity: 1;
transform: translate(0, 0);
transition: all 0.2s ease-in 0s;
}
.navigation_menu.active li:nth-child(1) {
transition-delay: .3s;
}
.navigation_menu.active li:nth-child(2) {
transition-delay: .4s;
}
.navigation_menu.active li:nth-child(3) {
transition-delay: .5s;
}
.navigation_menu.active li:nth-child(4) {
transition-delay: .6s;
}
.navigation_menu.active li:nth-child(5) {
transition-delay: .7s;
}
.navigation_menu.active li:nth-child(6) {
transition-delay: .8s;
}
/*Scrollbar*/
/*Skeleton*/
.head_wrapper {
grid-area: header;
height: auto;
padding: 3rem 5rem 3rem;
background-image: url("../pictures/TP4.jpeg");
background-size: cover;
background-repeat: no-repeat;
border-radius: 0 0 50px 50px;
}
.main_wrapper {
grid-area: main;
margin: 2rem;
padding: 20px;
min-height: 100%;
background-color: #feeee6;
border-radius: 50px;
}
.foot_wrapper {
background-color: #f4e1a6;
grid-area: footer;
border-radius: 50px 50px 0 0;
}
/*for Sticky Footer*/
.foot_wrapper,
.push {
height: 15rem;
}
/*flex containers*/
.head_flex_container {
display: flex;
justify-content: space-between;
flex-direction: column;
flex-wrap: wrap;
}
/*flex items*/
.head_titel_container {
border: 5px solid blue;
max-height: 22rem;
min-width: 100%;
position: relative;
}
.flex_titel {
position: absolute;
right: 0;
width: 78%;
box-sizing: content-box;
border: 5px solid black;
}
.flex_logo {
width: 22%;
box-sizing: border-box;
border: 5px solid pink;
}
/*Titles*/
h1 {}
h2 {}
/*Texts*/
.index {}
/*classes*/
/*ID's*/
#logo {
height: auto;
min-width: 5rem;
max-width: 20rem;
border-radius: 100%;
box-sizing: border-box;
}
#pb1 {}
/*Decoration*/
hr {}
}
<div class="wrapper">
<div class="scroll_wrapper">
<div class="scrollbar" id="style-default">
<div class="force-overflow"></div>
</div>
<div class="navigation_wrapper">
<div class="navigation_button">
<i class="fa fa-bars"></i>
</div>
<div class="navigation_menu">
<ul>
<li>Home</li>
<li>Gallerie</li>
<li>
Kontakt</li>
<li>
<a class="active" href="hier link rein"></a>
</li>
<li>
<a class="active" href="hier link rein"></a>
</li>
</ul>
</div>
</div>
<header>
<div class="head_wrapper">
<div class="head_flex_container">
<div class="head_titel_container">
<div class="flex_logo"><img src="pictures/Logo.jpeg" alt="Logo" title="El Pastelazo" id="logo"></div>
<div class="flex_titel">
<h1>El Pastelazo</h1>
</div>
</div>
</div>
</div>
</header>
<main class="main">
<div class="main_wrapper">
<div class="home_picture"><img src="pictures/PI.jpg" alt="Picture" title="Loah" id="pb1"></div>
<div class="pagetitle">
<h2>Home</h2>
</div>
<p class="index">
<h3>Wilkommen!</h2>
<hr class="hr_01"> hier kann loah sich und ihre arbeit bzw was Sie auf dieser Website macht eintragen. Damit dieser Text hier möglichst lang ist werde ich einfach irgend ein Scheiss labern. Eigentlich will ich ihn auch nicht wirklich möglichst lang machen sondern
nur so lang, wie auch ungefähr eine Vorstellung bzw Beschreibung sein würde. Ich würde mal sagen, diese länge an Text sollte genügen.
</p>
<div class="push"></div>
</div>
</main>
<footer>
<div class="foot_wrapper">
<a class="foot_item" href="https://www.instagram.com/el_pastelazo_/?hl=de" title="#el_pastelazo_"><i class="fab fa-instagram"></i></a>
<a class="foot_item" href="https://github.com/" title="Probably Insta"><i class="fa fa-github"></i></a>
<a class="foot_item" href="https://www.pinterest.de/" title="Pinterest"><i class="fa fa-pinterest-p"></i></a>
<a class="foot_item" href="https://www.gmx.ch/" title="Mail"><i class="fa fa-envelope-o"></i></a>
</div>
</footer>
</div>
Adding display:flex style to an HTML element by default make its children appear side by side unless you explicitly add flex-direction: column;.
After Looking at your html carefully I see that you have added display:flex to head_flex_container which has only one child i.e head_titel_container.
You could add display:flex property to head_titel_container because it has two children that needs to appear side by side.
<div class="head_titel_container">
<div class="flex_logo"><img src="pictures/Logo.jpeg" alt="Logo" title="El Pastelazo" id="logo"></div>
<div class="flex_titel"><h1>El Pastelazo</h1></div>
</div>
.head_titel_container {
display: flex;
}
Adding display: flex style to .head_titel_container in your css file should make them appear side by side.
Let me know if you have any problems with this approach.
Did you want something like this?
/*flex items*/
.head_titel_container{
border: 5px solid blue;
max-height: 22rem;
width: 50%;
min-width: 50%;
position: relative;
display: inline-block;
}
.flex_titel{
position: absolute;
left:800px;
top:-10px;
width: 78%;
box-sizing: content-box;
border: 5px solid black;
display: inline-block;
}
By the way, there's this website called JSFiddle where you can post your code for a quick demo. Might be useful in the future.
Yo.
I have some question to you guys.
Here is my test code:
*{
border:1px solid #333;
width:100%;
max-width: 1240px;
margin: 0 auto;
}
.menu{
width:60%;
border:1px solid #444;
float:left;
text-align:center
}
.menu ul{
display:flex;
justify-content: center;
flex-flow: row;
float:left;
}
.topnav{
width:50px;
float:left;
}
.topnav:hover,.topnav:focus{
transition: 0.6s linear;
width: 100px;
float:left;
}
.something{
border:1px solid #000;
width: 50px;
float:right;
}
.topnav-something{
display: block;
width: auto;
float:right;
margin-right:20%;
}
<div class="content">
<div class= "menu">
<ul>
<li>ONE</li>
<li>Second</li>
<li>Third</li>
</ul>
</div>
<div>
<div class="topnav-something">
<div class="topnav">
<input type="text" placeholder="Search..">
</div>
<div class="something">
SOME TEXT
</div>
</div>
</div>
How can I receive move-menu effect like on this page?(search hover)
http://kindsgut.de/
And why when I clicked on this input he decreases?
Somebody know how to fix it?
I dont know what I doing wrong.
Have a nice day!
First, you set the transition only on the hovered event, that's why when you mouseout the animation has no transition. So you need to set the transition on the default state not on the hover state of the element.
Second, you should add the hover event on the outer div that contains both the some text and the input . So in your case on the .topnav-something
Also, add width:0 to your input (.topnav) as a initial value. So it can transition from 0 to 100px.
So in the end your code will look like this
( i removed the margin-right:20% from topnav-something so it will fit the small screen of the snippet )
* {
border: 1px solid #333;
width: 100%;
max-width: 1240px;
margin: 0 auto;
}
.menu {
width: 60%;
border: 1px solid #444;
float: left;
text-align: center
}
.menu ul {
display: flex;
justify-content: center;
flex-flow: row;
float: left;
}
.something {
border: 1px solid #000;
width: 50px;
float: right;
}
.topnav-something {
display: block;
width: auto;
float: right;
margin-right: 0%;
}
.topnav {
width: 0px; /*added*/
float: left;
transition: 0.6s linear; /*added*/
}
/*added*/
.topnav-something:hover .topnav {
width: 100px;
}
<div class="content">
<div class="menu">
<ul>
<li>ONE</li>
<li>Second</li>
<li>Third</li>
</ul>
</div>
<div>
<div class="topnav-something">
<div class="topnav">
<input type="text" placeholder="Search..">
</div>
<div class="something">
SOME TEXT
</div>
</div>
</div>
You'd need to set your input to a width of 0 , then depending what you want to trigger it (text, or the container) you define the width on hover.
You can also apply a transition to the container, and to the input for the slide effect.
<div class="content">
<div class="menu">
<ul>
<li>ONE</li>
<li>Second</li>
<li>Third</li>
</ul>
</div>
<div>
<div class="topnav-something">
<div class="topnav">
<input class="search-field" type="text" placeholder="Search..">
</div>
<div class="something">
SOME TEXT
</div>
</div>
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
.menu {
width: 60%;
float: left;
text-align: right;
outline: 1px solid red;
}
.menu ul {
display: flex;
justify-content: right;
flex-flow: row nowrap;
/* float: left; */
}
.menu li {
display: inline;
padding: 10px;
}
.topnav-something {
/* display: block; */
padding: 10px;
width: 40%;
float: right;
/* margin-right: 20%; */
transition: width 0.5s;
outline: 1px solid blue;
}
.search-field {
width: 0;
transition: all 0.5s;
}
.topnav-something:hover input,
.topnav-something:focus input {
width: 140px;
}
.topnav {
display: inline-block;
}
/* .topnav {
width: 50px;
float: left;
} */
/* .topnav:hover,
.topnav:focus {
transition: 0.6s linear;
width: 100px;
float: left;
} */
.something {
display: inline-block;
/* border: 1px solid #000; */
/* width: 50px; */
/* float: right; */
}
I've created a demo for you here: https://codepen.io/blueocto/pen/zWoNZj
#Mihal If my answer did help solve your issue, I'd really appreciate the upvote, thank you.
When I'm hovering content inside div I'm getting offsets toward right side, I know that's because I'm adding left border, but how can I avoid this?
ul li:hover {
border-left: 4px solid #FF2F5A;
}
https://jsfiddle.net/eeeek/j8xaru7m/
While one can set a transparent border for the non-hovered state, that might sometimes given unwanted alignment.
Here is a solution using a pseudo element that overcomes that. The position: relative; on the ul li is necessary for the absolute positioned pseudo to position itself properly.
ul li {
position: relative; /* added property */
margin-left: -26px;
list-style-type: none;
width: 491px;
height: 50px;
border-bottom: 1px solid #F2F2F2;
}
ul li > span {
line-height: 40px;
margin-left: 30px;
}
ul li:hover::before { /* updated rule */
content: '';
position: absolute;
top: 0; left: 0; bottom: 0;
width: 4px; background: #FF2F5A;
}
.items {
position: absolute;
margin-left: -17.7px;
}
.block-with-items-style {
margin-left: 50px;
height: 400px;
width: 300px;
border: 2px solid #f2f2f2;
box-shadow: 2px 2px 10px #adadad;
resize: vertical;
overflow: hidden;
}
<div class="block-with-items-style">
<div class="items">
<ul>
<li ng-repeat="record in records">
<span>1</span>
<span class="badge badge-style">2</span>
<button class="delete" ng-click="Delete($index)">3</button>
</li>
</ul>
</div>
</div>
Bonus: This way one can easily add an animation as well
ul li {
position: relative; /* added property */
margin-left: -26px;
list-style-type: none;
width: 491px;
height: 50px;
border-bottom: 1px solid #F2F2F2;
}
ul li > span {
line-height: 40px;
margin-left: 30px;
}
ul li::before { /* added rule */
content: '';
position: absolute;
top: 50%; left: 0; bottom: 50%;
width: 4px; background: #FF2F5A;
transition: top .5s, bottom .5s;
}
ul li:hover::before { /* updated rule */
top: 0; bottom: 0;
}
.items {
position: absolute;
margin-left: -17.7px;
}
.block-with-items-style {
margin-left: 50px;
height: 400px;
width: 300px;
border: 2px solid #f2f2f2;
box-shadow: 2px 2px 10px #adadad;
resize: vertical;
overflow: hidden;
}
<div class="block-with-items-style">
<div class="items">
<ul>
<li ng-repeat="record in records">
<span>1</span>
<span class="badge badge-style">2</span>
<button class="delete" ng-click="Delete($index)">3</button>
</li>
</ul>
</div>
</div>
Just create invisible (100% alpha) border with previous css directive. As long hover is active – it will overwrite that transparent border with red. Here's the code:
ul li {
margin-left: -26px;
list-style-type: none;
width: 491px;
height: 50px;
border-bottom: 1px solid #F2F2F2;
}
ul li > span {
line-height: 40px;
margin-left: 30px;
}
/* Sylogista's upgrade begin */
ul li:not(:hover)
{
border-left: 4px solid rgba(255,255,255,0);
}
/* Sylogista's upgrade end */
ul li:hover {
border-left: 4px solid #FF2F5A;
}
.items {
position: absolute;
margin-left: -17.7px;
}
.block-with-items-style {
margin-left: 50px;
height: 400px;
width: 300px;
border: 2px solid #f2f2f2;
box-shadow: 2px 2px 10px #adadad;
resize: vertical;
overflow: hidden;
}
<div class="block-with-items-style">
<div class="items">
<ul>
<li ng-repeat="record in records">
<span>1</span>
<span class="badge badge-style">2</span>
<button class="delete" ng-click="Delete($index)">3</button>
</li>
</ul>
</div>
</div>
:not(:hover) is optional. Code will work good without it, but in my opinion – using that can be good practice. When? That's not place for debate, but let me give one short example in the margin of that answer: when you're creating huge css using many of states in that way and relations between elements – it just looks clearer.
In that case it's clearer maybe without it, but I'll not change that. Even just because of that not so many people use :not or even remember about that.
I'm playing around with a pure CSS accordion http://reversl.net/accordion/ I can get the basic functionality to work (headings 2 & 3 both toggle) But I can't get heading 1 to toggle if I add the same UL to it. Because Heading 1 is styled differently the problem (I think) lies within naming/targeting it's + div ?
Please note: I removed the UL from Heading 1 for the sake of the demo because it was preventing Headings 2 & 3 from toggling.
You made several mistakes. Too many to count:
Here is a working example: Try and see, what I changed
http://jsfiddle.net/HerrSerker/ASqE9/
HTML
<div id="wrap">
<div class="accordion">
<div id="two" class="section">
<h4>
Heading 2
</h4>
<div class="sub_section">
<ul class="list">
<li>Sample Text 1</li>
<li class="last">Sample Text 2</li>
</ul>
</div>
</div><!--#two-->
<div id="four" class="section progress">
<h4>
Heading 4 (With Progress Bar)
</h4>
<div class="metrics">
<div class="meter">
<span style="width: 75%"></span>
</div><!--.meter-->
</div><!--.metrics-->
<div class="sub_section">
<ul class="list">
<li>Sample Text 1</li>
<li class="last">Sample Text 2</li>
</ul>
</div><!--.sub_section-->
</div><!--#one-->
</div><!--accordian-->
</div>
CSS
#wrap {
width: 320px;
background: #f0f0f0;
margin: auto;
}
.accordion {
clear: both;
padding: 0;
margin: 0 auto;
}
.accordion h4 {
margin: 0;
}
.accordion h4 a {
padding: 1em;
color: #999;
display: block;
font-weight: normal;
text-decoration: none;
}
.accordion h4 a:hover {
text-decoration: none;
background: #111;
}
.accordion .section {
background: #222;
border-bottom: 1px solid #000;
}
.accordion .sub_section {
border-bottom: none;
background: #f0f0f0;
}
.list {
padding: 0;
margin: 0;
}
.list li {
background: url('http://www.placehold.it/40x40') no-repeat;
color: #999;
list-style: none;
padding: .7em .7em .7em 4em;
border-bottom: 1px solid #fff;
}
.list .last {
border-bottom: none;
}
.accordion .sub_section {
height: 0;
overflow: hidden;
-webkit-transition: height 0.3s ease-in;
-moz-transition: height 0.3s ease-in;
-o-transition: height 0.3s ease-in;
-ms-transition: height 0.3s ease-in;
transition: height 0.3s ease-in;
}
.accordion :target h4 a {
text-decoration: none;
font-weight: bold;
}
.accordion :target .sub_section {
height: 80px;
}
.accordion .section.large:target h4 + div {
overflow: auto;
}
.accordion p {
color: #646464;
}
.accordion .progress .meter {
width: 90%;
height: 2px;
position: relative;
background: #555;
margin: -.9em auto .5em auto;
padding: 1px;
}
.meter > span {
height: 2px;
display: block;
background-color: #f0f0f0;
position: relative;
overflow: hidden;
}
This is because the class "progress" assigned to the div id="one" that keeps constant the size of the div with the content.