SitePoint Sponsor |
|
User Tag List
Results 1 to 5 of 5
Thread: Style of input text element
-
Oct 5, 2007, 09:11 #1
- Join Date
- Mar 2004
- Posts
- 639
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Style of input text element
Hello guys,
I'm trying to change input text element.
I'm using this in CSS file:
.textsmall {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 8px;
color: #000000;
}
<input type="text" name="link" cols="20" class="textsmall" />
Another question is how can I change input text element's height? height="5px" doesn't work for me.
And the last question is how can I insert HTML code as the value of input text? value="<a href="">" doesn't work and value='<a href="">' doesn't work also.
-
Oct 5, 2007, 09:40 #2
- Join Date
- Nov 2004
- Location
- Ankh-Morpork
- Posts
- 12,158
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Which browser are you using? Some browsers allow you to set a minimum font size, which they will not go under.
8 pixels is far too small for most people to read. Most fonts will be completely illegible at that size, especially if the field contains lowercase letters.
Your HTML is invalid. There is no cols for input elements (only for textarea). If you want to specify the width, use the width CSS property (e.g., width:20em).
If you want to display markup as the content of a field, you must make sure to escape the angle brackets (at least the left angle bracket).
Code HTML4Strict:<input type="text" ... value='<a href= "">'>
Birnam wood is come to Dunsinane
-
Oct 5, 2007, 11:00 #3
- Join Date
- Mar 2004
- Posts
- 639
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Thanks for quick reply.
I use Firefox for Mac OS. It displays 8px as 8px in all pages on my site. It doesn't work only with this input element.
I use 8px for link code which user will simpy copy paste and he will not read it. I use 12px for normal text.
Your HTML is invalid. There is no cols for input elements (only for textarea). If you want to specify the width, use the width CSS property (e.g., width:20em).
If you want to display markup as the content of a field, you must make sure to escape the angle brackets (at least the left angle bracket).
Code HTML4Strict:<input type="text" ... value='<a href= "">'>
But it doesn't work when I put the same code into my PHP page like this:
PHP Code:<?
....
some php
....
?>
<input .... value="<a href="">aaaaaaa</a>" />
<?
....
some php
....
?>
-
Oct 6, 2007, 00:14 #4
- Join Date
- Nov 2004
- Location
- Ankh-Morpork
- Posts
- 12,158
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
-
Oct 6, 2007, 02:56 #5
- Join Date
- Mar 2004
- Posts
- 639
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Bookmarks