manojnaanak Posted December 3, 2012 Share Posted December 3, 2012 hello everyone, i am struck in text align. I used display:table,display:table-row, display:table-cell and result is before you. In image red mark text, i want it right align (text field vertically ) but due to table-cell valve it is not happening. i am attaching image and code to understand it propery. <!DOCTYPE HTML><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>Untitled Document</title><style>.tabForm{ display:table; font-family:Arial, Helvetica, sans-serif; color:#000; font-size:12px; float:left; margin-right:15px; }.row{ display:table-row; }.cel{ display:table-cell;padding:5px; text-align: right;}.wid{ width:auto !important}.clr{ clear: both}.hdtab{ font-weight:bold}.tabForm a{ color:#F30}body{ margin:auto}</style></head><body><div><div class="tabForm"><div class="row"><div class="cel hdtab">Eksisterende Kunde?</div></div> <div class="row"><div class="cel hdtab">Er du allerede registret som kunde kan du soke opp dine kundedetailjer.</div></div> <div class="row"><div class="cel">Lorem Ipsum Lorem Ipsum</div></div> <div class="row"><div class="cel">E-Post</div><div class="cel"><input type="text" value="" id="" ></div></div> <div class="row"><div class="cel">Passport</div><div class="cel wid"><input type="text" value="" id="" ></div></div> <div class="row"><div class="cel"></div><div class="cel wid"><a href="#">Login</a></div></div> <div class="row"><div class="cel hdtab wid">Onsker du a motta information pa:</div></div> <div class="row"><div class="cel"></div><div class="cel"><input type="checkbox" value="" id="" >SMS<input type="checkbox" value="" id="" >E-post</div></div> <div class="row"><div class="cel"></div><div class="cel"><a href="#">Tibake</a> <a href="#">Tibake</a></div></div> </div> <div class="tabForm"><div class="row"> <div class="cel hdtab">Ny Kunde</div></div> <div class="row"><div class="cel">Navn</div><div class="cel"><input type="text" value="" id="" ></div></div> <div class="row"> <div class="cel">Eternavn</div><div class="cel"><input type="text" value="" id="" ></div></div> <div class="row"><div class="cel">E-Post</div><div class="cel"><input type="text" value="" id="" ></div></div> <div class="row"><div class="cel">E-Post</div><div class="cel"><input type="text" value="" id="" ></div></div> <div class="row"><div class="cel">Passord</div><div class="cel"><input type="text" value="" id="" ></div></div> <div class="row"><div class="cel">Gejenta Passord</div><div class="cel"><input type="text" value="" id="" ></div></div> <div class="row"><div class="cel">Adresse</div><div class="cel"><input type="text" value="" id="" ></div></div> <div class="row"><div class="cel">Postnr</div><div class="cel"><input type="text" value="" id="" ></div><div class="cel">Sted</div><div class="cel"><input type="text" value="" id="" ></div></div> <div class="row"><div class="cel">Mobil</div><div class="cel"><input type="text" value="" id="" ></div></div> <div class="row"><div class="cel">Jeg Aksepterer</div><div class="cel"><input type="checkbox" value="" id="" ></div></div> <div class="row"><div class="cel"></div><div class="cel"><a href="#">Neste</a> <a href="#">Neste</a></div></div> </div> </div></body></html> Link to comment Share on other sites More sharing options...
sayed2x2 Posted December 4, 2012 Share Posted December 4, 2012 I question is not very clear however if are having problem with aligning the tex and the input field , I would suggest you to make different classes or Ids like.container1{widht:200px;margin:0px 0px auto;height:400px;} create a table using <tr> and <td> tags under every class because this way you will be able to align them the way you want. If you make your question a little more clear , I can create the exact table for you, get in touch on facebook.com/sayed.taqui if want. Link to comment Share on other sites More sharing options...
manojnaanak Posted December 5, 2012 Author Share Posted December 5, 2012 I question is not very clear however if are having problem with aligning the tex and the input field , I would suggest you to make different classes or Ids like.container1{widht:200px;margin:0px 0px auto;height:400px;} create a table using <tr> and <td> tags under every class because this way you will be able to align them the way you want. If you make your question a little more clear , I can create the exact table for you, get in touch on facebook.com/sayed.taqui if want. thnx for giving response i have fixd it..... Link to comment Share on other sites More sharing options...
sam9713 Posted December 5, 2012 Share Posted December 5, 2012 Try puting 'tr style=""' etc inside the actual table (Y) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now