sebthib55 Posted June 30, 2008 Share Posted June 30, 2008 I created a textbox that appears once you hover over a play button displaying the game's description. I got the text to center, but everything in the textbox seems indented and pushed to the right. echo"<div id='popup$g[0]' style='position:absolute;border:1px solid #333;background-color:#DDD;color:#000;width=175px;display:none;'> <ol> <center>$g[2]</center> </ol></div><br>"; ?> <a href='Arcade.php?play=<?php echo $g[0] ?>' onmouseover='document.getElementById("popup<?php echo $g[0] ?>").style.display=""' onmouseout="document.getElementById('popup<?php echo $g[0] ?>').style.display='none'" onmousemove="s=document.getElementById('popup<?php echo $g[0] ?>').style;s.top=document.body.scrollTop+event.clientY+2;s.left=document.body.scrollLeft+event.clientX-152;">[PLAY]</a> <?PHP Link to comment https://forums.phpfreaks.com/topic/112510-php-textbox-onmouseover-style-problem/ Share on other sites More sharing options...
kenrbnsn Posted June 30, 2008 Share Posted June 30, 2008 This doesn't seem to be a PHP problem, but rather either a Javascript or CSS problem. Ken Link to comment https://forums.phpfreaks.com/topic/112510-php-textbox-onmouseover-style-problem/#findComment-577685 Share on other sites More sharing options...
sebthib55 Posted June 30, 2008 Author Share Posted June 30, 2008 Are you still able to help? Link to comment https://forums.phpfreaks.com/topic/112510-php-textbox-onmouseover-style-problem/#findComment-577689 Share on other sites More sharing options...
trq Posted June 30, 2008 Share Posted June 30, 2008 Are you still able to help? If you ask your question in the appropriate board. Link to comment https://forums.phpfreaks.com/topic/112510-php-textbox-onmouseover-style-problem/#findComment-577691 Share on other sites More sharing options...
kenrbnsn Posted June 30, 2008 Share Posted June 30, 2008 Not really. I'm going to move this to the Javascript area. Someone there might be able to help better. Ken [Moved from the PHP Help area] Link to comment https://forums.phpfreaks.com/topic/112510-php-textbox-onmouseover-style-problem/#findComment-577695 Share on other sites More sharing options...
xtopolis Posted June 30, 2008 Share Posted June 30, 2008 If <center>$g[2]</center> is your text that is displayed... that it seems to be a CSS problem... You're using an <ol> tag to contain the info, and then centering it. You should just use a <p> tag instead of the OL, and also apply the center to the p tag, not the actual text $g[2]. Otherwise, fix the margin & padding on your <ol> tag and that would probably fix it. Start with margin: 0; padding: 0;. Hope that helps. Link to comment https://forums.phpfreaks.com/topic/112510-php-textbox-onmouseover-style-problem/#findComment-577749 Share on other sites More sharing options...
sebthib55 Posted June 30, 2008 Author Share Posted June 30, 2008 A++++++++++++++++++++ That worked like a charm! You are awesome! Thank you very very very much! Link to comment https://forums.phpfreaks.com/topic/112510-php-textbox-onmouseover-style-problem/#findComment-577793 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.