Search code examples
htmlcsstwitter-bootstrapmarkup

Troubles with div vertical align (Twitter Bootstrap 3)


I've read many same topics but their solution haven't helped me. I've the header where first comes the logo and two buttons at right position. The problem is that those buttons are placed at top. I need to place them along horizontal line.

Giving them top-margin rules with % solves the problem but then comes another. With top-margin rules resizing browser's window gives really big spaces between logo and buttons.

So I'm searching for true bootstrap's solution :) Maybe my header's mark-up isn't correct?

<div id="header" class="row">
<div class="col-md-6 col-md-push-1">
    <div class="moduletable">               
        <div class="custom">
            <p><img class="img-responsive" src="/images/logo_ru/logo.png" alt="Школа Успешного Общения" /></p>
        </div>
    </div>
</div>

<div class="col-md-6 btn-group col-md-push-1">
    <div class="col-md-3 col-md-push-1">        
        <div class="moduletable_consultation">
            <div class="custom_consultation"  >
                <p><em>Бесплатная консультация</em></p>
                <div class="row">
                    <div class="btn-group">
                        <div class="col-md-12">
                            <a class="btn btn-warning btn-lg" href="/component/chronoforms5/?chronoform=Anketa-v5">ЗАПИСАТЬСЯ</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="col-md-3 col-md-push-1">
        <div class="moduletable">                   
            <div class="custom"  >
                <div class="social_buttons_box">
                    <div class="btn-group">
                        <a class="btn btn-warning btn-lg" href="#">О Нас</a>
                    </div>

                    <div class="social_b_header">
                        <div class="row">
                            <div class="col-md-12">
                                <div class="yashare-auto-init" data-yashareL10n="ru" data-yashareType="none"data-yashareQuickServices="vkontakte,facebook,twitter,odnoklassniki"></div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

Waiting for help!

Here is live demo: http://www.kuzma.tk

Here is JsFiddle: http://jsfiddle.net/DTcHh/154/

Edit: I'm using placeholders(Joomla CMS) in markup. Just for convenience:

<div id="header" class="row">
<div class="col-md-6 col-md-push-1">
    <jdoc:include type="modules" name="header-2" style="xhtml" />
</div>

<div class="col-md-6 btn-group col-md-push-1">
    <div class="col-md-3 col-md-push-1"><jdoc:include type="modules" name="header-4" style="xhtml" /></div>
    <div class="col-md-3 col-md-push-1"><jdoc:include type="modules" name="header-3" style="xhtml" /></div>
</div>

Edit2: the live version's header has been rewritten, but still no luck


Solution

  • After so long time finally I've found the solution. Only it lacks the two features: doesn't align pictures, don't give the possibility to achieve more subtle vertical height's align. http://www.minimit.com/articles/solutions-tutorials/bootstrap-3-responsive-columns-of-same-height