June 23, 201214 yr I think you'll understand me a bit, but what I'm trying to do is when hovering over a div called ServerField, it has to display ServerDesc using display: none and display: block or something. I did it before but I forgot it, I have no idea why. :/ echo '<div id ="Serverlist">'; echo '<table>'; echo '<tr id="ListInfo">'; echo '<td id></td>'; echo '<td>' . $Translations[$Language]["LIST"][1] . '</td>'; echo '<td>' . $Translations[$Language]["LIST"][2] . '</td>'; echo '<td>' . $Translations[$Language]["LIST"][3] . '</td>'; echo '<td>' . $Translations[$Language]["LIST"][4] . '</td>'; echo '<td colspan="2">' . $Translations[$Language]["LIST"][5] . '</td>'; echo '<td>' . $Translations[$Language]["LIST"][6] . '</td>'; echo '</tr>'; for($i=0;$i<count($Names);$i++) { echo '<div id="ServerField">'; echo '<tr id="ServerInfo">'; echo '<td>' . ($i+1) . '</td>'; echo '<td>' . $ServerList["Names"][$i] . '</td>'; echo '<td>' . $ServerList["Descriptions"][$i] . '</td>'; echo '<td>' . $ServerList["IPs"][$i] . '</td>'; echo '<td>' . $ServerList["Accounts"][$i] . '</td>'; echo '<td>' . $ServerList["Votes"][$i] . '</td>'; echo '<td><a href="index.php?s=vote&id=' . $ServerList["IDs"][$i] . '">' . $Translations[$Language]["LIST"][7] . '</a>'; echo '<td>' . date("d.m.y - H:i",$ServerList["Dates"][$i]) . '</td>'; echo '</tr>'; echo '<tr>'; echo '<td colspan="100">'; echo '<div id="ServerDesc">'; echo 'THIS IS THE DESCRIPTION!'; echo '</div>'; echo '</td>'; echo '</tr>'; echo '</div>'; } echo '</table>'; echo '</div>';
June 23, 201214 yr If #ServerDesc is a child of #ServerField its pretty easy: #ServerDesc { display:none; } #ServerField:hover #ServerDesc { display:block; } Edited June 23, 201214 yr by Leonvv
June 23, 201214 yr Author If #ServerDesc is a child of #ServerField its pretty easy: #ServerDesc { display:none; } #ServerField:hover #ServerDesc { display:block; } I thought so too but it isn't working. I have some other :hover stuff too but even when I comment them it isn't working. Edit: When I inspect the element ServerDesc it is 0px tall and in the corner of my ServerList, how is this possible? Edited June 23, 201214 yr by Dreeass
June 23, 201214 yr I thought so too but it isn't working. I have some other :hover stuff too but even when I comment them it isn't working. Edit: When I inspect the element ServerDesc it is 0px tall and in the corner of my ServerList, how is this possible? Could you post some html code instead of php code ? That would make it easier to inspect.
June 23, 201214 yr Author Could you post some html code instead of php code ? That would make it easier to inspect. That should be all the code you need and the variables are just text so there shouldn't be a problem for you.
June 23, 201214 yr That should be all the code you need and the variables are just text so there shouldn't be a problem for you. This is too hard to read as html, sorry. Maybe you got a link ?
June 23, 201214 yr Author Do you have any javascriptthat might be messing it up? No, I'm not using Javascript.
June 24, 201214 yr Author I found the problem, the added row in the table caused it to act weird. I have no idea why but when I put the td in the already existing row it works. Weird.
Create an account or sign in to comment