Agustine Posted May 14, 2006 Report Share Posted May 14, 2006 I have a serious problem that is bugging the ###### out of me. What I am try to do isuse CSS to move where the text is on the screen. Here is the JavaScript File: var type = 1switch (type){ case 1: document.getElementById("test") document.write(test") break case 2: document.getElementById("test") document.write("Test") break defualt none} Here is the code in the page file: <p class="display" id="test"></p> Here is the CSS file: p.display{ position:absolute; top:835px; left:45px; z-index: 1} What I want to happen is the text in the JavaScript file to move to its absolute position but it is not and I don't quite understand why. Link to comment Share on other sites More sharing options...
scott100 Posted May 14, 2006 Report Share Posted May 14, 2006 You didn't give an event handler for a start?This page might make more sense of what your trying to do.http://www.w3schools.com/dhtml/tryit.asp?f...amples_position Link to comment Share on other sites More sharing options...
Webworldx Posted May 14, 2006 Report Share Posted May 14, 2006 default's spelt wrong, there's a missing quote, and I think it generally needs a tidy. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now