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. 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> 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? 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. 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
Archived
This topic is now archived and is closed to further replies.