Jump to content

document.write


Nadya

Recommended Posts

My problem is: I have a css file body {background-color: "#FFCCFF"}h1 {font-size: 20pt; text-align: center }h2 {font-size: 15pt; text-align: center }and an html file:<html> <head> <link rel="stylesheet" type="text/css" href="foliocss.css" /> <script type="text/javascript"> document.write('Portfolio'); </script> </head> <body> <h2> CV </h2> </body></html>how to change the size of the text in document.write using the css file.what and how to write in the css10x

Link to comment
Share on other sites

My problem is: I have a css file body {background-color: "#FFCCFF"}h1 {font-size: 20pt; text-align: center }h2 {font-size: 15pt; text-align: center }and an html file:<html> <head> <link rel="stylesheet" type="text/css" href="foliocss.css" /> <script type="text/javascript"> document.write('Portfolio'); </script> </head> <body> <h2> CV </h2> </body></html>how to change the size of the text in document.write using the css file.what and how to write in the css10x
If you explain a little better, I know I can help you.
Link to comment
Share on other sites

You could do something like this:
<script type="text/javascript">	document.write('<span class="myclass">Portfolio</span>');</script>

ahh I understand hahaha its easier to just use a div instead.
<script type="text/javascript">	document.write('<div class="myclass">Portfolio</div>');</script>

and ifyou wnated to get really technical, you could also use innerHTML (DOM) to save the data to a variable that you can pass around via div id in the html.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...