Jump to content

PHP Textbox Onmouseover (Style Problem?)


sebthib55

Recommended Posts

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.

 

textboxpreviewxq2.gif

 

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
Share on other sites

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.