SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Zealot
    Join Date
    Oct 2007
    Location
    Toronto
    Posts
    172
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Changing Textbox Color in HTML(Without using CSS

    Heres my website. I'm wondering if i can change the textbox colors to black with the message box to characoal grey. I'm wondering if this is possible without using css.

    http://www.nyxxunderground.com/SEPTA...l/index-6.html
    ]

  2. #2
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,481
    Mentioned
    182 Post(s)
    Tagged
    6 Thread(s)
    I'm wondering if this is possible without using css.
    I'm wondering if I can answer this question with both my hand tied behind my back.

    But then why would I want to do that?

    You're going to have to explain a whole lot better than that before you get an answer to this.

    Why can't you use CSS?

    What are you going to use instead? Font tags ?

    I'm a little confused so you need to give reasons and tell us what you are trying to do exactly

  3. #3
    SitePoint Zealot
    Join Date
    Oct 2007
    Location
    Toronto
    Posts
    172
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes Font tags and what the white boxes to look like this

    http://www.nyxxunderground.com/SEPTA...l/index-6.html
    ]

  4. #4
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,481
    Mentioned
    182 Post(s)
    Tagged
    6 Thread(s)
    Yes Font tags
    Sorry but I can't offer any solutions using font tags. I feel dirty just thinking about it.

    You didn't answer my question as to why you want use font tags and not CSS. Once I understand the reason why I might be a little more forthcoming

  5. #5
    SitePoint Zealot
    Join Date
    Oct 2007
    Location
    Toronto
    Posts
    172
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I was wondering if I can embed the css within the actual html and form document without creating a separate css file. As it stands now I have a css file that applies to the entire page.

    So I thought by using tags I would be able to change the textbox color easily. Now if its possible to add CSS within the html file without creating a separate CSS file . Then I'm perfectly fine.
    ]

  6. #6
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,481
    Mentioned
    182 Post(s)
    Tagged
    6 Thread(s)
    You can add a style attribute directly to the inputs concerned.
    Code:
    <span class="style2">Name:</span><br>
    <input style="color:red" name="Name" type="text" size="55"></font>
    But I see no advantage in that as you could simple add a class to the element anyway and control it externally.

    Code:
    <span class="style2">Name:</span><br>
    <input class="highlight" name="Name" type="text" size="55"></font>
    Code:
    form input.highlight{color:red}
    BTW you shouldn't be using spans for you input labels as there is an html element specifically for that job and it is the label element:
    <label for="inputID">Input Label</label>


    Hope that's nearer the answer you were looking for


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
  •