# Can CSS play nice with JS?

**URL:** <https://forum.kirupa.com/t/can-css-play-nice-with-js/193652>\
**Category:** web dev\
**Created:** [July 14, 2006, 7:48pm UTC](https://forum.kirupa.com/t/can-css-play-nice-with-js/193652 "2006-07-14T19:48:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bimmerboy91](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@bimmerboy91](https://forum.kirupa.com/u/bimmerboy91)\
**Post date:** [July 14, 2006, 7:48pm UTC](https://forum.kirupa.com/t/can-css-play-nice-with-js/193652/1 "2006-07-14T19:48:15Z")

</div>

I know it’s possible, but i must be some sort of idiot.

i have a javascript function that prints the date and time on the page. I am also using CSS to position and format that text.

how can i get the two to play nicely, whenever i try to instert in the JS file, the site breaks, and i don’t see a single thing. No errors, no nothing. Im stumped. Help.  
For the Head:

```auto
 
<head>
<link rel="stylesheet" type="text/css" href"css/site.css" />
<script type="text/javascript" language="javascript" src="javascript/datetime.js"></script>
</head>

```

For the body:

```auto
 
<div id="footer">
blah : <script type="text/javascript">printDate();</script>
</div>

```

Let me know if i need to explain anything better. Thanks in advance!
