javascript - Making a button fixed on a changing DIV -


is there way allign button center of div.i able make work different strategies using padding-top:2px , padding-bottom:2px or using margin-top , margin-bottom.but here comes problem,basically moving div i.e might differ if user have more inforamtion in it.for example user enters work number in input text field showing only work phone number.but if user enters work,home , additional number,it need show information entered,which vary size of div.what happens div increase in size , button still stays @ top of div.is there way make button fixed @ center after div varies in size.can achieved in css or need used javascript make work.

vertical align tricky.

however demo of moving centered button css , moved jquery.

as moves, button remains @ center position has not been defined.

#outer {     text-align: center;     width: 200px;       background: #ddd;     height: 200px;     position: static;     display: table; } #inner {     line-height: 200px;     display: table-cell;     vetical-align: middle;    } 

Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -