Table extending out of a card - html

I created a card using the bootstrap. Within that card, I intend to insert a table with data.
My problem is that when reducing the screen (check responsiveness), the data in the table comes out of the card.
How can I make this so that the table doesn't extend out and instead it has a horizontal scroll to it, can someone help me?
Thanks
DEMO
.card {
margin-top: 16px;
margin-left: 16px;
height: 400px;
margin-right: 16px;
background: #FFFFFF 0% 0% no-repeat padding-box;
box-shadow: 0px 3px 20px #BCBCCB47;
border-radius: 8px;
opacity: 1;
border: 2px solid red;
}
.header {
width: 100%;
height: 40px;
background: #ECF2F9 0% 0% no-repeat padding-box;
border-radius: 8px 8px 0px 0px;
}
.header h1 {
text-align: center;
font-family: 'Noto Sans', sans-serif;
font-size: 14px;
letter-spacing: 0;
color: #4D4F5C;
}
<div style="width:40%">
<div class="card">
<div class="card-header header">
<h1>My Table</h1>
</div>
<table class="card-table table-borderless myTable" style="overflow-y: auto; overflow-x: auto;">
<thead>
<tr>
<th scope="col tableTitles">Title</th>
<th scope="col tableTitles">Name</th>
<th scope="col tableTitles">ID</th>
<th scope="col tableTitles">Street</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let pr of Data; let a = index;" class="tableColor">
<td class="tableTitles">
{{pr.title}}
</td>
<td class="tableTitles">
{{pr.name}}
</td>
<td class="tableTitles">
{{pr.id}}
</td>
<td class="tableTitles">
{{pr.street}}
</td>
</tr>
</tbody>
</table>
</div>
</div>

You can use overflow-x: scroll; and move the card header to outside of the card.
.card {
margin-top: 16px;
margin-left: 16px;
height: 400px;
margin-right: 16px;
background: #FFFFFF 0% 0% no-repeat padding-box;
box-shadow: 0px 3px 20px #BCBCCB47;
border-radius: 8px;
opacity: 1;
border: 2px solid red;
overflow-x:scroll;
}
.header {
width: 100%;
height: 40px;
background: #ECF2F9 0% 0% no-repeat padding-box;
border-radius: 8px 8px 0px 0px;
}
.header h1 {
text-align: center;
font-family: 'Noto Sans', sans-serif;
font-size: 14px;
letter-spacing: 0;
color: #4D4F5C;
}
<div style="width:40%">
<div class="card-header header">
<h1>My Table</h1>
</div>
<div class="card">
<table class="card-table table-borderless myTable" style="overflow-y: auto; overflow-x: auto;">
<thead>
<tr>
<th scope="col tableTitles">Title</th>
<th scope="col tableTitles">Name</th>
<th scope="col tableTitles">ID</th>
<th scope="col tableTitles">Street</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let pr of Data; let a = index;" class="tableColor">
<td class="tableTitles">
{{pr.title}}
</td>
<td class="tableTitles">
{{pr.name}}
</td>
<td class="tableTitles">
{{pr.id}}
</td>
<td class="tableTitles">
{{pr.street}}
</td>
</tr>
</tbody>
</table>
</div>
</div>

Related

Why is the body and animated background separated (not on top of eachother) on my HTML-website?

I'm a student learning HTML and CSS. For a school project we need to make a simple game and I'm currently working on the design of the game lobby.
I wanted to add a moving smoke/fog overlay on top of my background but behind my tables, buttons and everything so I searched for some tutorials and was able to implement this. The only problem I have is that the background with the smoke is underneath the rest of my code. I tried searching for the problem myself but wasn't able to find it.
Here are the fog images
Here is a picture:
It would be amazing if someone could help me find the problem and how to fix this issue!
Here is the DEMO
#font-face{
src: url("images/font.otf");
font-family: lobbyfont;
}
.quick_game_button{
margin-left: 7%;
margin-top: 60px;
padding: 5px;
width: 240px;
border: 4px solid black;
height: 80px;
background-image: url("images/dirtyclothes3.jpg");
background-size: cover;
border-radius: 10px;
z-index: 3;
}
.quick_game_text{
font-family: lobbyfont, sans-serif;
font-size: 40px;
margin-top: 17px;
margin-left: 21px;
z-index: 3;
}
.quick_game_text:hover {
text-decoration: underline;
text-underline-offset: 2px;
cursor: pointer;
}
.lobby_title{
font-family: lobbyfont, sans-serif;
font-size: 100px;
margin-top: 40px;
margin-left: 7%;
letter-spacing: 1px;
width: 250px;
margin-bottom: 10px;
z-index: 3;
}
body{
font-family: sans-serif;
margin: 0;
padding: 0;
}
article.background_music{
background: rgba(43,45,47,.7);
border: solid black 2px;
width: 120px;
height: 40px;
position: absolute;
top: 15px;
right: 30px;
}
p.music_text{
font-family: "lobbyfont", sans-serif;
font-weight: bolder;
padding-left: 4px;
display: inline;
letter-spacing: 1px;
z-index: 3;
}
#sound_button{
margin-top: 10px;
padding-left: 20px;
display: inline;
z-index: 3;
}
.online_players_table{
border: 3px solid black;
margin-left: 40%;
margin-top: -215px;
width: 250px;
height: 380px;
border-collapse: collapse;
z-index: 3;
}
.friends_table{
border: 3px solid black;
margin-left: 70%;
margin-top: -421px;
width: 250px;
height: 384px;
border-collapse: collapse;
z-index: 3;
}
.caption_titel{
font-family: lobbyfont, sans-serif;
font-size: 30px;
}
.caption_friends{
font-family: lobbyfont, sans-serif;
font-size: 30px;
letter-spacing: 1px;
}
tbody tr:nth-child(odd) {
background-color: rgba(0,0,0,0.70);
color: dimgrey;
}
tbody tr:nth-child(even) {
background-color: rgba(43,45,47,0.70);
}
.add_friend_text{
margin: 3px;
width: 40px;
font-family: lobbyfont, sans-serif;
color: black;
letter-spacing: 1px;
border: 1.5px solid black;
background: rgb(43, 45, 47);
background-size: contain;
border-radius: 10px;
}
.add_friend_text:hover{
cursor: pointer;
}
.invite_friend_text{
margin: 3px;
width: 58px;
font-family: lobbyfont, sans-serif;
color: black;
letter-spacing: 1px;
border: 1.5px solid black;
background: rgb(43, 45, 47);
background-size: contain;
border-radius: 10px;
}
.invite_friend_text:hover{
cursor: pointer;
}
th{
font-family: lobbyfont, sans-serif;
letter-spacing: 1px;
}
.absolute-bg {
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
background: url("images/1989118_auto_x2.jpg");
background-position: 50%;
background-repeat: no-repeat;
background-size: cover;
overflow: hidden;
z-index: 2;
}
.fog {
position: relative;
height: 100vh;
width: 100%;
background: #fff;
z-index: 2;
}
.fog-container {
position: absolute;
width: 100%;
height: 100%;
overflow: hidden;
z-index: 2;
}
.fog-img {
position: absolute;
height: 100vh;
width: 300vw;
z-index: 2;
}
.fog-img-first {
background: url("images/fog-1.png");
background-repeat: repeat-x;
background-size: contain;
background-position: center;
animation: marquee 60s linear infinite;
z-index: 2;
}
.fog-img-second {
background: url("images/fog-2.png");
background-repeat: repeat-x;
background-size: contain;
background-position: center;
animation: marquee 30s linear infinite;
z-index: 2;
}
#keyframes marquee {
0% {
transform: translate3d(0, 0, 0);
}
100% {
transform: translate3d(-200vw, 0, 0);
}
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="test.css">
<title>test</title>
</head>
<body>
<!--lobby title-->
<p class="lobby_title">LOBBY</p>
<!--quick game button-->
<section class="quick_game_button">
<p class="quick_game_text" id="quick_game_Button">Quick Game</p>
</section>
<!--online players table-->
<table class="online_players_table">
<caption class="caption_titel">Online Players</caption>
<tr>
<th style="width: 75%"></th>
<th><p class="add_friend_text">add</p></th>
</tr>
<tr>
<th style="width: 75%">player 2</th>
<th><p class="add_friend_text">add</p></th>
</tr>
<tr>
<th style="width: 75%"></th>
<th><p class="add_friend_text">add</p></th>
</tr>
<tr>
<th style="width: 75%"></th>
<th><p class="add_friend_text">add</p></th>
</tr>
<tr>
<th style="width: 75%">player 5</th>
<th><p class="add_friend_text">add</p></th>
</tr>
<tr>
<th style="width: 75%"></th>
<th><p class="add_friend_text">add</p></th>
</tr>
<tr>
<th style="width: 75%"></th>
<th><p class="add_friend_text">add</p></th>
</tr>
<tr>
<th style="width: 75%">player 8</th>
<th><p class="add_friend_text">add</p></th>
</tr>
<tr>
<th style="width: 75%"></th>
<th><p class="add_friend_text">add</p></th>
</tr>
<tr>
<th style="width: 75%"></th>
<th><p class="add_friend_text">add</p></th>
</tr>
<tr>
<th style="width: 75%">player 11</th>
<th><p class="add_friend_text">add</p></th>
</tr>
<tr>
<th style="width: 75%"></th>
<th><p class="add_friend_text">add</p></th>
</tr>
</table>
<!--friends table-->
<table class="friends_table">
<caption class="caption_friends">Friends</caption>
<tr>
<th style="width: 75%"></th>
<th><p class="invite_friend_text">invite</p></th>
</tr>
<tr>
<th style="width: 75%">friend2</th>
<th><p class="invite_friend_text">invite</p></th>
</tr>
<tr>
<th style="width: 75%"></th>
<th><p class="invite_friend_text">invite</p></th>
</tr>
<tr>
<th style="width: 75%"></th>
<th><p class="invite_friend_text">invite</p></th>
</tr>
<tr>
<th style="width: 75%">friend 5</th>
<th><p class="invite_friend_text">invite</p></th>
</tr>
<tr>
<th style="width: 75%"></th>
<th><p class="invite_friend_text">invite</p></th>
</tr>
<tr>
<th style="width: 75%"></th>
<th><p class="invite_friend_text">invite</p></th>
</tr>
<tr>
<th style="width: 75%">friend 8</th>
<th><p class="invite_friend_text">invite</p></th>
</tr>
<tr>
<th style="width: 75%"></th>
<th><p class="invite_friend_text">invite</p></th>
</tr>
<tr>
<th style="width: 75%"></th>
<th><p class="invite_friend_text">invite</p></th>
</tr>
<tr>
<th style="width: 75%">friend 11</th>
<th><p class="invite_friend_text">invite</p></th>
</tr>
<tr>
<th style="width: 75%"></th>
<th><p class="invite_friend_text">invite</p></th>
</tr>
</table>
<!--background music script-->
<article>
<script type="text/javascript">
function playpause() {
let snd = document.getElementById("sound");
let snd_btn = document.getElementById("sound_button");
snd.muted = !snd.muted; if(snd.muted){ snd_btn.innerHTML = "<img alt='Pause The Music' title='Music Paused' src='https://cdn3.iconfinder.com/data/icons/eightyshades/512/30_Sound_off-24.png' />"; } else{ snd_btn.innerHTML = "<img alt='Play The Music' title='Music Playing' src='https://cdn3.iconfinder.com/data/icons/eightyshades/512/29_Sound_alt-24.png' />"; } }
</script>
<audio autoplay loop id="sound" src="music/[HQ 1080p]Call of Duty Black Ops Multiplayer Menu Music + Download Link (mp3cut.net).mp3" type="audio/mp3"></audio>
</article>
<article class="background_music">
<p class="music_text">MUSIC</p><div id='sound_button' onClick="playpause()"><img title='Music Playing' alt='Play The Music' src='https://cdn3.iconfinder.com/data/icons/eightyshades/512/29_Sound_alt-24.png'/></div>
</article>
<!--fog background-->
<section class="fog">
<div class="absolute-bg"></div>
<div class="fog-container">
<div class="fog-img fog-img-first"></div>
<div class="fog-img fog-img-second"></div>
</div>
</section>
</body>
</html>
Disclaimer: novice here so take this with a pinch of salt.
I've provided a solution below that certainly isn't the most elegant but will help you on your way without altering too much of your code.
We can take the section of class 'fog' out entirely for the time being to simplify things a little.
We then take the div of class 'absolute-bg' and place this immediately below the body, making sure that all of your remaining elements are within this div and therefore (visually) 'on top' of your background.
We then set the 'absolute-bg' class to have a lower z-index than everything else (e.g. -1).
Next, we can take the div of 'fog-container' and give it two simple CSS properties: position: fixed; top: 0;
This removes the element from the Document flow and places it in a fixed position relative to the browser window, in this case, top: 0.
Finally, you want to be able to click-through your div 'fog-container' which now sits 'on-top' of everything else when rendered, therefore, we can add these two properties to .fog-container: pointer-events: none; touch-action: none;
Hope this helps. Elegant, no? A push in the right direction? Hopefully!
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="./test.css">
<title>test</title>
</head>
<body>
<!-- Your fog section is still here but I've commented it out -->
<!-- <section class="fog"></section> -->
<div class="absolute-bg">
<!--lobby title-->
<p class="lobby_title">LOBBY</p>
<!--quick game button-->
<section class="quick_game_button">
<p class="quick_game_text" id="quick_game_Button">Quick Game</p>
</section>
<!--online players table-->
<table class="online_players_table">
<caption class="caption_titel">Online Players</caption>
<tr>
<th style="width: 75%"></th>
<th>
<p class="add_friend_text">add</p>
</th>
</tr>
<tr>
<th style="width: 75%">player 2</th>
<th>
<p class="add_friend_text">add</p>
</th>
</tr>
<tr>
<th style="width: 75%"></th>
<th>
<p class="add_friend_text">add</p>
</th>
</tr>
<tr>
<th style="width: 75%"></th>
<th>
<p class="add_friend_text">add</p>
</th>
</tr>
<tr>
<th style="width: 75%">player 5</th>
<th>
<p class="add_friend_text">add</p>
</th>
</tr>
<tr>
<th style="width: 75%"></th>
<th>
<p class="add_friend_text">add</p>
</th>
</tr>
<tr>
<th style="width: 75%"></th>
<th>
<p class="add_friend_text">add</p>
</th>
</tr>
<tr>
<th style="width: 75%">player 8</th>
<th>
<p class="add_friend_text">add</p>
</th>
</tr>
<tr>
<th style="width: 75%"></th>
<th>
<p class="add_friend_text">add</p>
</th>
</tr>
<tr>
<th style="width: 75%"></th>
<th>
<p class="add_friend_text">add</p>
</th>
</tr>
<tr>
<th style="width: 75%">player 11</th>
<th>
<p class="add_friend_text">add</p>
</th>
</tr>
<tr>
<th style="width: 75%"></th>
<th>
<p class="add_friend_text">add</p>
</th>
</tr>
</table>
<!--friends table-->
<table class="friends_table">
<caption class="caption_friends">Friends</caption>
<tr>
<th style="width: 75%"></th>
<th>
<p class="invite_friend_text">invite</p>
</th>
</tr>
<tr>
<th style="width: 75%">friend2</th>
<th>
<p class="invite_friend_text">invite</p>
</th>
</tr>
<tr>
<th style="width: 75%"></th>
<th>
<p class="invite_friend_text">invite</p>
</th>
</tr>
<tr>
<th style="width: 75%"></th>
<th>
<p class="invite_friend_text">invite</p>
</th>
</tr>
<tr>
<th style="width: 75%">friend 5</th>
<th>
<p class="invite_friend_text">invite</p>
</th>
</tr>
<tr>
<th style="width: 75%"></th>
<th>
<p class="invite_friend_text">invite</p>
</th>
</tr>
<tr>
<th style="width: 75%"></th>
<th>
<p class="invite_friend_text">invite</p>
</th>
</tr>
<tr>
<th style="width: 75%">friend 8</th>
<th>
<p class="invite_friend_text">invite</p>
</th>
</tr>
<tr>
<th style="width: 75%"></th>
<th>
<p class="invite_friend_text">invite</p>
</th>
</tr>
<tr>
<th style="width: 75%"></th>
<th>
<p class="invite_friend_text">invite</p>
</th>
</tr>
<tr>
<th style="width: 75%">friend 11</th>
<th>
<p class="invite_friend_text">invite</p>
</th>
</tr>
<tr>
<th style="width: 75%"></th>
<th>
<p class="invite_friend_text">invite</p>
</th>
</tr>
</table>
<!--background music script-->
<article>
<script type="text/javascript">
function playpause() {
let snd = document.getElementById("sound");
let snd_btn = document.getElementById("sound_button");
snd.muted = !snd.muted;
if (snd.muted) {
snd_btn.innerHTML = "<img alt='Pause The Music' title='Music Paused' src='https://cdn3.iconfinder.com/data/icons/eightyshades/512/30_Sound_off-24.png' />";
} else {
snd_btn.innerHTML = "<img alt='Play The Music' title='Music Playing' src='https://cdn3.iconfinder.com/data/icons/eightyshades/512/29_Sound_alt-24.png' />";
}
}
</script>
<audio autoplay loop id="sound" src="music/[HQ 1080p]Call of Duty Black Ops Multiplayer Menu Music + Download Link (mp3cut.net).mp3" type="audio/mp3"></audio>
</article>
<article class="background_music">
<p class="music_text">MUSIC</p>
<div id='sound_button' onClick="playpause()"><img title='Music Playing' alt='Play The Music' src='https://cdn3.iconfinder.com/data/icons/eightyshades/512/29_Sound_alt-24.png' /></div>
</article>
<!--fog background-->
<div class="fog-container">
<div class="fog-img fog-img-first"></div>
<div class="fog-img fog-img-second"></div>
</div>
</div>
</section>
</body>
</html>
#font-face{
src: url("images/font.otf");
font-family: lobbyfont;
}
.quick_game_button{
margin-left: 7%;
margin-top: 60px;
padding: 5px;
width: 240px;
border: 4px solid black;
height: 80px;
background-image: url("images/dirtyclothes3.jpg");
background-size: cover;
border-radius: 10px;
z-index: 3;
}
.quick_game_text{
font-family: lobbyfont, sans-serif;
font-size: 40px;
margin-top: 17px;
margin-left: 21px;
z-index: 3;
}
.quick_game_text:hover {
text-decoration: underline;
text-underline-offset: 2px;
cursor: pointer;
}
.lobby_title{
font-family: lobbyfont, sans-serif;
font-size: 100px;
margin-top: 40px;
margin-left: 7%;
letter-spacing: 1px;
width: 250px;
margin-bottom: 10px;
z-index: 3;
}
body{
font-family: sans-serif;
margin: 0;
padding: 0;
}
article.background_music{
background: rgba(43,45,47,.7);
border: solid black 2px;
width: 120px;
height: 40px;
position: absolute;
top: 15px;
right: 30px;
}
p.music_text{
font-family: "lobbyfont", sans-serif;
font-weight: bolder;
padding-left: 4px;
display: inline;
letter-spacing: 1px;
z-index: 3;
}
#sound_button{
margin-top: 10px;
padding-left: 20px;
display: inline;
z-index: 3;
}
.online_players_table{
border: 3px solid black;
margin-left: 40%;
margin-top: -215px;
width: 250px;
height: 380px;
border-collapse: collapse;
z-index: 3;
}
.friends_table{
border: 3px solid black;
margin-left: 70%;
margin-top: -421px;
width: 250px;
height: 384px;
border-collapse: collapse;
z-index: 3;
}
.caption_titel{
font-family: lobbyfont, sans-serif;
font-size: 30px;
}
.caption_friends{
font-family: lobbyfont, sans-serif;
font-size: 30px;
letter-spacing: 1px;
}
tbody tr:nth-child(odd) {
background-color: rgba(0,0,0,0.70);
color: dimgrey;
}
tbody tr:nth-child(even) {
background-color: rgba(43,45,47,0.70);
}
.add_friend_text{
margin: 3px;
width: 40px;
font-family: lobbyfont, sans-serif;
color: black;
letter-spacing: 1px;
border: 1.5px solid black;
background: rgb(43, 45, 47);
background-size: contain;
border-radius: 10px;
}
.add_friend_text:hover{
cursor: pointer;
}
.invite_friend_text{
margin: 3px;
width: 58px;
font-family: lobbyfont, sans-serif;
color: black;
letter-spacing: 1px;
border: 1.5px solid black;
background: rgb(43, 45, 47);
background-size: contain;
border-radius: 10px;
}
.invite_friend_text:hover{
cursor: pointer;
}
th{
font-family: lobbyfont, sans-serif;
letter-spacing: 1px;
}
.absolute-bg {
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
background: url("images/1989118_auto_x2.jpg");
background-position: 50%;
background-repeat: no-repeat;
background-size: cover;
overflow: hidden;
z-index: -1;
}
/* not using this for now */
/* .fog {
position: relative;
height: 100vh;
width: 100%;
background: #fff;
z-index: 2; */
.fog-container {
position: fixed;
top: 0;
width: 100%;
height: 120%;
overflow: hidden;
z-index: 2;
pointer-events: none;
touch-action: none;
}
.fog-img {
position: absolute;
height: 100%;
width: 300vw;
z-index: 2;
}
.fog-img-first {
background: url("images/fog-1.png");
background-repeat: repeat-x;
background-size: contain;
background-position: center;
-webkit-animation: marquee 60s linear infinite;
animation: marquee 60s linear infinite;
z-index: 2;
}
.fog-img-second {
background: url("images/fog-2.png");
background-repeat: repeat-x;
background-size: contain;
background-position: center;
-webkit-animation: marquee 30s linear infinite;
animation: marquee 30s linear infinite;
z-index: 2;
}
#-webkit-keyframes marquee {
0% {
transform: translate3d(0, 0, 0);
}
100% {
transform: translate3d(-200vw, 0, 0);
}
}
#keyframes marquee {
0% {
transform: translate3d(0, 0, 0);
}
100% {
transform: translate3d(-200vw, 0, 0);
}
}

Responsive table inside a card

I created a card using the bootstrap. Within that card I intend to insert a table with data.
My problem is that when reducing the screen (check responsiveness), the data in the table comes out of the card.
How can I solve this problem of mine, can someone help me?
Thanks
DEMO
.HTML
<div style="width:40%">
<div class="card">
<div class="card-header header">
<h1>My Table</h1>
</div>
<table class="card-table table-borderless myTable" style="overflow-y: auto; overflow-x: auto;">
<thead>
<tr>
<th scope="col tableTitles">Title</th>
<th scope="col tableTitles">Name</th>
<th scope="col tableTitles">ID</th>
<th scope="col tableTitles">Street</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let pr of Data; let a = index;" class="tableColor">
<td class="tableTitles">
{{pr.title}}
</td>
<td class="tableTitles">
{{pr.name}}
</td>
<td class="tableTitles">
{{pr.id}}
</td>
<td class="tableTitles">
{{pr.street}}
</td>
</tr>
</tbody>
</table>
</div>
</div>
.CS
.card {
margin-top: 16px;
margin-left: 16px;
height: 400px;
margin-right: 16px;
background: #FFFFFF 0% 0% no-repeat padding-box;
box-shadow: 0px 3px 20px #BCBCCB47;
border-radius: 8px;
opacity: 1;
border: 2px solid red;
}
.header {
width: 100%;
height: 40px;
background: #ECF2F9 0% 0% no-repeat padding-box;
border-radius: 8px 8px 0px 0px;
}
.header h1 {
text-align: center;
font-family: 'Noto Sans', sans-serif;
font-size: 14px;
letter-spacing: 0;
color: #4D4F5C;
}
Problem
Add
word-break: break-all;
to <table> in CSS and it will break words if necessary.
.card {
margin-top: 16px;
margin-left: 16px;
height: 400px;
margin-right: 16px;
background: #FFFFFF 0% 0% no-repeat padding-box;
box-shadow: 0px 3px 20px #BCBCCB47;
border-radius: 8px;
opacity: 1;
border: 2px solid red;
}
.header {
width: 100%;
height: 40px;
background: #ECF2F9 0% 0% no-repeat padding-box;
border-radius: 8px 8px 0px 0px;
}
.header h1 {
text-align: center;
font-family: 'Noto Sans', sans-serif;
font-size: 14px;
letter-spacing: 0;
color: #4D4F5C;
}
.card-table {
word-break: break-all;
}
<div _ngcontent-qii-c0="" style="width:20%">
<div _ngcontent-qii-c0="" class="card">
<div _ngcontent-qii-c0="" class="card-header header">
<h1 _ngcontent-qii-c0="">My Table</h1>
</div>
<table _ngcontent-qii-c0="" class="card-table table-borderless myTable" style="overflow-y: auto; overflow-x: auto;">
<thead _ngcontent-qii-c0="">
<tr _ngcontent-qii-c0="">
<th _ngcontent-qii-c0="" scope="col tableTitles">Title</th>
<th _ngcontent-qii-c0="" scope="col tableTitles">Name</th>
<th _ngcontent-qii-c0="" scope="col tableTitles">ID</th>
<th _ngcontent-qii-c0="" scope="col tableTitles">Street</th>
</tr>
</thead>
<tbody _ngcontent-qii-c0="">
<tr _ngcontent-qii-c0="" class="tableColor">
<td _ngcontent-qii-c0="" class="tableTitles"> asdasdad </td>
<td _ngcontent-qii-c0="" class="tableTitles"> asdasdas assd </td>
<td _ngcontent-qii-c0="" class="tableTitles"> 123123 </td>
<td _ngcontent-qii-c0="" class="tableTitles"> asdsadasdcas asdsad </td>
</tr>
</tbody>
</table>
</div>
</div>
I squeezed it a bit to show the result and used generated HTML from your demo, cause it's a CSS problem, so we don't need Angular here.

Stack order of hover element

I am trying to create a hover element that displays a table of data.
I am having trouble making the hover element stack above the main table.
I have tried several things, including fixing the position and adjusting the z-index but everything seems to break the formatting and position of the hover element (i.e it needs to be positioned relative to the text that is hovered over and needs to adjust in width and height).
Example: https://jsfiddle.net/f1hLrwvf/
span.own3 {
background: #FFFFFF;
opacity: 1;
border: 1px solid #DCDCDC;
color: #000000;
font-size: 12px;
height: auto;
width: auto;
min-width: 300px;
letter-spacing: 1px;
line-height: 14px;
position: absolute;
text-align: justify;
top: 20px;
left: 0px;
display: none;
padding: 2px 5px;
font-family: "Helvetica Neue", Arial, sans-serif;
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1), 0 3px 10px 0 rgba(0, 0, 0, 0.09);
}
hover.own2 {
position: relative;
}
hover.own2:hover span {
display: block;
}
.table.hoverstatus>tbody>tr:first-child>th {
border: none;
}
<div style="padding:15px;">
<div class="shadow p-3 mb-5 bg-white rounded table-responsive" style="border: 1px solid #F0F0F0;font-family: 'Poppins', sans-serif;font-size:14px;">
<table id="example" class="table table-striped" width="100%">
<thead>
<tr>
<th>Feeling</th>
<th>Day</th>
</tr>
</thead>
<tbody>
<tr>
<td>
Super
</td>
<td>1</td>
</tr>
<tr>
<td>
<hover class="own2">Great<span class="own3"><table class="table hoverstatus" id="innertable"><tr><th>Row1 Col1</th><th>Row1 Col2</th><th>Row1 Col3</th></tr><tr><td>Row2 Col1</td><td>Row2 Col2</td><td>Row2 Col3</td></tr></table></span></hover>
</td>
<td>2</td>
</tr>
</tbody>
</table>
</div>
</div>
Any guidance is greatly appreciated.
use position: absolute; instead position: relative;
Try code below:
span.own3 {
background: #FFFFFF;
opacity: 1;
border: 1px solid #DCDCDC;
color: #000000;
font-size: 12px;
height: auto;
width: auto;
min-width: 300px;
letter-spacing: 1px;
line-height: 14px;
position: absolute;
text-align: justify;
top: 20px;
left: 0px;
display: none;
padding: 2px 5px;
font-family: "Helvetica Neue", Arial, sans-serif;
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1), 0 3px 10px 0 rgba(0, 0, 0, 0.09);
}
hover.own2 {
position: absolute;
}
hover.own2:hover span {
display: block;
}
.table.hoverstatus>tbody>tr:first-child>th {
border: none;
}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.0/js/bootstrap.min.js"></script>
<div style="padding:15px;">
<div class="shadow p-3 mb-5 bg-white rounded table-responsive" style="border: 1px solid #F0F0F0;font-family: 'Poppins', sans-serif;font-size:14px;">
<table id="example" class="table table-striped" width="100%">
<thead>
<tr>
<th>Feeling</th>
<th>Day</th>
</tr>
</thead>
<tbody>
<tr>
<td>
Super
</td>
<td>1</td>
</tr>
<tr>
<td>
<hover class="own2">Great<span class="own3"><table class="table hoverstatus" id="innertable"><tr><th>Row1 Col1</th><th>Row1 Col2</th><th>Row1 Col3</th></tr><tr><td>Row2 Col1</td><td>Row2 Col2</td><td>Row2 Col3</td></tr></table></span></hover>
</td>
<td>2</td>
</tr>
</tbody>
</table>
</div>
</div>
You need to change some html markup as well as css
span.own3 {
background: #FFFFFF;
opacity: 1;
border: 1px solid #DCDCDC;
color: #000000;
font-size: 12px;
height: auto;
width: auto;
min-width: 300px;
letter-spacing: 1px;
line-height: 14px;
position: absolute;
text-align: justify;
top: 100%; // Changed to percentage instead of px
left: 0px;
display: none;
padding: 2px 5px;
font-family: "Helvetica Neue", Arial, sans-serif;
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1), 0 3px 10px 0 rgba(0, 0, 0, 0.09);
}
hover.own2 {
position: relative;
}
hover.own2:hover span {
display: block;
}
.table.hoverstatus>tbody>tr:first-child>th {
border: none;
}
.dd-label {
padding: 10px 0;
display: inline-block;
}
<div style="padding:15px;">
<div class="shadow p-3 mb-5 bg-white rounded table-responsive" style="border: 1px solid #F0F0F0;font-family: 'Poppins', sans-serif;font-size:14px;">
<table id="example" class="table table-striped" width="100%">
<thead>
<tr>
<th>Feeling</th>
<th>Day</th>
</tr>
</thead>
<tbody>
<tr>
<td>
Super
</td>
<td>1</td>
</tr>
<tr>
<td>
<hover class="own2">
<!-- wrap this label in a span tag -->
<span class="dd-label">Great</span>
<!-- span tag ends -->
<span class="own3"><table class="table hoverstatus" id="innertable"><tr><th>Row1 Col1</th><th>Row1 Col2</th><th>Row1 Col3</th></tr><tr><td>Row2 Col1</td><td>Row2 Col2</td><td>Row2 Col3</td></tr></table></span></hover>
</td>
<td>2</td>
</tr>
</tbody>
</table>
</div>
</div>
Working fiddle here
Hope it will help you :)

Table overflow scroll css doesn't work [duplicate]

This question already has answers here:
overflow:hidden not working when using tables
(4 answers)
Closed 5 years ago.
Here is some kinda complicated html table formatting I have:
http://jsfiddle.net/nyCKE/8517/
The problem is that the "Subject Areas" table does not work when I try to do overflow scroll. It has a height set to 200px, but when I add many rows to the table, it doesn't stay at 200, it just keeps extending the table. As you can see on the jsfiddle, I have tbody set to overflow-y scroll (I want the thead to be fixed). But, it refuses to scroll. The "Classes" table has no data so it stays at 200px. That is what I want the height of the subject areas table to be, but clearly it is bigger. Here is some of the relevant css:
tbody {
overflow-y scroll;
}
.subjects{
width:100%;
height: 200px;
}
.classes {
width:100%;
height: 200px;
margin-top: 5px;
}
Another thing I forgot to mention is I have 2 div's, one for left and one for right. The left div contains the subjects and classes tables. The right div contains the overview. This is for when the window is bigger and by extending the window in the fiddle, you can see that the overview table goes to the right, which is what I want. I am not sure if these div's mess up the tbody scrolling.
Does anyone know how to solve my problem?
Bug in your css:
tbody {
overflow-y scroll;
}
should be:
tbody {
overflow-y: scroll;
}
Solution to your problem: define your height directly at child and use display: block
tbody {
overflow-y: scroll;
display: block;
height: 200px;
}
body {
background: #6CD3F8;
/*background: -webkit-linear-gradient(top left, #6CD3F8 0%, #E0F7FE 100%);
background: linear-gradient(to bottom right, #6CD3F8 0%, #E0F7FE 100%);*/
}
h3 {
color: white;
text-align: left;
margin-top: 20px;
}
.scan {
padding: 0% 10%;
}
table {
background: #E0F7FE;
border-radius: 10px;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
}
table td,
table td * {
vertical-align: top;
}
tbody {
overflow-y: scroll;
display: block;
height: 200px;
}
th {
color: #265C82;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-weight: normal;
font-size: 17px;
padding-left: 5px;
padding-top: 5px;
}
td {
padding-left: 10px;
}
::-webkit-input-placeholder {
color: #00B2F3;
}
.search {
color: #00B2F3;
border: 0px solid red;
border-radius: 10px;
width: calc(100% - 10px);
height: 35px;
margin-top: 5px
}
.select {
width: calc(100% - 10px);
}
.icon {
width: 20px;
height: 20px;
margin: 2px 8px 0px 5px;
float: left;
}
hr {
border-color: #00B2F3;
margin: 3px 0;
width: calc(100% - 5px);
}
.subjects {
width: 100%;
height: 200px;
}
.classes {
width: 100%;
height: 200px;
margin-top: 5px;
}
.sections {
width: 100%;
height: 405px;
}
.left {
width: 50%;
float: left;
margin-right: 5px;
margin-bottom: 3%;
min-width: 300px;
}
.right {
width: calc(50% - 10px);
float: left;
min-width: 300px;
margin-bottom: 3%;
}
.mid {
width: 100%;
text-align: center;
float: left;
position: relative;
}
.wrapper {
width: 100%;
text-align: right;
float: left;
position: relative;
}
.logo {
max-width: 30%;
margin: 10px 0px;
}
.links > a {
color: rgba(255, 255, 255, 0.8);
font-size: 16px;
padding: 0px 10px;
}
.links {
/*padding-left: 100px;*/
padding-bottom: 10px;
}
<body>
<div class="scan">
<h3>Summer Session A</h3>
<!-- <div class="left">
left
</div> -->
<!-- <div class="right">
right
</div> -->
<div class="left">
<table class="subjects">
<thead>
<tr>
<th>
<div>Subject Areas</div>
<hr>
</th>
</tr>
<tr>
<th>
<input type="text" class="form-control search" onkeyup="searchFunction('subjects')" placeholder="Search...">
</th>
</tr>
</thead>
<tbody>
<tr>
<td>Computer Science</td>
</tr>
<tr>
<td>Mathematics</td>
</tr>
<tr>
<td>Engineering</td>
</tr>
<tr>
<td>Computer Science</td>
</tr>
<tr>
<td>Mathematics</td>
</tr>
<tr>
<td>Engineering</td>
</tr>
<tr>
<td>Computer Science</td>
</tr>
<tr>
<td>Mathematics</td>
</tr>
<tr>
<td>Engineering</td>
</tr>
<tr>
<td>Computer Science</td>
</tr>
<tr>
<td>Mathematics</td>
</tr>
<tr>
<td>Engineering</td>
</tr>
<!-- <select class="form-control" id="exampleSelect1">
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
</select> -->
<!-- <tr>
<td>
<select class="form-control select">
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
</select>
</td>
</tr> -->
</tbody>
</table>
<table class="classes">
<thead>
<tr>
<th>
Classes
<hr>
</th>
</tr>
</thead>
<tbody>
<tr>
<td></td>
</tr>
</tbody>
</table>
</div>
<div class="right">
<table class="sections">
<thead>
<tr>
<th>
Overview
<hr>
</th>
</tr>
</thead>
<tbody>
<tr>
<td></td>
</tr>
</tbody>
</table>
</div>
</div>
</body>
You can wrap the table in a container and give the height and overflow to the container.
body {
background: #6CD3F8;
/*background: -webkit-linear-gradient(top left, #6CD3F8 0%, #E0F7FE 100%);
background: linear-gradient(to bottom right, #6CD3F8 0%, #E0F7FE 100%);*/
}
h3 {
color: white;
text-align: left;
margin-top: 20px;
}
.scan {
padding: 0% 10%;
}
table {
background: #E0F7FE;
}
table,
.tableContainer {
border-radius: 10px;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
}
table td,
table td * {
vertical-align: top;
}
tbody {
overflow-y scroll;
}
th {
color: #265C82;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-weight: normal;
font-size: 17px;
padding-left: 5px;
padding-top: 5px;
}
td {
padding-left: 10px;
}
::-webkit-input-placeholder {
color: #00B2F3;
}
.search {
color: #00B2F3;
border: 0px solid red;
border-radius: 10px;
width: calc(100% - 10px);
height: 35px;
margin-top: 5px
}
.select {
width: calc(100% - 10px);
}
.icon {
width: 20px;
height: 20px;
margin: 2px 8px 0px 5px;
float: left;
}
hr {
border-color: #00B2F3;
margin: 3px 0;
width: calc(100% - 5px);
}
.subjectsContainer {
height: 200px;
overflow: scroll;
}
.subjects {
width: 100%;
}
.classes {
width: 100%;
height: 200px;
margin-top: 5px;
}
.sections {
width: 100%;
height: 405px;
}
.left {
width: 50%;
float: left;
margin-right: 5px;
margin-bottom: 3%;
min-width: 300px;
}
.right {
width: calc(50% - 10px);
float: left;
min-width: 300px;
margin-bottom: 3%;
}
.mid {
width: 100%;
text-align: center;
float: left;
position: relative;
}
.wrapper {
width: 100%;
text-align: right;
float: left;
position: relative;
}
.logo {
max-width: 30%;
margin: 10px 0px;
}
.links > a {
color: rgba(255, 255, 255, 0.8);
font-size: 16px;
padding: 0px 10px;
}
.links {
/*padding-left: 100px;*/
padding-bottom: 10px;
}
<body>
<div class="scan">
<h3>Summer Session A</h3>
<!-- <div class="left">
left
</div> -->
<!-- <div class="right">
right
</div> -->
<div class="left">
<div class="subjectsContainer tableContainer">
<table class="subjects">
<thead>
<tr>
<th>
<div>Subject Areas</div>
<hr>
</th>
</tr>
<tr>
<th>
<input type="text" class="form-control search" onkeyup="searchFunction('subjects')" placeholder="Search...">
</th>
</tr>
</thead>
<tbody>
<tr>
<td>Computer Science</td>
</tr>
<tr>
<td>Mathematics</td>
</tr>
<tr>
<td>Engineering</td>
</tr>
<tr>
<td>Computer Science</td>
</tr>
<tr>
<td>Mathematics</td>
</tr>
<tr>
<td>Engineering</td>
</tr>
<tr>
<td>Computer Science</td>
</tr>
<tr>
<td>Mathematics</td>
</tr>
<tr>
<td>Engineering</td>
</tr>
<tr>
<td>Computer Science</td>
</tr>
<tr>
<td>Mathematics</td>
</tr>
<tr>
<td>Engineering</td>
</tr>
<!-- <select class="form-control" id="exampleSelect1">
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
</select> -->
<!-- <tr>
<td>
<select class="form-control select">
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
</select>
</td>
</tr> -->
</tbody>
</table>
</div>
<table class="classes">
<thead>
<tr>
<th>
Classes
<hr>
</th>
</tr>
</thead>
<tbody>
<tr>
<td></td>
</tr>
</tbody>
</table>
</div>
<div class="right">
<table class="sections">
<thead>
<tr>
<th>
Overview
<hr>
</th>
</tr>
</thead>
<tbody>
<tr>
<td></td>
</tr>
</tbody>
</table>
</div>
</div>
</body>

full height of a div inside a table

Is it possible to align the following div's to be always on same position width and height on any webpage? I have try anything but I cannot manage to get it working. Something is not compatible in my code.
.content-box-gray .content {
overflow: hidden;
padding: 10px;
font-size: 15px;
border-bottom-left-radius: 5px;
border-bottom-right-radius: 5px;
border: 1px solid gray;
color: #3385FF;
}
.content-box-gray .title {
height: 30px;
line-height: 30px;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
background: gray;
font-size: 18px;
font-weight: bold;
font-family: verdana;
display: block;
color: white;
display: block;
padding: 10px;
border: 1px solid gray;
border-bottom: none;
}
<table width="100%" height="100%" border="0" cellspacing="5" cellpadding="5">
<tbody>
<tr>
<td colspan="2" rowspan="3">
<div class="content-box-orange">
<div class="titleorange">3</div>
<div class="content">Lorem Ipsum is simply dummy text</div>
</div>
</td>
</tr>
<tr style="height:100% ">
<td style="background-color: aqua;height: 50%">1</td>
</tr>
<tr>
<td style="background-color: aqua;height: 50%">2</td>
</tr>
<tr>
<td colspan="3" style="background-color: #FFF">4</td>
</tr>
<tr>
<td style="background-color: #FFF">5</td>
<td colspan="2" rowspan="2">
<div class="content-box-gray">
<div class="title">7</div>
<div class="content">Lorem Ipsum</div>
</div>
</td>
</tr>
<tr>
<td style="background-color: #FFF">6</td>
</tr>
</tbody>
</table>
jsfiddle
I cannot manage to fix it.
here is a pic alignment of divs
thank you very much!
Give the td a height of 100%. Then use the calc property to set the height of .content-box-orange .content
fiddle
I think that you could explore flexbox instead of table for this layout. Update your question if you are open to that...
html,
body {
height: 98%;
background-color: #E5E5E3
}
table tbody tr td {
height: 100%;
}
.content-box-gray .content {
overflow: hidden;
padding: 10px;
font-size: 15px;
border: 0px;
color: #3385FF;
background: #FFFFFF;
}
.content-box-gray .title {
height: 30px;
line-height: 30px;
background: #F1F1F1;
font-size: 18px;
font-weight: bold;
font-family: verdana;
display: block;
color: #464648;
display: block;
padding: 10px;
border: 0px;
border-bottom: none;
}
.content-box-orange {
height: 100%;
}
.content-box-orange .content {
overflow: hidden;
padding: 10px;
font-size: 15px;
border: 0px;
color: #000;
background: #FFFFFF;
height: calc(100% - 66px);
}
.titleorange {
height: 30px;
line-height: 30px;
background: #F78D27;
font-size: 18px;
font-weight: bold;
font-family: verdana;
display: block;
color: #FFF;
display: block;
padding: 10px;
border: 0px;
border-bottom: none;
}
<table width="100%" height="100%" border="0" cellspacing="5" cellpadding="5">
<tbody>
<tr>
<td colspan="2" rowspan="3">
<div class="content-box-orange">
<div class="titleorange">3</div>
<div class="content">Lorem Ipsum is simply dummy text</div>
</div>
</td>
</tr>
<tr style="height:100% ">
<td style="background-color: aqua;height: 50%">1</td>
</tr>
<tr>
<td style="background-color: aqua;height: 50%">2</td>
</tr>
<tr>
<td colspan="3" style="background-color: #FFF">4</td>
</tr>
<tr>
<td style="background-color: #FFF">5</td>
<td colspan="2" rowspan="2">
<div class="content-box-gray">
<div class="title">7</div>
<div class="content">Lorem Ipsum</div>
</div>
</td>
</tr>
<tr>
<td style="background-color: #FFF">6</td>
</tr>
</tbody>
</table>
Using Flexbox
Here is a rough guide to achieving the layout in your image using flexbox. Refer to caniuse for browser compatibility information. You can toggle properties in Chrome Dev tools to get an idea of how flexbox properties work if it's new to you.
fiddle
html {
box-sizing: border-box;
}
*,
*:before,
*:after {
box-sizing: inherit;
}
html {
height: 100%;
}
body {
background: #FFF;
font-family: sans-serif;
height: 100%;
margin: 0;
padding: 5px;
}
.box,
.main {
border: 5px solid #43c2eb;
}
.title--orange {
background: orange;
text-align: center;
padding: .4em;
margin: 0;
}
.wrapper {
display: flex;
flex-direction: column;
height: 100%;
}
.row {
display: flex;
min-height: 200px;
flex: 1 1 auto;
}
.box-wrap {
flex: 1 1 auto;
display: flex;
flex-direction: column;
}
.box {
margin: 5px;
display: flex;
flex-direction: column;
}
.box--big {
flex: 2 1 auto;
}
.box--small {
flex: 1 1 auto;
}
.main {
align-items: center;
justify-content: center;
margin: 5px;
}
.content {
flex-grow: 1;
display: flex;
justify-content: center;
align-items: center;
font-size: 22px;
}
<div class="wrapper">
<div class="row upper">
<div class="box box--big">
<h1 class="title--orange">div header</h1>
<div class="content">
content
</div>
</div>
<div class="box-wrap">
<div class="box box--small">
<div class="content">content</div>
<h2 class="title--orange">div header</h2>
</div>
<div class="box box--small">
<div class="content">content</div>
<h2 class="title--orange">div header</h2>
</div>
</div>
</div>
<div class="row main">
<div class="main__inner">content</div>
</div>
<div class="row lower">
<div class="box-wrap">
<div class="box box--small">
<div class="content">content</div>
</div>
<div class="box box--small">
<div class="content">content</div>
</div>
</div>
<div class="box box--big">
<h1 class="title--orange">div header</h1>
<div class="content">
content
</div>
</div>
</div>
</div>
Remove style attributes and width,height attributes on your HTML code, no need it if you use CSS.
Also dont use % on Width y if you want a static table.
<table width="100%" height="100%" border="0" cellspacing="5" cellpadding="5">
<tr style="height:100% ">
<td style="background-color: aqua;height: 50%">1</td>
Give style="height:100%;overflow:hidden;" to outer div and style="height:100%;" to content & td
html,
body {
height: 98%;
background-color: #E5E5E3
}
.content-box-gray .content {
overflow: hidden;
padding: 10px;
font-size: 15px;
border: 0px;
color: #3385FF;
background: #FFFFFF;
}
.content-box-gray .title {
height: 30px;
line-height: 30px;
background: #F1F1F1;
font-size: 18px;
font-weight: bold;
font-family: verdana;
display: block;
color: #464648;
display: block;
padding: 10px;
border: 0px;
border-bottom: none;
}
.content-box-orange .content {
overflow: hidden;
padding: 10px;
font-size: 15px;
border: 0px;
color: #000;
background: #FFFFFF;
}
.titleorange {
height: 30px;
line-height: 30px;
background: #F78D27;
font-size: 18px;
font-weight: bold;
font-family: verdana;
display: block;
color: #FFF;
display: block;
padding: 10px;
border: 0px;
border-bottom: none;
}
<table border="0" cellspacing="5" cellpadding="5">
<tbody>
<tr>
<td colspan="2" rowspan="3" style="height:100%;">
<div class="content-box-orange" style="height:100%;overflow:hidden;">
<div class="titleorange">3</div>
<div class="content" style="height:100%;">Lorem Ipsum is simply dummy text</div>
</div>
</td>
</tr>
<tr>
<td style="background-color: aqua;height: 50px">1</td>
</tr>
<tr>
<td style="background-color: aqua;height: 50px">2</td>
</tr>
<tr>
<td colspan="3" style="background-color: #FFF">4</td>
</tr>
<tr>
<td style="background-color: #FFF">5</td>
<td colspan="2" rowspan="2" style="height:100%;">
<div class="content-box-gray" style="height:100%;overflow:hidden;">
<div class="title">7</div>
<div class="content" style="height:100%;">Lorem Ipsum</div>
</div>
</td>
</tr>
<tr>
<td style="background-color: #FFF">6</td>
</tr>
</tbody>
</table>