Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6

Thread: text area color

  1. #1
    New Coder
    Join Date
    Dec 2009
    Posts
    13
    Thanks
    11
    Thanked 0 Times in 0 Posts

    text area color

    What is the code for inserting color or background image into my text area?
    This is not a "form". It is the actual large text area that I'm adding. Or can text be added without inserting a "textarea"? I've got this nice background image on my page with a large white area for text that needs the same background as the rest.

    Thanks,
    coldwetnoz

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,667
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Quote Originally Posted by coldwetnoz View Post
    What is the code for inserting color or background image into my text area?
    This is not a "form". It is the actual large text area that I'm adding. Or can text be added without inserting a "textarea"? I've got this nice background image on my page with a large white area for text that needs the same background as the rest.

    Thanks,
    coldwetnoz
    Adding this to your CSS will give a background color to your textarea -
    Code:
    textarea {
    	background: #0f0;
    }
    But if your adding text as content of your site, textarea is not how to do it. It may be best to wrap your text in p tags and put it in a containing div that could be positioned over the white space of your background image.
    It could also be that you don't even need the containing div. I suppose it depends on how much text you have and how it's formatted.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • Users who have thanked Excavator for this post:

    coldwetnoz (01-09-2010)

  • #3
    New Coder
    Join Date
    Oct 2009
    Posts
    23
    Thanks
    0
    Thanked 1 Time in 1 Post
    Hello,

    Please visit the following sites for future references:

    http://www.htmlcodetutorial.com/docu...ACKGROUND.html
    http://www.web-source.net/html_codes_chart.htm

    Hope these help!!!
    CoffeeCup.com

  • Users who have thanked CoffeeCup.com for this post:

    coldwetnoz (01-09-2010)

  • #4
    New Coder
    Join Date
    Dec 2009
    Posts
    13
    Thanks
    11
    Thanked 0 Times in 0 Posts
    I resolved this problem by going with the p tags and it looks fine but now I can't figure out how to make my text area smaller. I've been trying different codes for "margin" but none of them work.

    IOW the text I inserted takes up too much of the page width and I don't know how to change that.

    Thanks, CoffeeCup.com and Excavator

  • #5
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,667
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Goodmorning coldwetnoz,
    We're going to have to see your code to help much more. Since you are trying to place things over an image, a link would be best.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • Users who have thanked Excavator for this post:

    coldwetnoz (01-09-2010)

  • #6
    New Coder
    Join Date
    Dec 2009
    Posts
    13
    Thanks
    11
    Thanked 0 Times in 0 Posts
    This is getting too deep for me!

    I'm leaving the text like it is with no margin to speak of, unless my HTML Editor can help me.

    Thanks for all the help.


  •  

    Posting Permissions

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