html - Vertically center multi-lined text in div with a tag -


i working on menu system consists of div's (width: 275px, height: 75px, border: 1px solid) among each other. want whole div clickable, tag , display:block property (see code below). of menu entries multi-lined text, can't align them vertically. basic code is:

.div {        width: 275px;     height: 75px;     border: 1px solid #000;      text-align: center;     float: right; }  <div class="div">     <a style="display: block; width: 100%; height: 100%" href="#">link..</a> </div> 

i have tried following:

  1. line-height: 75px: doesn't work multi-lined text
  2. display: table , vertical-align: middle not work 100% width , height of -tag.

i have tried lot other code wrapper div's, tables, ... no success. otherwise, not want make use of javascript (onclick="location.href").

thanks!

you can you've tried: 'display:table-cell; vertical-align: middle;', have set height 75px instead of 100%.


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -