PDA

View Full Version : text starting point in text field



zodehala
Mar 26th, 2010, 05:31 PM
when i cliked textbox to write. it starta from margin 0 . but i want it to starts for example after 1 or 2 or 3 px;

http://divran.com/script/upload/images/px.gif

Excavator
Mar 26th, 2010, 05:51 PM
Very hard to guess what's wrong zodehala, can we see some code?

Kor
Mar 26th, 2010, 05:55 PM
Use CSS text-indent attribute
HTML


<input class="txt_ind" type="text">

CSS


input.txt_ind{
text-indent:4px;
}

Kor
Mar 26th, 2010, 05:56 PM
Very hard to guess what's wrong zodehala, can we see some code?
No. It looks like zodehala wants to have a certain text indent within a text field.

abduraooft
Mar 26th, 2010, 05:56 PM
<input type="text" class="text" ...>

input.text{
padding-left:3px;
}?

Excavator
Mar 26th, 2010, 06:43 PM
No. It looks like zodehala wants to have a certain text indent within a text field.

Dur! :mad:
That first arrow made it look like the text was starting at the top of the page!

zodehala
Mar 27th, 2010, 12:28 AM
Use CSS text-indent attribute
HTML


<input class="txt_ind" type="text">

CSS


input.txt_ind{
text-indent:4px;
}



very very thanx. it is mine