/    Sign up×
Community /Pin to ProfileBookmark

COLSPAN property not working

I have a table that has two columns – first is 100px wide, second takes up the rest. One of my rows spans both columns (via <td colspan=2>). If I do this, however, the width of all first columns is completely messed up (and is definitely not 100px). Any thoughts on why? Is there a way to overcome this problem?

Try this as an example:
<table border=”1″ width=”100%” id=”table1″>
<tr>
<td width=100>aaa</td>
<td>aaa</td>
</tr>
<tr>
<td colspan=2><div style=’width: 100%’>xxxxxxxx xxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxx</div></td>
</tr>
</table>

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@VicauthorOct 22.2005 — Sorry guys, realised too late this is a wrong forum. Still, if anyone has any thought, they would be appreciated.
Copy linkTweet thisAlerts:
@FangOct 22.2005 — &lt;table border="1" width="100%" id="table1"&gt;
&lt;colgroup&gt;
&lt;col&gt;&lt;/col&gt;
&lt;col style='width: 100%'&gt;&lt;/col&gt;
&lt;/colgroup&gt;
&lt;tr&gt;
&lt;td&gt;&lt;div style='width: 100px'&gt;aaa&lt;/div&gt;&lt;/td&gt;
&lt;td&gt;aaa&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td colspan=2&gt;&lt;div&gt;xxxxxxxx xxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxx&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
×

Success!

Help @Vic spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.21,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...