인터넷을 통해 내 문제를 검색했으며 항상 동일한 해결책을 찾았지만 문제가되지 않았습니다. 내 코드의 내용이 '수직 중심 div의 동적 콘텐츠수직 동적 콘텐츠
나는이 웹 페이지를 http://staging.karlienfabre.be/pocoloco/reizen/canyoning.html
을했습니다 그리고 문제는 최초의 노란색 부분이다. 왼쪽 텍스트가 세로로 가운데에 표시되도록하겠습니다. 텍스트의 길이는 다를 수 있습니다. 오른쪽의 흰색 상자도 세로로 가운데에 있어야합니다.
이 순간에 HTML은 CSS를 내가 생각이
<div class="container yellow-content">
<div class="row center-vertical">
<div class="col-md-7 vertical-center-element">
<h2>Actie en avontuur</h2>
<p>
540 smith grind grind hang up launch ramp. Sponsored gnarly no comply regular footed hang-up. Quarter pipe tic-tac aerial hang ten airwalk. Deck baseplate crail grab bluntslide regular footed. Varial carve darkslide ollie hole Vans Calfornia Daze rocket air. Pivot kick-nose ollie sketchy death box Steve Rocco.
</p>
</div>
<div class="col-md-3 col-md-offset-1 bgwhite vertical-center-element">
<div class="row text-center">
<div class="col-md-6 col-md-offset-3">
<div class="text-center testimonial">
<a href=""> <img class="img-circle img-responsive" src="../img/reisaanbod/testimonials/testi_canyoning.jpg" alt=""> </a>
</div>
</div>
</div>
<div class="row text-center">
<div class="row-md-9">
<p>Tic-tac nollie bearings Ron Allen disaster. Downhill blunt no comply Kevin Jarvis slob air. Deck Brooklyn Banks indy grab slap maxwell pop shove-it.</p>
</div>
</div>
</div>
</div>
</div>
처럼 찾고은
.row.center-vertical{
display: table;
}
.vertical-center-element{
display: table-cell;
vertical-align: middle;
}
내가 잘못하고 또는 무엇을하고있어 찾을 수없는이 중심 것을 만드는 것이 중요하다 작동 안됨. 사전에
감사합니다!
Ok. 콘텐츠가 이제 세로로 정렬되었지만 div가 플로팅되어야한다고 말한 것처럼 왼쪽으로 ... 어떤 아이디어로 두 가지를 모두 달성 할 수 있습니까? – user3346696
아마도 도움이 될 것입니다 : http://stackoverflow.com/questions/12557897/how-to-vertically-middle-align-floating-elements-of-unknown-heights. 그렇지 않다면 jquery 등을 사용하여 위쪽 여백을 조정할 수 있습니까? –
@ user3346696 내 편집을 참조하십시오. –