Select Categories Below
Status: Open Points: 75 Time: 09:35 - Jan 15, 2008
sbjc23
I am trying to have an larger preview image pop up over a smaller thumbnail when I scroll over it by having a hidden <div> be shown. Everything is working perfectly when I have the <div> show up from an absolute position BUT for some reason when I change the positioning to be relative the cell that the thumbnail is contained within is expanding as if the larger preview image within the <div> was actually being shown underneath it on the page. <td height="" align="center" valign="top" width="" colspan="2"> <a href="services_inventory_sku_details_2.html" onmouseover="javascript:show_div()" onmouseout="javascript:hide_div()"><img src="sku_tshirt.gif" border="0"></a> <div class="img-shadow" id="RegUser1" style="visibility:hidden; position:absolute; top:50px; left:190px;"> <img src="productPreview.jpg" alt="test"/> </div> </td> Why is this happening when I am just switching where the positioning measurements should be starting from? I have tried a couple options with the display attribute but it doesn't work.
Categories:
Add Categories
When adding more than one category, separate them with commas.
Advertisement
jgivoni
Date:: Jan 16, 2008
Time:: 08:31
The reason your container cell is expanding is that an element with visibility: hidden and position: relative should take up space in the flow as if it were really there. Such are the CSS specs. Two ways to avoid the hidden div taking up any space: position: absolute (which takes the element out of flow) or display: none (which prevents any rendering of the element) If you want to change the positioning offset, you should put position: relative on one of the div's parent elements. Hope this helps, Jakob
Answer this Question
New User
Email:
Upon submission of this form, you will automatically be registered as a Quomon user and we will send your login information to this address
Registered User
Username:
Password:
Forgot Your Password?
Enter your email address below and we will resend your login information to you.
Login Information Sent
Questions
How do I vary the height of a frame depending on t...
Dynamically I created ASP.NET user control using A...
I want to delete a cookie of a different domain fr...
hover gallery.
How long does Google and MSN store emails that can...
Does the United States Government have a CIO posit...
You have 100 characters to use
Rank
Expert
Points
1.
6232
2.
4221
3.
3650
4.
2807
5.
2698
6.
1953
7.
1820
8.
1000
9.
812
10.
695
Register today to share your knowledge with the community and be recognized and rewarded for your contributions.
Register Here
"Psst, Quomon is a great site. Pass it on." Tell a Friend | Link To Us | Save to Delicious | Digg it
Language Options
English:
Español:
Sponsors
Questions and Answers Software Real Estate Postcards Marketing Fulfillment