Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > HTML > HTML Code Clinic
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 30th, 2005, 02:42 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Copenhagen, , Denmark.
Posts: 440
Thanks: 0
Thanked 0 Times in 0 Posts
Default Force somthing invisble into table cell

Well, I have a slight blemish in a piece of HTML which I use for an ASP.NET control. The problem is that a table cell is constructed with borders to hold a javascript menu, which is placed in a span.

When the control is rendered the browser doesn't recognize that the table cell holds anything why the browser dosen't draw the borders (both IE and Firefox); i.e. the table cell has to have content in order to make the borders visible.

Therefore a tried to put in a   or anything else to force some non-visible content into the cell. This works fine in IE, but in Firefox the menu is pushed. The code underneath demonstrate the problem...
Code:
<table>
<tr>
    <td style="border:solid 1px #000000; background-color:#eeeeee;"></td>
    <td style="border:solid 1px #000000; background-color:#eeeeee;">&nbsp</td>
    <td style="border:solid 1px #000000; background-color:#eeeeee;">1</td>
</tr>
</table>
Only borders on the last two cells will appear. And I want borders on all three. This is probably a well-known problem, but someone must have solved it.

Is there a way to tell a table cell that it should draw the border eventhough there are no content?

Thanks, Jacob.
__________________
Danish audio books for download at http://www.lytenbog.dk (Danske lydbøger til download).
Reply With Quote
  #2 (permalink)  
Old October 30th, 2005, 03:00 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Copenhagen, , Denmark.
Posts: 440
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Found a solution, but is there another more correct method? The solution I found is shown in the code below, where the tag for a line is used...
Code:
<table>
<tr>
    <td style="border:solid 1px #000000; background-color:#eeeeee;"></td>
    <td style="border:solid 1px #000000; background-color:#eeeeee;">&nbsp</td>
    <td style="border:solid 1px #000000; background-color:#eeeeee;">1</td>
</tr>
</table>
The problem is that the color attribute has to be set according to the background color of the cell, table or page. Hope there is another way to do this.

Thanks, Jacob.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to force table cell to a certain width? TheMajor HTML Code Clinic 1 April 17th, 2007 01:57 PM
layers in table cell dearmisskat HTML Code Clinic 12 March 10th, 2007 04:46 AM
reading from a table cell? Atomsk Access VBA 2 September 28th, 2006 07:46 AM
Hyperlink in a cell table amc Dreamweaver (all versions) 33 August 5th, 2004 12:11 PM



All times are GMT -4. The time now is 03:15 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.