Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
HTML problem in IE, please help (colspan).
Old 10-12-2006, 06:53 AM HTML problem in IE, please help (colspan).
Experienced Talker

Posts: 33
Trades: 0
Please open the below code in IE and FF.

Code:
<html>
<body>
   <table style="width:50%; background-color:#FFFFFF; border-collapse:collapse;" border="1">
    <tr style="height:25px;">
        <td>data</td>
            <td style="width:70px;">data2</td>
    </tr>
        <tr style="height:25px;">
        <td colspan="2" bgcolor="#CCCCCC" align="right">A very long footer name, longer than 70px;</td>
    </tr>
   </table>
</body>
</html>
As you can see FF shows the right column correctly (its width=70px), whereas IE ignores "width" property and extends the column width

If you set the footer text to something like "Test", then both browsers behaves as expected.

Does anybody have a solution to this?
__________________

Please login or register to view this content. Registration is FREE
yuppie is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 10-12-2006, 10:17 AM Re: HTML problem in IE, please help (colspan).
ADAM Web Design's Avatar
Canadastaninianite

Posts: 5,935
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
Trades: 0
Yeah, I do. It's your lucky day.

Take your footer out of the table itself and put it into a div. In other words, remove the table row and put this immediately after the table.
Code:
<div style="text-align:  right;  height:  25px;  background-color:  #CCCCCC;">
Footer text here.
</div>
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
(my blog)


Please login or register to view this content. Registration is FREE
(with proof)
ADAM Web Design is offline
Reply With Quote
View Public Profile Visit ADAM Web Design's homepage!
 
Old 10-12-2006, 10:17 AM Re: HTML problem in IE, please help (colspan).
techwench's Avatar
Code Monkey

Posts: 1,449
Name: Danalyn
Location: Dallas, TX
Trades: 0
It's because IE is stupid when it comes to percentage widths.

If there's no specified width on the outter element (in this case, either <table> or <body>), then it'll do its best to guess where it *should* be...and 9 times out of 10, the guess is wrong!

If the data in the left has more text to fill the table cell and the text starts to wrap, the table will display correctly in IE.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
techwench is offline
Reply With Quote
View Public Profile
 
Old 10-12-2006, 10:34 AM Re: HTML problem in IE, please help (colspan).
Experienced Talker

Posts: 33
Trades: 0
Thank you for the responses.

Adam, unfortunately I can't accept your solution, because the right column of the data and the footer will be displayed in different width, when a browser starts to stretch the data cell because of large string inside. The solution I'm looking for is to keep the right column the same width in footer and in the data cells...always.


It seems to be an IE bug, since I didn't find any acceptable solutions to this in the net. Switching to FF forever
__________________

Please login or register to view this content. Registration is FREE
yuppie is offline
Reply With Quote
View Public Profile
 
Old 10-12-2006, 11:05 AM Re: HTML problem in IE, please help (colspan).
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
Of COURSE it's an IE bug.. it's FULL of them!!!
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 10-12-2006, 05:03 PM Re: HTML problem in IE, please help (colspan).
Novice Talker

Posts: 11
Trades: 0
Give me a bit I will have your answer by tomorrow. OK.
cromebiz is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to HTML problem in IE, please help (colspan).
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.17314 seconds with 12 queries