The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Textarea styling question

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #32195

    Hello everybody, I’m new here :) My name is Ivan and I’m front end developer from Bulgaria, Europe.

    I have a question about textarea styling.

    I’m using a background image and I need some padding for the first two lines of the area, and no padding for the rest. How can I achieve this?

    Thanks in advance, and excuse me and my English :)


    you’d need to assign a class to the text area. it’d look something like this (remove all asterisks):

    in the head tag —
    <*style type="text/css"*>
    .namehere {
    padding-top: 30px;

    and then in the body wherever you wanted the textarea —
    <*textarea class="namehere"*>
    your text here

    you’d adjust the 30px value accordingly based on how much space you want to allow. i’ve never tried assigning padding to a textarea so i don’t know if that would work, but that’s what i’d try first. i hope this is helpful. good luck!


    Thanks, but I dont’ need this :)

    I was looking for something like this

    Padding-left on the first two rows

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.