The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
I posted an HTML table in one of my threads and it converted the coding from the standard <td> elements to [TD] elements and it completely disregarded all the <style> coding I made. I enabled HTML coding in the forum, but it still went haywire.
Any ideas? |
|
#2
|
|||
|
|||
|
Bump
|
|
#3
|
|||
|
|||
|
Any help?
|
|
#4
|
||||
|
||||
|
Show us your bbcode for this please.
|
|
#5
|
|||
|
|||
|
It changes this original coding;
Code:
<!DOCTYPE html>
<html>
<head>
<style>
table {
height: auto;
width: 750px;
border: 3px solid grey;
border-collapse: collapse;
font-family: Droid Sans;
}
th {
height: auto;
width: 50%;
border: 3px solid grey;
border-collapse: collapse;
padding: 5px;
font-family: Droid Serif;
color: #B21A41;
}
td {
height: auto;
width: 50%;
padding: 10px;
}
td.stats {
height: auto;
width: 50%;
padding-left: 30px;
padding-right: 30px;
}
td.back {
height: auto;
width: 100%;
padding-top: 10px;
padding-bottom: 10px;
padding-left: 50px;
padding-right: 20px;
}
</style>
</head>
<body>
<table>
<tr>
<th colspan="2">TEST</th>
</tr>
<tr>
<td colspan="2" align="center">TEST</td>
</tr>
<tr>
<th>TEST</th>
<td class="stats" rowspan="2">TEST</td>
</tr>
<tr>
<td>TEST</td>
</tr>
<tr>
<th colspan="2">TEST</th>
</tr>
<tr>
<td class="back" colspan="2">TEST</td>
</tr>
</table>
</body>
</html>
Into this coding, and none of the styling is applying properly in the resulting table: Code:
<style>
table {
height: auto;
width: 750px;
border: 3px solid grey;
border-collapse: collapse;
font-family: Droid Sans;
}
th {
height: auto;
width: 50%;
border: 3px solid grey;
border-collapse: collapse;
padding: 5px;
font-family: Droid Serif;
color: #B21A41;
}
td {
height: auto;
width: 50%;
padding: 10px;
}
td.stats {
height: auto;
width: 50%;
padding-left: 30px;
padding-right: 30px;
}
td.back {
height: auto;
width: 100%;
padding-top: 10px;
padding-bottom: 10px;
padding-left: 50px;
padding-right: 20px;
}
</style>
[TABLE]
<tbody>[TR]
[TH="colspan: 2"]TEST[/TH]
[/TR]
[TR]
[TD="colspan: 2, align: center"]TEST[/TD]
[/TR]
[TR]
[TH]TEST[/TH]
[TD="class: stats"]TEST[/TD]
[/TR]
[TR]
[TD]TEST[/TD]
[/TR]
[TR]
[TH="colspan: 2"]TEST[/TH]
[/TR]
[TR]
[TD="class: back, colspan: 2"]TEST[/TD]
[/TR]
</tbody>[/TABLE]
|
|
#6
|
||||
|
||||
|
First, I would highly recommend against allowing HTML to be posted, unless you are the only one allowed to post in the forum where you have it allowed.
I would move the CSS to your additional.css template, with the appropriate id/class selectors so that it affects table elements in your posts/post previews only. I think the way I would go about it would be to create custom BBCodes to construct custom tables. By the way, I tested your code on my local dev site, and while it was a mess, the HTML was not converted to BBCodes...I have no idea how that's happening unless you have custom code doing that.
|
| Благодарность от: | ||
| blind-eddie | ||
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|