This is a discussion on text box colour within the Website Design Forum forums, part of the Website Design & Development category; hey, i want one of my text boxes to change colour when i click inside it, and when i click ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| | #1 (permalink) |
| Super Moderator Recent Blog: [CaRP] (142933568) [CaRP] XML error: Mismatched tag at line 6 - This appears to be an HTML webpage, not a feed. | 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 |
| | |
| | #3 (permalink) |
| Senior Member | 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
}
-->
|
| | |
| | #4 (permalink) | |
| Super Moderator Recent Blog: [CaRP] (6) [CaRP] XML error: Mismatched tag at line 6 - This appears to be an HTML webpage, not a feed. | Quote:
| |
| | |
| | #5 (permalink) |
| Super Moderator | 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.
__________________ Alex Monaghan - Monaghan Consultants Ltd Web hosting, ADSL, IT & Database consultancy Custom Web hosting on UK or USA servers using Linux (cPanel) or Windows (DotNetPanel) Mobile Phone Ringtones, Logos, Java Games & more |
| | |
| | #6 (permalink) |
| Super Moderator Recent Blog: [CaRP] (6) [CaRP] XML error: Mismatched tag at line 6 - This appears to be an HTML webpage, not a feed. | sorry, i'm only an amature web designer, i dont understand what you meant then! but thanks anyway |
| | |
| | #7 (permalink) |
| Super Moderator | Well, time to learn then 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.
__________________ Alex Monaghan - Monaghan Consultants Ltd Web hosting, ADSL, IT & Database consultancy Custom Web hosting on UK or USA servers using Linux (cPanel) or Windows (DotNetPanel) Mobile Phone Ringtones, Logos, Java Games & more |
| | |
| | #8 (permalink) |
| Super Moderator Recent Blog: [CaRP] (6) [CaRP] XML error: Mismatched tag at line 6 - This appears to be an HTML webpage, not a feed. | thanks monaghan and rustypaulin, these have really helped. monaghan: i will look into that book many thanks |
| | |
| | #9 (permalink) |
| Super Moderator | 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.
__________________ Alex Monaghan - Monaghan Consultants Ltd Web hosting, ADSL, IT & Database consultancy Custom Web hosting on UK or USA servers using Linux (cPanel) or Windows (DotNetPanel) Mobile Phone Ringtones, Logos, Java Games & more |
| | |
| Tags |
| box, colour, text |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| $1 Text Links | rustypaulin | Buy and Sell Ad Space | 1 | 14-07-2006 21:47 |
| colour chart | Lewis | General Webmaster Discussion | 2 | 21-05-2005 11:53 |
| Change Scroller Colour | Departed | Comments / Suggestions | 2 | 29-04-2005 16:06 |
| Change Scroller Colour | Departed | Programming Articles | 6 | 23-04-2005 09:59 |