Colspan issue - lost formatting












0















whenever I set the last colspan of the last question seen in the code below to match the previous colspans (to 7), the html table resets all previous colspans to 1. Here is the html code:






<head>

<style>
table, th, td {
/* border: 1px solid black;*/
}
</style>

</head>

<html>
<body>
<form action="myphproutine.php" method="post">
<table align="left" cellspacing="50" cellpadding="5">
<tr>
<th id="question" colspan="7">Questions</th>
<th id="option1">Option 1</th>
<th id="option2">Option 2</th>
<th id="option3">Option 3</th>
<th id="option4">Option 4</th>
</tr>
<tr>
<th align="left" bgcolor="grey" colspan="7">I found out that this is question 1</th>
<td headers="option1" align="center">1
<input type="radio" name="D1" value="1"/></td>
<td headers="option2" align="center">2
<input type="radio" name="D1" value="2"/></td>
<td headers="option3" align="center">3
<input type="radio" name="D1" value="3"/></td>
<td headers="option4" align="center">4
<input type="radio" name="D1" value="4"/></td>
</tr>
<tr>
<th align="left" bgcolor="grey" colspan="7">I was aware that this is question 2</th>
<td align="center">1
<input type="radio" name="D2" value="1"/></td>
<td align="center">2
<input type="radio" name="D2" value="2"/></td>
<td align="center">3
<input type="radio" name="D2" value="3"/></td>
<td align="center">4
<input type="radio" name="D2" value="4"/></td>
</tr>
<tr>
<th align="left" bgcolor="grey" colspan="7">I couldn't seem to understand question 3</th>
<td align="center">1
<input type="radio" name="D3" value="1"/></td>
<td align="center">2
<input type="radio" name="D3" value="2"/></td>
<td align="center">3
<input type="radio" name="D3" value="3"/></td>
<td align="center">4
<input type="radio" name="D3" value="4"/></td>
</tr>
<tr>
<th align="left" bgcolor="grey" colspan="2">I experienced breathing difficulties when using colspan </th>
<td align="center">1
<input type="radio" name="D4" value="1"/></td>
<td align="center">2
<input type="radio" name="D4" value="2"/></td>
<td align="center">3
<input type="radio" name="D4" value="3"/></td>
<td align="center">4
<input type="radio" name="D4" value="4"/></td>
</tr>
</table>
<p>
<br><center/>
<input type="hidden" name="submitted" value="TRUE" />
<input type="submit" name="submit" value="submit" />
</form>
</p>
</body>
</html>





Hi, whenever I set the last colspan of the last question seen in the code below to match the previous colspans (to 7), the html table resets all previous colspans to 1.
Could someone help me understand why this occurs please.










share|improve this question























  • Hi can anyone help please? For the final row, if I change the colspan to 7 to match the preceding rows widths, all table rows then reduce in width. Why is that? You can easily run the code too see what I mean.

    – Peter G
    Nov 26 '18 at 8:48
















0















whenever I set the last colspan of the last question seen in the code below to match the previous colspans (to 7), the html table resets all previous colspans to 1. Here is the html code:






<head>

<style>
table, th, td {
/* border: 1px solid black;*/
}
</style>

</head>

<html>
<body>
<form action="myphproutine.php" method="post">
<table align="left" cellspacing="50" cellpadding="5">
<tr>
<th id="question" colspan="7">Questions</th>
<th id="option1">Option 1</th>
<th id="option2">Option 2</th>
<th id="option3">Option 3</th>
<th id="option4">Option 4</th>
</tr>
<tr>
<th align="left" bgcolor="grey" colspan="7">I found out that this is question 1</th>
<td headers="option1" align="center">1
<input type="radio" name="D1" value="1"/></td>
<td headers="option2" align="center">2
<input type="radio" name="D1" value="2"/></td>
<td headers="option3" align="center">3
<input type="radio" name="D1" value="3"/></td>
<td headers="option4" align="center">4
<input type="radio" name="D1" value="4"/></td>
</tr>
<tr>
<th align="left" bgcolor="grey" colspan="7">I was aware that this is question 2</th>
<td align="center">1
<input type="radio" name="D2" value="1"/></td>
<td align="center">2
<input type="radio" name="D2" value="2"/></td>
<td align="center">3
<input type="radio" name="D2" value="3"/></td>
<td align="center">4
<input type="radio" name="D2" value="4"/></td>
</tr>
<tr>
<th align="left" bgcolor="grey" colspan="7">I couldn't seem to understand question 3</th>
<td align="center">1
<input type="radio" name="D3" value="1"/></td>
<td align="center">2
<input type="radio" name="D3" value="2"/></td>
<td align="center">3
<input type="radio" name="D3" value="3"/></td>
<td align="center">4
<input type="radio" name="D3" value="4"/></td>
</tr>
<tr>
<th align="left" bgcolor="grey" colspan="2">I experienced breathing difficulties when using colspan </th>
<td align="center">1
<input type="radio" name="D4" value="1"/></td>
<td align="center">2
<input type="radio" name="D4" value="2"/></td>
<td align="center">3
<input type="radio" name="D4" value="3"/></td>
<td align="center">4
<input type="radio" name="D4" value="4"/></td>
</tr>
</table>
<p>
<br><center/>
<input type="hidden" name="submitted" value="TRUE" />
<input type="submit" name="submit" value="submit" />
</form>
</p>
</body>
</html>





Hi, whenever I set the last colspan of the last question seen in the code below to match the previous colspans (to 7), the html table resets all previous colspans to 1.
Could someone help me understand why this occurs please.










share|improve this question























  • Hi can anyone help please? For the final row, if I change the colspan to 7 to match the preceding rows widths, all table rows then reduce in width. Why is that? You can easily run the code too see what I mean.

    – Peter G
    Nov 26 '18 at 8:48














0












0








0








whenever I set the last colspan of the last question seen in the code below to match the previous colspans (to 7), the html table resets all previous colspans to 1. Here is the html code:






<head>

<style>
table, th, td {
/* border: 1px solid black;*/
}
</style>

</head>

<html>
<body>
<form action="myphproutine.php" method="post">
<table align="left" cellspacing="50" cellpadding="5">
<tr>
<th id="question" colspan="7">Questions</th>
<th id="option1">Option 1</th>
<th id="option2">Option 2</th>
<th id="option3">Option 3</th>
<th id="option4">Option 4</th>
</tr>
<tr>
<th align="left" bgcolor="grey" colspan="7">I found out that this is question 1</th>
<td headers="option1" align="center">1
<input type="radio" name="D1" value="1"/></td>
<td headers="option2" align="center">2
<input type="radio" name="D1" value="2"/></td>
<td headers="option3" align="center">3
<input type="radio" name="D1" value="3"/></td>
<td headers="option4" align="center">4
<input type="radio" name="D1" value="4"/></td>
</tr>
<tr>
<th align="left" bgcolor="grey" colspan="7">I was aware that this is question 2</th>
<td align="center">1
<input type="radio" name="D2" value="1"/></td>
<td align="center">2
<input type="radio" name="D2" value="2"/></td>
<td align="center">3
<input type="radio" name="D2" value="3"/></td>
<td align="center">4
<input type="radio" name="D2" value="4"/></td>
</tr>
<tr>
<th align="left" bgcolor="grey" colspan="7">I couldn't seem to understand question 3</th>
<td align="center">1
<input type="radio" name="D3" value="1"/></td>
<td align="center">2
<input type="radio" name="D3" value="2"/></td>
<td align="center">3
<input type="radio" name="D3" value="3"/></td>
<td align="center">4
<input type="radio" name="D3" value="4"/></td>
</tr>
<tr>
<th align="left" bgcolor="grey" colspan="2">I experienced breathing difficulties when using colspan </th>
<td align="center">1
<input type="radio" name="D4" value="1"/></td>
<td align="center">2
<input type="radio" name="D4" value="2"/></td>
<td align="center">3
<input type="radio" name="D4" value="3"/></td>
<td align="center">4
<input type="radio" name="D4" value="4"/></td>
</tr>
</table>
<p>
<br><center/>
<input type="hidden" name="submitted" value="TRUE" />
<input type="submit" name="submit" value="submit" />
</form>
</p>
</body>
</html>





Hi, whenever I set the last colspan of the last question seen in the code below to match the previous colspans (to 7), the html table resets all previous colspans to 1.
Could someone help me understand why this occurs please.










share|improve this question














whenever I set the last colspan of the last question seen in the code below to match the previous colspans (to 7), the html table resets all previous colspans to 1. Here is the html code:






<head>

<style>
table, th, td {
/* border: 1px solid black;*/
}
</style>

</head>

<html>
<body>
<form action="myphproutine.php" method="post">
<table align="left" cellspacing="50" cellpadding="5">
<tr>
<th id="question" colspan="7">Questions</th>
<th id="option1">Option 1</th>
<th id="option2">Option 2</th>
<th id="option3">Option 3</th>
<th id="option4">Option 4</th>
</tr>
<tr>
<th align="left" bgcolor="grey" colspan="7">I found out that this is question 1</th>
<td headers="option1" align="center">1
<input type="radio" name="D1" value="1"/></td>
<td headers="option2" align="center">2
<input type="radio" name="D1" value="2"/></td>
<td headers="option3" align="center">3
<input type="radio" name="D1" value="3"/></td>
<td headers="option4" align="center">4
<input type="radio" name="D1" value="4"/></td>
</tr>
<tr>
<th align="left" bgcolor="grey" colspan="7">I was aware that this is question 2</th>
<td align="center">1
<input type="radio" name="D2" value="1"/></td>
<td align="center">2
<input type="radio" name="D2" value="2"/></td>
<td align="center">3
<input type="radio" name="D2" value="3"/></td>
<td align="center">4
<input type="radio" name="D2" value="4"/></td>
</tr>
<tr>
<th align="left" bgcolor="grey" colspan="7">I couldn't seem to understand question 3</th>
<td align="center">1
<input type="radio" name="D3" value="1"/></td>
<td align="center">2
<input type="radio" name="D3" value="2"/></td>
<td align="center">3
<input type="radio" name="D3" value="3"/></td>
<td align="center">4
<input type="radio" name="D3" value="4"/></td>
</tr>
<tr>
<th align="left" bgcolor="grey" colspan="2">I experienced breathing difficulties when using colspan </th>
<td align="center">1
<input type="radio" name="D4" value="1"/></td>
<td align="center">2
<input type="radio" name="D4" value="2"/></td>
<td align="center">3
<input type="radio" name="D4" value="3"/></td>
<td align="center">4
<input type="radio" name="D4" value="4"/></td>
</tr>
</table>
<p>
<br><center/>
<input type="hidden" name="submitted" value="TRUE" />
<input type="submit" name="submit" value="submit" />
</form>
</p>
</body>
</html>





Hi, whenever I set the last colspan of the last question seen in the code below to match the previous colspans (to 7), the html table resets all previous colspans to 1.
Could someone help me understand why this occurs please.






<head>

<style>
table, th, td {
/* border: 1px solid black;*/
}
</style>

</head>

<html>
<body>
<form action="myphproutine.php" method="post">
<table align="left" cellspacing="50" cellpadding="5">
<tr>
<th id="question" colspan="7">Questions</th>
<th id="option1">Option 1</th>
<th id="option2">Option 2</th>
<th id="option3">Option 3</th>
<th id="option4">Option 4</th>
</tr>
<tr>
<th align="left" bgcolor="grey" colspan="7">I found out that this is question 1</th>
<td headers="option1" align="center">1
<input type="radio" name="D1" value="1"/></td>
<td headers="option2" align="center">2
<input type="radio" name="D1" value="2"/></td>
<td headers="option3" align="center">3
<input type="radio" name="D1" value="3"/></td>
<td headers="option4" align="center">4
<input type="radio" name="D1" value="4"/></td>
</tr>
<tr>
<th align="left" bgcolor="grey" colspan="7">I was aware that this is question 2</th>
<td align="center">1
<input type="radio" name="D2" value="1"/></td>
<td align="center">2
<input type="radio" name="D2" value="2"/></td>
<td align="center">3
<input type="radio" name="D2" value="3"/></td>
<td align="center">4
<input type="radio" name="D2" value="4"/></td>
</tr>
<tr>
<th align="left" bgcolor="grey" colspan="7">I couldn't seem to understand question 3</th>
<td align="center">1
<input type="radio" name="D3" value="1"/></td>
<td align="center">2
<input type="radio" name="D3" value="2"/></td>
<td align="center">3
<input type="radio" name="D3" value="3"/></td>
<td align="center">4
<input type="radio" name="D3" value="4"/></td>
</tr>
<tr>
<th align="left" bgcolor="grey" colspan="2">I experienced breathing difficulties when using colspan </th>
<td align="center">1
<input type="radio" name="D4" value="1"/></td>
<td align="center">2
<input type="radio" name="D4" value="2"/></td>
<td align="center">3
<input type="radio" name="D4" value="3"/></td>
<td align="center">4
<input type="radio" name="D4" value="4"/></td>
</tr>
</table>
<p>
<br><center/>
<input type="hidden" name="submitted" value="TRUE" />
<input type="submit" name="submit" value="submit" />
</form>
</p>
</body>
</html>





<head>

<style>
table, th, td {
/* border: 1px solid black;*/
}
</style>

</head>

<html>
<body>
<form action="myphproutine.php" method="post">
<table align="left" cellspacing="50" cellpadding="5">
<tr>
<th id="question" colspan="7">Questions</th>
<th id="option1">Option 1</th>
<th id="option2">Option 2</th>
<th id="option3">Option 3</th>
<th id="option4">Option 4</th>
</tr>
<tr>
<th align="left" bgcolor="grey" colspan="7">I found out that this is question 1</th>
<td headers="option1" align="center">1
<input type="radio" name="D1" value="1"/></td>
<td headers="option2" align="center">2
<input type="radio" name="D1" value="2"/></td>
<td headers="option3" align="center">3
<input type="radio" name="D1" value="3"/></td>
<td headers="option4" align="center">4
<input type="radio" name="D1" value="4"/></td>
</tr>
<tr>
<th align="left" bgcolor="grey" colspan="7">I was aware that this is question 2</th>
<td align="center">1
<input type="radio" name="D2" value="1"/></td>
<td align="center">2
<input type="radio" name="D2" value="2"/></td>
<td align="center">3
<input type="radio" name="D2" value="3"/></td>
<td align="center">4
<input type="radio" name="D2" value="4"/></td>
</tr>
<tr>
<th align="left" bgcolor="grey" colspan="7">I couldn't seem to understand question 3</th>
<td align="center">1
<input type="radio" name="D3" value="1"/></td>
<td align="center">2
<input type="radio" name="D3" value="2"/></td>
<td align="center">3
<input type="radio" name="D3" value="3"/></td>
<td align="center">4
<input type="radio" name="D3" value="4"/></td>
</tr>
<tr>
<th align="left" bgcolor="grey" colspan="2">I experienced breathing difficulties when using colspan </th>
<td align="center">1
<input type="radio" name="D4" value="1"/></td>
<td align="center">2
<input type="radio" name="D4" value="2"/></td>
<td align="center">3
<input type="radio" name="D4" value="3"/></td>
<td align="center">4
<input type="radio" name="D4" value="4"/></td>
</tr>
</table>
<p>
<br><center/>
<input type="hidden" name="submitted" value="TRUE" />
<input type="submit" name="submit" value="submit" />
</form>
</p>
</body>
</html>






html






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 21 '18 at 11:55









Peter GPeter G

1




1













  • Hi can anyone help please? For the final row, if I change the colspan to 7 to match the preceding rows widths, all table rows then reduce in width. Why is that? You can easily run the code too see what I mean.

    – Peter G
    Nov 26 '18 at 8:48



















  • Hi can anyone help please? For the final row, if I change the colspan to 7 to match the preceding rows widths, all table rows then reduce in width. Why is that? You can easily run the code too see what I mean.

    – Peter G
    Nov 26 '18 at 8:48

















Hi can anyone help please? For the final row, if I change the colspan to 7 to match the preceding rows widths, all table rows then reduce in width. Why is that? You can easily run the code too see what I mean.

– Peter G
Nov 26 '18 at 8:48





Hi can anyone help please? For the final row, if I change the colspan to 7 to match the preceding rows widths, all table rows then reduce in width. Why is that? You can easily run the code too see what I mean.

– Peter G
Nov 26 '18 at 8:48












0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53411526%2fcolspan-issue-lost-formatting%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53411526%2fcolspan-issue-lost-formatting%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Guess what letter conforming each word

Port of Spain

Run scheduled task as local user group (not BUILTIN)