+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 10 of 12

Thread: text box colour

  1. #1
    Super Moderator Lewis is just really nice Lewis's Avatar
    Join Date
    Apr 2005
    Location
    Leics, United Kingdom
    Posts
    944

    Default text box colour

    hey,

    i want one of my text boxes to change colour when i click inside it, and when i click away from it, it changes back to a default colour.
    it would be great if you could help!

    also, i would like a code for when i hover over a link, it enlargens/changes colour, but i dont know how to do these things.

    please help

    Lewis

  2. #2
    Moderator Wistow has a reputation beyond repute Wistow has a reputation beyond repute Wistow has a reputation beyond repute Wistow has a reputation beyond repute Wistow has a reputation beyond repute Wistow has a reputation beyond repute
    Join Date
    Mar 2005
    Location
    Barnsley, UK
    Posts
    905

    Default

    CSS is the way to go, try www.w3schools.com/css/default.asp

    Craig

  3. #3
    Senior Member rustypaulin has a spectacular aura about
    Join Date
    Apr 2005
    Posts
    321

    Default

    for the hovering over a link just insert this code into the header of your site

    Code:
    <style type="text/css">
    <!--
    a:hover {
    	text-decoration: none;
    	color: #666666;
    	font-weight: bold;
    	font-size: 14px
    }
    -->
    
    You can edit those values to make it fit your site better

  4. #4
    Super Moderator Lewis is just really nice Lewis's Avatar
    Join Date
    Apr 2005
    Location
    Leics, United Kingdom
    Posts
    944

    Default

    Quote Originally Posted by Wistow
    CSS is the way to go, try www.w3schools.com/css/default.asp

    Craig
    i'm afraid, on that website, i dont see anything that will help me with the text box query.

  5. #5
    Super Moderator monaghan is a jewel in the rough
    Join Date
    Mar 2005
    Location
    Herts, UK
    Posts
    964

    Default

    I won't give you the code as figuring it out will do you good

    What you need to do is to use a bit of JavaScript attached to the onClick event for the textbox, you then simply modify the style of the text box.

  6. #6
    Super Moderator Lewis is just really nice Lewis's Avatar
    Join Date
    Apr 2005
    Location
    Leics, United Kingdom
    Posts
    944

    Default

    sorry, i'm only an amature web designer, i dont understand what you meant then!
    but thanks anyway

  7. #7
    Super Moderator monaghan is a jewel in the rough
    Join Date
    Mar 2005
    Location
    Herts, UK
    Posts
    964

    Default

    Well, time to learn then , what you need to research is DHTML, get yourself a copy of Sitepoint's "Modern Web Design uisng JavaScript & DOM" or Google for DHTML tutorial.

    Seriously though you need to spend the time and understand fully what is happening within the browser as it will help you build better web sites. Any fool can load Dreamweaver or Photoshop and craft something that looks nice, what sets you apart is the ability to make the system do what you want.

    Basically the whole web page is a large collection of objects, when you load the page it creates each of these objects (<P> <div> and so on), it then applies 1 or more style sheets to modify these objects (you can often see a page load then re-format itself as it applies the style sheet if the connection is slow).

    All you need to do is select the object you want, hook in to it's event trigger (in this case when someone selects (focus event) it and then deselects it (blur event)) and then modify it's style attributes.

  8. #8
    Super Moderator Lewis is just really nice Lewis's Avatar
    Join Date
    Apr 2005
    Location
    Leics, United Kingdom
    Posts
    944

    Default

    thanks monaghan and rustypaulin, these have really helped.

    monaghan: i will look into that book


    many thanks

  9. #9
    Super Moderator monaghan is a jewel in the rough
    Join Date
    Mar 2005
    Location
    Herts, UK
    Posts
    964

    Default

    You can usually get sample chapters as a PDF download from Sitepoint, so you can actually see the sort of thing you will get when you purchase.

  10. #10
    Cool Newbie talby101 is an unknown quantity at this point
    Join Date
    Oct 2005
    Location
    oxford
    Posts
    42

    Default

    Maybe they can look at a site that does it already and work it out. It will assist in learning how different 'pieces' of the page come together.

+ Reply to Thread
Page 1 of 2
1 2 LastLast

Similar Threads

  1. colour chart
    By Lewis in forum General Webmaster Discussion
    Replies: 2
    Last Post: 21-05-2005, 11:53
  2. Change Scroller Colour
    By Departed in forum Comments / Suggestions
    Replies: 2
    Last Post: 29-04-2005, 16:06

Visitors found this page by searching for:

Nobody landed on this page from a search engine, yet!
SEO Blog

Tags for this Thread

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28