CSS doesn't work on my <input>'s

K

Kevin

Hello,

I've added this reference to an external css in my <HEAD>:

<link rel="stylesheet" type="text/css" href="bodystyle.css" />
-----------------------------------------------------------------------------------------------
My "bodystyle.css" file consists of:

input{font-size:50%;}
-----------------------------------------------------------------------------------------------
I've also tried:

input{font-size:16pt;}
-----------------------------------------------------------------------------------------------
and
-----------------------------------------------------------------------------------------------
input{font-size:16pt;}
-----------------------------------------------------------------------------------------------
and
-----------------------------------------------------------------------------------------------
input{font-size:16px;}
-----------------------------------------------------------------------------------------------
and ...
-----------------------------------------------------------------------------------------------
input{font-size:2.5em;}

BUT none of them work.

My input HTML consists of many of the following statements:

.... document.write("<input type=\"text\" size=\"9\" \/>"); ...

Please help me out.

Thanks,
Kevin
 
E

Evertjan.

Kevin wrote on 08 jun 2010 in comp.lang.javascript:
Hello,

I've added this reference to an external css in my <HEAD>:

<link rel="stylesheet" type="text/css" href="bodystyle.css" />
-----------------------------------------------------------------------
------------------------ My "bodystyle.css" file consists of:

input{font-size:50%;}
-----------------------------------------------------------------------
------------------------ I've also tried:

input{font-size:16pt;}
-----------------------------------------------------------------------
------------------------ and
-----------------------------------------------------------------------
------------------------ input{font-size:16pt;}
-----------------------------------------------------------------------
------------------------ and
-----------------------------------------------------------------------
------------------------ input{font-size:16px;}
-----------------------------------------------------------------------
------------------------ and ...
-----------------------------------------------------------------------
------------------------ input{font-size:2.5em;}

BUT none of them work.

My input HTML consists of many of the following statements:

... document.write("<input type=\"text\" size=\"9\" \/>"); ...

skip te size='' declaration
 
T

Thomas 'PointedEars' Lahn

Kevin said:
I've added this reference to an external css in my <HEAD>:

That would indicate you are using HTML.
<link rel="stylesheet" type="text/css" href="bodystyle.css" />

That would be XHTML instead.
My "bodystyle.css" file consists of:

input{font-size:50%;}
I've also tried:

input{font-size:16pt;}
[...]

BUT none of them work.

You could have spared yourself/us the hyphen-lines, though.
My input HTML consists of many of the following statements:

... document.write("<input type=\"text\" size=\"9\" \/>"); ...

Get rid of them as follows:

document.write([
'<input size="9">',
'...'
].join(""));
Please help me out.

You have a stylesheet problem, not a script problem; ask in
comp.infosystems.www.authoring.stylesheets after you have used
<http://validator.w3.org/> and <http://jigsaw.w3.org/css-validator/>.


PointedEars
 
J

Jukka K. Korpela

Kevin said:
I've added this reference to an external css in my <HEAD>:

<link rel="stylesheet" type="text/css" href="bodystyle.css" />

So you have a CSS question, don't you?

Try posting to comp.infosystems.www.authoring.www.stylesheets and don't
forget to post the URL this time. Less explanations, more URLs. The odds are
that your stylesheet is just in a wrong place, or server with wrong
Content-Type, or starts with errors that cause the rest to be ignored, more
or less.
My input HTML consists of many of the following statements:

... document.write("<input type=\"text\" size=\"9\" \/>"); ...

That's not HTML. That's JavaScript code that generates HTML.

P.S. Ignore the "skip te size='' declaration" response. It's pointless, and
its sender surely did not try his "remedy" before posting.
 
T

Thomas 'PointedEars' Lahn

Jukka said:
^^
That's not HTML. That's JavaScript code that generates HTML.

More or less HTML ;-)

In fact, the approach described above is already error-prone unless always
complete elements are generated. It certainly is very inefficient in any
case.


PointedEars
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,190
Latest member
ClayE7480

Latest Threads

Top