SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Addict
    Join Date
    May 2008
    Posts
    231
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    how can i make my cursor start from beginning in textarea?

    The cursor in my textarea is not starting at the beginning when clicked to enter text.how can i make my cursor start at the beginning.

    here is my html code;
    HTML Code:
    <p><label>Product Description</label>
    <textarea name="product_desc"  cols="19" rows="4"  class="text" />
    </textarea></p>
    my css:

    Code CSS:
    textarea {
    	border: 1px solid #ddd;
    	background: #fff url(../img/input-shaddow.gif) no-repeat left top;
    	font: 11px Arial, Helvetica, sans-serif;
    	color: #000;
    	padding: 5px;
    	width: 262px;
    	float: left;
    	margin: 0 10px 0 0;
    	height: 50px;
    	overflow: hidden;
    }

  2. #2
    SitePoint Member
    Join Date
    Nov 2008
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    normally if you have left white space between the textarea tags it is transffered to the area in the view. Delete any space and you will achive what you want.

  3. #3
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There's no way to do that with HTML or XHTML, which are markup languages, not programming languages.

    BTW, your markup is incorrect (or invalid, if XHTML). You have <textarea.../></textarea>. Lose the '/' from the start tag.
    Birnam wood is come to Dunsinane

  4. #4
    SitePoint Member
    Join Date
    Nov 2008
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by AutisticCuckoo View Post
    There's no way to do that with HTML or XHTML, which are markup languages, not programming languages.

    BTW, your markup is incorrect (or invalid, if XHTML). You have <textarea.../></textarea>. Lose the '/' from the start tag.
    Correct for the markup I did not notice,
    incorrect for the other. If you have no white spaces it will default to the beginning of the area

  5. #5
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, but that's not (X)HTML, that's content.
    Birnam wood is come to Dunsinane

  6. #6
    SitePoint Addict
    Join Date
    May 2008
    Posts
    231
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for helping.the whitespace between the textarea tags caused that.
    gosh can't believe i don't know this even though i have been coding for the last 3 years

    cheers


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •