Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > HTML > HTML Code Clinic
|
HTML Code Clinic Do you have some HTML code you'd like to share and get suggestions from others for tweaking or improving it? This discussion is the place.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the HTML Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 11th, 2006, 11:28 AM
Authorized User
 
Join Date: May 2004
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default DHTML - Div tags causing table cells to expand ve

Hello,

I'm working a site and I have to admit, I'm not so well versed in layers as I should be.

I am having problems w/ div tags expanding the table cells vertically and I can't seem to change them by changing the div properties.

Here's a test page that I've put up and I've added table borders so you can see what's happening.

http://peopledesigns.net/coe/index_NEW.htm


Here's the offending div code:

Code:
<td bgcolor="#EBE894"> 
 
 
<td><div id="container" style="position:relative; top:0; left:0; z-index:3 visibility: visible;"><a href="nutrition.htm"><img src="images/main_info.jpg" width="221" height="424" border="0" /></a> <div id="div_text_1" style="position:relative; top:-136; left:0; z-index:5 visibility: visible;"><table width=120 border="1" align="center"> <tr><td class="BasebarTextLink">This is our text and this is where it will be. It likes to be RIGHT Here!</td></tr></table></div> </div>   </td>

Thanks for any help,
Clem C
 
Old September 11th, 2006, 11:33 AM
Authorized User
 
Join Date: May 2004
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default

How do you edit posts? My code's all in 1 line!



 
Old September 11th, 2006, 03:53 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 425
Thanks: 0
Thanked 3 Times in 3 Posts
Default

There should be an edit button above your post. With a pen.

The URL you posted returns a 404. Meanwhile, tables do tend to expand. Maybe you are thinking of position: absolute which will remove the element totally from the flow? Do you want the DIV to stick out from the table?

--
http://yupapa.com
 
Old September 12th, 2006, 11:59 AM
Authorized User
 
Join Date: May 2004
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Oops they changed the server configuration on me.

Now the example is here: http://peopledesigns.net/coe/index_NEW.htm




 
Old September 12th, 2006, 12:36 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 425
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Remove the whole style rule form #container

<div id="container" style="position:relative; top:0; left:0; z-index:3 visibility: visible;height:100%;">

It's the height 100% that causes the problem. The rest just doesn't accomplish anything. To position something relative with an offset of zero leaves it where it was to start with. z-index has no effect since nothing overlaps. 'visibility: visible' is the default.

What did you want to do? :)



--
http://yupapa.com
 
Old September 12th, 2006, 02:03 PM
Authorized User
 
Join Date: May 2004
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I took those tags out and I added some colors to the table cells to show where the extra space is beeing added in the table cells.

I would like to try to get rid of the extra space if it's possible using this method.

Thanks for your time.







Similar Threads
Thread Thread Starter Forum Replies Last Post
IE6 Hover Bug - Causing containing DIV to collapse socoolbrewster CSS Cascading Style Sheets 0 August 1st, 2008 09:46 AM
Table cells as links gjeardle HTML Code Clinic 16 January 24th, 2007 12:08 PM
VBA Formatting cells with Html tags read from XML hemagiri Excel VBA 0 November 22nd, 2006 02:41 AM
Contentpage stretching table cells rsearing ASP.NET 2.0 Basics 3 November 14th, 2006 10:39 PM
How to know cells in table is merging?? DorisTan VB How-To 0 January 13th, 2005 09:50 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.