matx Posted December 30, 2005 Report Share Posted December 30, 2005 kods: <div style="width:200px; height:200px; border-color:#CC3333; border-width:medium; border-style:dashed;"> <a style="vertical-align:middle;" href="kkas">aaaa</a> </div> sāpe: tas viss neiecentrējas (vertikāli), bet gribētos! Varbūt kāds var izpalīdzēt un parādīt kādam vajadzētu izskatīties kodam! Ir variants, taču diezgan greizs (vismaz pašam tā liekas): <div style="width:200px; height:200px; border-color:#CC3333; border-width:medium; border-style:dashed;"> <a href="kkas"><p style="margin-top:100px;">aaaa</p></a> </div> Respektīvi paragrāfa aukšējo malu izmērīt tā lai būtu centrā! Link to comment Share on other sites More sharing options...
wes Posted January 1, 2006 Report Share Posted January 1, 2006 Pamēģini tā: <div style="width:200px; height:200px; border-color:#CC3333; border-width:medium; border-style:dashed;"><p style="line-height:200px; margin:0px;"><a href="kkas">aaaa</a></p> </div> Vai arī vēl labāks variants būtu: <div style="width:200px; height:200px; border-color:#CC3333; border-width:medium; border-style:dashed; position:relative"><div style="position:relative; top:40%;"><a style="vertical-align:middle;" href="kkas">aaaa</a></div> </div> -- wes Link to comment Share on other sites More sharing options...
hmnc Posted January 1, 2006 Report Share Posted January 1, 2006 http://milov.nl/code/css/verticalcenter.html Link to comment Share on other sites More sharing options...
rpr Posted January 2, 2006 Report Share Posted January 2, 2006 palasi manuaali, vertical-align darbojas tikai uz inline elementiem. Link to comment Share on other sites More sharing options...
Recommended Posts