stockton Posted August 27, 2008 Share Posted August 27, 2008 Is it possible to cause some text to appear relative to the top left of the browser window rather than the top left of its "container"? I have to modify an existing page and have tried adding the following to the CSS script:- .counterMT { position:fixed; top:3px; left:1px; } and tried using it via <class="counterMT"><font color=white><?php echo $NumMembersServed ?>Members Issued><br/>Tickets Issued = <?php echo $NumTicketsIssued ?></font> but this stays relative to its "container" rather than relative to the browsers window. Quote Link to comment https://forums.phpfreaks.com/topic/121541-solved-css-positioning-relative-to-browser-window/ Share on other sites More sharing options...
TheFilmGod Posted August 27, 2008 Share Posted August 27, 2008 <div class="counterMT"> ..content goes here. </div> Quote Link to comment https://forums.phpfreaks.com/topic/121541-solved-css-positioning-relative-to-browser-window/#findComment-627196 Share on other sites More sharing options...
stockton Posted August 28, 2008 Author Share Posted August 28, 2008 Thank you but why did my idea not work? Quote Link to comment https://forums.phpfreaks.com/topic/121541-solved-css-positioning-relative-to-browser-window/#findComment-627559 Share on other sites More sharing options...
haku Posted August 28, 2008 Share Posted August 28, 2008 <class="counterMT"> This tag doesn't exist. There is no <class> tag. You apply a class to another tag. The problem was, you were applying a classname to ...nothing! There was no tag type in there. I'm surprised that it did anything, since it was an invalid syntax, although whatever browser you were using (I'm guessing IE?) let it slide. Quote Link to comment https://forums.phpfreaks.com/topic/121541-solved-css-positioning-relative-to-browser-window/#findComment-627641 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.