Can you use javascript inside of a css id?

Posts 1–3 of 3 · Page 1 of 1
Can you use javascript inside of a css id?
I want to add a javascript clock to my website but i can't get it to fit in with the id "today" Anyone know how i can combine the 2..
Code:
<script type="text/javascript">
document.write("<p>" + Date() + "</p>");
</script>
Code:
#today {
	margin-top: -1.66em; padding: 0 2em 0 0;
	color: #FFF;
	font-weight: bold;
	text-align: right;
	line-height: 1;
}
meh stupid question i asked i found how to /request close please thanks
Try this:
Code:
<script type="text/javascript">
document.write("<p id="today">" + Date() + "</p>");
</script>
Posts 1–3 of 3 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?