HighDots Forums  

Show on hover span stretches table row

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss Show on hover span stretches table row in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Wokm4n
 
Posts: n/a

Default Show on hover span stretches table row - 01-07-2009 , 01:27 PM






Hi there,

I got the following situation:
I got a table with hidden span's in some columns. They need to display
beside the table when you hover the column. This works pretty well but
if the span takes multiple lines, the height of the table row will be
stretched, this is not what I want. I also don't want to use js

An image to illustrate the problem:
http://i186.photobucket.com/albums/x189/bakaboii/Schermafdruk-1-4.png

Does anyone have a solution? Upping the width of the page is not an
option, unfortunately.

Thanks a lot!

Reply With Quote
  #2  
Old   
Wokm4n
 
Posts: n/a

Default Re: Show on hover span stretches table row - 01-07-2009 , 01:29 PM






Oh, the html and css!


<tr>
<td>C279</td>
<td>ID01G..H05</td>
<td class="info"><a href="#">Analyse</a> <span>Concurrentie- ,
Doelgroep- en Gebruikersanalyse uitvoeren.</span></td>
<td>3</td>
<td>V</td>
</tr>


#container table tr td.info span {
display:none;
}
#container table tr td.info:hover span {
left:250px;
width:186px;
color:#000;
position:relative;
display:block;
}

Reply With Quote
  #3  
Old   
sander.venema@gmail.com
 
Posts: n/a

Default Re: Show on hover span stretches table row - 01-07-2009 , 04:31 PM



Maybe it has something to do with the display tag in your stylesheet.
You're basically telling the browser to display the hidden span as a
block element.. Maybe that has something to do with your problem.
However, I must tell you that it has been a while since I coded some
HTML though, so maybe my directions are not accurate.

Reply With Quote
  #4  
Old   
Wokm4n
 
Posts: n/a

Default Re: Show on hover span stretches table row - 01-07-2009 , 04:48 PM



On Jan 7, 10:31*pm, sander.ven... (AT) gmail (DOT) com wrote:
Quote:
Maybe it has something to do with the display tag in your stylesheet.
You're basically telling the browser to display the hidden span as a
block element.. Maybe that has something to do with your problem.
However, I must tell you that it has been a while since I coded some
HTML though, so maybe my directions are not accurate.
Thanks for your comment. I applied all possible values for display;
turned out block was ok.

Got it working now!
#container table tr td.info:hover span {
top:-14px;
left:250px;
width:186px;
height:0;
color:#000;
position:relative;
display:block;
}

Height of the hidden/block span 0.
top:-14px;
14px is the line-height.

Will certainly have to apply hacks for IE negative positioning but it
works allright w/ Gecko engine


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.