HTML embed table into a table row (using div tables)
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
What I'm trying to do:
Notice there is an embedded table under that is in the place of the new row.
The idea is this would be a dropdown for a single row, upon dropping down, it would reveal a subtable. There would be existing rows under the dropdown table.
What is actually happening:
The embedded table only seems to span across the first column, but I need it to fit the width of the entire row. I originally was using HTML <table>
tags but tried switching to the divTable format. Unfortunately, this didn't work either.
What am I doing wrong here?
My html:
<div class="divTable">
<div class="divTableHeading">
<div class="divTableRow">
<div class="divTableHead">head1</div>
<div class="divTableHead">head2</div>
<div class="divTableHead">head3</div>
<div class="divTableHead">head4</div>
<div class="divTableHead">head5</div>
<div class="divTableHead">head6</div>
<div class="divTableHead">head7</div>
</div>
</div>
<div class="divTableBody">
<div class="divTableRow">
<div class="divTableCell">cell1</div>
<div class="divTableCell">cell2</div>
<div class="divTableCell">c3</div>
<div class="divTableCell">c4</div>
<div class="divTableCell">c5</div>
<div class="divTableCell">-c6</div>
<div class="divTableCell">c7</div>
</div>
<div class="divTableRow">
<div class="divTable">
<div class="divTableHeading">
<div class="divTableRow">
<div class="divTableHead">embedded1</div>
<div class="divTableHead">embedded2</div>
<div class="divTableHead">embedded3</div>
</div>
</div>
<div class="divTableBody">
<div class="divTableRow dropdownTable">
<div class="divTableCell">1</div>
<div class="divTableCell">2</div>
<div class="divTableCell">3</div>
</div>
<div class="divTableRow dropdownTable">
<div class="divTableCell">1</div>
<div class="divTableCell">2</div>
<div class="divTableCell">3</div>
</div>
</div>
</div>
</div>
</div>
</div>
My CSS:
.divTable{
display: table;
width: 100%;
width: 100%;
border: 1px solid #eeeeeea8;
-webkit-box-shadow: 6px 9px 33px -5px rgba(0,0,0,0.75);
-moz-box-shadow: 6px 9px 33px -5px rgba(0,0,0,0.75);
box-shadow: 6px 9px 33px -5px rgba(0,0,0,0.75);
border-radius: 10px 10px 10px 10px;
-moz-border-radius: 10px 10px 10px 10px;
-webkit-border-radius: 10px 10px 10px 10px;
}
.divTableRow {
display: table-row;
}
.divTableHeading {
background-color: #EEE;
display: table-header-group;
}
.divTableCell, .divTableHead {
border: 1px solid #999999;
display: table-cell;
padding: 3px 10px;
}
.divTableHeading {
background-color: #EEE;
display: table-header-group;
font-weight: bold;
}
.divTableFoot {
background-color: #EEE;
display: table-footer-group;
font-weight: bold;
}
.divTableBody {
display: table-row-group;
}
.divTableRow:nth-child(even){
background-color: #f2f2f2;
}
.divTableRow:hover:not(:first-child) {
background-color: #ddd;
}
.divTableCell, .divTableHead{
border: 1px solid rgba(221, 221, 221, 0.836);
padding: 8px;
}
.divTableHead{
padding-top: 12px;
padding-bottom: 12px;
text-align: center;
background-color: rgba(251, 38, 0,.9);
color: white;
}
html css html5 html-table css-tables
add a comment |
What I'm trying to do:
Notice there is an embedded table under that is in the place of the new row.
The idea is this would be a dropdown for a single row, upon dropping down, it would reveal a subtable. There would be existing rows under the dropdown table.
What is actually happening:
The embedded table only seems to span across the first column, but I need it to fit the width of the entire row. I originally was using HTML <table>
tags but tried switching to the divTable format. Unfortunately, this didn't work either.
What am I doing wrong here?
My html:
<div class="divTable">
<div class="divTableHeading">
<div class="divTableRow">
<div class="divTableHead">head1</div>
<div class="divTableHead">head2</div>
<div class="divTableHead">head3</div>
<div class="divTableHead">head4</div>
<div class="divTableHead">head5</div>
<div class="divTableHead">head6</div>
<div class="divTableHead">head7</div>
</div>
</div>
<div class="divTableBody">
<div class="divTableRow">
<div class="divTableCell">cell1</div>
<div class="divTableCell">cell2</div>
<div class="divTableCell">c3</div>
<div class="divTableCell">c4</div>
<div class="divTableCell">c5</div>
<div class="divTableCell">-c6</div>
<div class="divTableCell">c7</div>
</div>
<div class="divTableRow">
<div class="divTable">
<div class="divTableHeading">
<div class="divTableRow">
<div class="divTableHead">embedded1</div>
<div class="divTableHead">embedded2</div>
<div class="divTableHead">embedded3</div>
</div>
</div>
<div class="divTableBody">
<div class="divTableRow dropdownTable">
<div class="divTableCell">1</div>
<div class="divTableCell">2</div>
<div class="divTableCell">3</div>
</div>
<div class="divTableRow dropdownTable">
<div class="divTableCell">1</div>
<div class="divTableCell">2</div>
<div class="divTableCell">3</div>
</div>
</div>
</div>
</div>
</div>
</div>
My CSS:
.divTable{
display: table;
width: 100%;
width: 100%;
border: 1px solid #eeeeeea8;
-webkit-box-shadow: 6px 9px 33px -5px rgba(0,0,0,0.75);
-moz-box-shadow: 6px 9px 33px -5px rgba(0,0,0,0.75);
box-shadow: 6px 9px 33px -5px rgba(0,0,0,0.75);
border-radius: 10px 10px 10px 10px;
-moz-border-radius: 10px 10px 10px 10px;
-webkit-border-radius: 10px 10px 10px 10px;
}
.divTableRow {
display: table-row;
}
.divTableHeading {
background-color: #EEE;
display: table-header-group;
}
.divTableCell, .divTableHead {
border: 1px solid #999999;
display: table-cell;
padding: 3px 10px;
}
.divTableHeading {
background-color: #EEE;
display: table-header-group;
font-weight: bold;
}
.divTableFoot {
background-color: #EEE;
display: table-footer-group;
font-weight: bold;
}
.divTableBody {
display: table-row-group;
}
.divTableRow:nth-child(even){
background-color: #f2f2f2;
}
.divTableRow:hover:not(:first-child) {
background-color: #ddd;
}
.divTableCell, .divTableHead{
border: 1px solid rgba(221, 221, 221, 0.836);
padding: 8px;
}
.divTableHead{
padding-top: 12px;
padding-bottom: 12px;
text-align: center;
background-color: rgba(251, 38, 0,.9);
color: white;
}
html css html5 html-table css-tables
stackoverflow.com/questions/9277661/… try this code
– ma_dev_15
Jan 4 at 18:34
add a comment |
What I'm trying to do:
Notice there is an embedded table under that is in the place of the new row.
The idea is this would be a dropdown for a single row, upon dropping down, it would reveal a subtable. There would be existing rows under the dropdown table.
What is actually happening:
The embedded table only seems to span across the first column, but I need it to fit the width of the entire row. I originally was using HTML <table>
tags but tried switching to the divTable format. Unfortunately, this didn't work either.
What am I doing wrong here?
My html:
<div class="divTable">
<div class="divTableHeading">
<div class="divTableRow">
<div class="divTableHead">head1</div>
<div class="divTableHead">head2</div>
<div class="divTableHead">head3</div>
<div class="divTableHead">head4</div>
<div class="divTableHead">head5</div>
<div class="divTableHead">head6</div>
<div class="divTableHead">head7</div>
</div>
</div>
<div class="divTableBody">
<div class="divTableRow">
<div class="divTableCell">cell1</div>
<div class="divTableCell">cell2</div>
<div class="divTableCell">c3</div>
<div class="divTableCell">c4</div>
<div class="divTableCell">c5</div>
<div class="divTableCell">-c6</div>
<div class="divTableCell">c7</div>
</div>
<div class="divTableRow">
<div class="divTable">
<div class="divTableHeading">
<div class="divTableRow">
<div class="divTableHead">embedded1</div>
<div class="divTableHead">embedded2</div>
<div class="divTableHead">embedded3</div>
</div>
</div>
<div class="divTableBody">
<div class="divTableRow dropdownTable">
<div class="divTableCell">1</div>
<div class="divTableCell">2</div>
<div class="divTableCell">3</div>
</div>
<div class="divTableRow dropdownTable">
<div class="divTableCell">1</div>
<div class="divTableCell">2</div>
<div class="divTableCell">3</div>
</div>
</div>
</div>
</div>
</div>
</div>
My CSS:
.divTable{
display: table;
width: 100%;
width: 100%;
border: 1px solid #eeeeeea8;
-webkit-box-shadow: 6px 9px 33px -5px rgba(0,0,0,0.75);
-moz-box-shadow: 6px 9px 33px -5px rgba(0,0,0,0.75);
box-shadow: 6px 9px 33px -5px rgba(0,0,0,0.75);
border-radius: 10px 10px 10px 10px;
-moz-border-radius: 10px 10px 10px 10px;
-webkit-border-radius: 10px 10px 10px 10px;
}
.divTableRow {
display: table-row;
}
.divTableHeading {
background-color: #EEE;
display: table-header-group;
}
.divTableCell, .divTableHead {
border: 1px solid #999999;
display: table-cell;
padding: 3px 10px;
}
.divTableHeading {
background-color: #EEE;
display: table-header-group;
font-weight: bold;
}
.divTableFoot {
background-color: #EEE;
display: table-footer-group;
font-weight: bold;
}
.divTableBody {
display: table-row-group;
}
.divTableRow:nth-child(even){
background-color: #f2f2f2;
}
.divTableRow:hover:not(:first-child) {
background-color: #ddd;
}
.divTableCell, .divTableHead{
border: 1px solid rgba(221, 221, 221, 0.836);
padding: 8px;
}
.divTableHead{
padding-top: 12px;
padding-bottom: 12px;
text-align: center;
background-color: rgba(251, 38, 0,.9);
color: white;
}
html css html5 html-table css-tables
What I'm trying to do:
Notice there is an embedded table under that is in the place of the new row.
The idea is this would be a dropdown for a single row, upon dropping down, it would reveal a subtable. There would be existing rows under the dropdown table.
What is actually happening:
The embedded table only seems to span across the first column, but I need it to fit the width of the entire row. I originally was using HTML <table>
tags but tried switching to the divTable format. Unfortunately, this didn't work either.
What am I doing wrong here?
My html:
<div class="divTable">
<div class="divTableHeading">
<div class="divTableRow">
<div class="divTableHead">head1</div>
<div class="divTableHead">head2</div>
<div class="divTableHead">head3</div>
<div class="divTableHead">head4</div>
<div class="divTableHead">head5</div>
<div class="divTableHead">head6</div>
<div class="divTableHead">head7</div>
</div>
</div>
<div class="divTableBody">
<div class="divTableRow">
<div class="divTableCell">cell1</div>
<div class="divTableCell">cell2</div>
<div class="divTableCell">c3</div>
<div class="divTableCell">c4</div>
<div class="divTableCell">c5</div>
<div class="divTableCell">-c6</div>
<div class="divTableCell">c7</div>
</div>
<div class="divTableRow">
<div class="divTable">
<div class="divTableHeading">
<div class="divTableRow">
<div class="divTableHead">embedded1</div>
<div class="divTableHead">embedded2</div>
<div class="divTableHead">embedded3</div>
</div>
</div>
<div class="divTableBody">
<div class="divTableRow dropdownTable">
<div class="divTableCell">1</div>
<div class="divTableCell">2</div>
<div class="divTableCell">3</div>
</div>
<div class="divTableRow dropdownTable">
<div class="divTableCell">1</div>
<div class="divTableCell">2</div>
<div class="divTableCell">3</div>
</div>
</div>
</div>
</div>
</div>
</div>
My CSS:
.divTable{
display: table;
width: 100%;
width: 100%;
border: 1px solid #eeeeeea8;
-webkit-box-shadow: 6px 9px 33px -5px rgba(0,0,0,0.75);
-moz-box-shadow: 6px 9px 33px -5px rgba(0,0,0,0.75);
box-shadow: 6px 9px 33px -5px rgba(0,0,0,0.75);
border-radius: 10px 10px 10px 10px;
-moz-border-radius: 10px 10px 10px 10px;
-webkit-border-radius: 10px 10px 10px 10px;
}
.divTableRow {
display: table-row;
}
.divTableHeading {
background-color: #EEE;
display: table-header-group;
}
.divTableCell, .divTableHead {
border: 1px solid #999999;
display: table-cell;
padding: 3px 10px;
}
.divTableHeading {
background-color: #EEE;
display: table-header-group;
font-weight: bold;
}
.divTableFoot {
background-color: #EEE;
display: table-footer-group;
font-weight: bold;
}
.divTableBody {
display: table-row-group;
}
.divTableRow:nth-child(even){
background-color: #f2f2f2;
}
.divTableRow:hover:not(:first-child) {
background-color: #ddd;
}
.divTableCell, .divTableHead{
border: 1px solid rgba(221, 221, 221, 0.836);
padding: 8px;
}
.divTableHead{
padding-top: 12px;
padding-bottom: 12px;
text-align: center;
background-color: rgba(251, 38, 0,.9);
color: white;
}
html css html5 html-table css-tables
html css html5 html-table css-tables
edited Jan 8 at 8:49
Brian Tompsett - 汤莱恩
4,2671339104
4,2671339104
asked Jan 4 at 18:04
Alexander GonzalezAlexander Gonzalez
184
184
stackoverflow.com/questions/9277661/… try this code
– ma_dev_15
Jan 4 at 18:34
add a comment |
stackoverflow.com/questions/9277661/… try this code
– ma_dev_15
Jan 4 at 18:34
stackoverflow.com/questions/9277661/… try this code
– ma_dev_15
Jan 4 at 18:34
stackoverflow.com/questions/9277661/… try this code
– ma_dev_15
Jan 4 at 18:34
add a comment |
1 Answer
1
active
oldest
votes
I will give you a suggestion that I had give to myself. Unless you are developing to some old-browsers as IE11 or similar, you could use Grid CSS to build such elaborated organization without lost yourself and others in this code abyss. As you can see in Grid CSS you can have more control about how rows and columns it will behave, you can even build your application to better behave in different screens sizes (as mobile or big ones). You have almost limitless options to work with it, as your front-end code will be more fast and improve better then just use these div but like table.
I wish that could help in your path.
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54043990%2fhtml-embed-table-into-a-table-row-using-div-tables%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
I will give you a suggestion that I had give to myself. Unless you are developing to some old-browsers as IE11 or similar, you could use Grid CSS to build such elaborated organization without lost yourself and others in this code abyss. As you can see in Grid CSS you can have more control about how rows and columns it will behave, you can even build your application to better behave in different screens sizes (as mobile or big ones). You have almost limitless options to work with it, as your front-end code will be more fast and improve better then just use these div but like table.
I wish that could help in your path.
add a comment |
I will give you a suggestion that I had give to myself. Unless you are developing to some old-browsers as IE11 or similar, you could use Grid CSS to build such elaborated organization without lost yourself and others in this code abyss. As you can see in Grid CSS you can have more control about how rows and columns it will behave, you can even build your application to better behave in different screens sizes (as mobile or big ones). You have almost limitless options to work with it, as your front-end code will be more fast and improve better then just use these div but like table.
I wish that could help in your path.
add a comment |
I will give you a suggestion that I had give to myself. Unless you are developing to some old-browsers as IE11 or similar, you could use Grid CSS to build such elaborated organization without lost yourself and others in this code abyss. As you can see in Grid CSS you can have more control about how rows and columns it will behave, you can even build your application to better behave in different screens sizes (as mobile or big ones). You have almost limitless options to work with it, as your front-end code will be more fast and improve better then just use these div but like table.
I wish that could help in your path.
I will give you a suggestion that I had give to myself. Unless you are developing to some old-browsers as IE11 or similar, you could use Grid CSS to build such elaborated organization without lost yourself and others in this code abyss. As you can see in Grid CSS you can have more control about how rows and columns it will behave, you can even build your application to better behave in different screens sizes (as mobile or big ones). You have almost limitless options to work with it, as your front-end code will be more fast and improve better then just use these div but like table.
I wish that could help in your path.
answered Jan 4 at 18:20
Wesley MagalhãesWesley Magalhães
394
394
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54043990%2fhtml-embed-table-into-a-table-row-using-div-tables%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
stackoverflow.com/questions/9277661/… try this code
– ma_dev_15
Jan 4 at 18:34