This is a migrated thread and some comments may be shown as answers.

Add a corporate logo to navbar

2 Answers 352 Views
NavBar
This is a migrated thread and some comments may be shown as answers.
Jim
Top achievements
Rank 1
Jim asked on 13 May 2013, 07:54 PM
Hi - I have a requirement to show our corporate logo from every view, and their preference is to show it in the left-side area of the navbar.  I have it showing up, but it is not vertically centered, and I have tried a number of things. I've tried vertical-align:middle, and margins:auto, but neither have worked so far:

<header data-role="header">
    <div data-role="navbar">
        <img id="corp-logo" src="images/app/corp-logo.png" 
           data-align="left" style="width:120px;height:30px;vertical-align:middle;"/>
        <span data-role="view-title"></span>
    </div>
</header>

and...

<header data-role="header">
    <div data-role="navbar">
        <img id="corp-logo" src="images/app/corp-logo.png"
           data-align="left" style="width:120px;height:30px;margin: auto .3em auto .3em;"/>
        <span data-role="view-title"></span>
    </div>
</header>

What would be preferred approach approach for vertically aligning a logo image within the navbar area?
Thanks, Jim Wangler

2 Answers, 1 is accepted

Sort by
0
Iliana Dyankova
Telerik team
answered on 14 May 2013, 03:38 PM
Hello Jim,

In order to achieve the desired outcome you could set top margin to the image. For example: 
<img id="corp-logo" src="//...." data-align="left" style="width: 120px; height: 30px; margin-top: .4em"/>

Let me know if this fits your requirements.

Kind regards,

Iliana Nikolova
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Jim
Top achievements
Rank 1
answered on 16 May 2013, 10:21 PM
Yes, that does it - thanks.
Tags
NavBar
Asked by
Jim
Top achievements
Rank 1
Answers by
Iliana Dyankova
Telerik team
Jim
Top achievements
Rank 1
Share this question
or