Currently I'm learning about HTML/CSS, I want to create a blog in windows 8 style (metro style). But I have a problem in disabling the overflow-y. I'm using a table in <body> of html with a fixed size of each table data. But whenever I add a cell into a row in the table, if the row is overflow in x direction, that cell automatically jump down.
Is there anyway to avoid this?
this is a part of my code:
CSS:
/***Creating the dashboard in metro style***/
.dashboard {
position: fixed;
top: 10.5em;
left: 0;
padding-top: 1em;
padding-left: 1em;
padding-bottom: 1em;
border: 5px solid white;
overflow-x: scroll;
overflow-y:hidden;
}
td {
border: 3px solid yellow;
float: left;
margin: 0;
color: black;
width: 300px;
font-size: 1.5em;
cursor: pointer;
position: relative;
background-color: white;
}
.tile-1{
background-color: #56d9c9;
color: white;
}
HTML:
<div class="dashboard">
<table style="border: 1px solid red">
<tr>
<td><p>I just got you babe 1</p></td>
<td><p>I just got you babe 2</p></td>
<td><p>I just got you babe 3</p></td>
<td><p>I just got you babe 4</p></td>
<td><p>I just got you babe 5</p></td>
<td><p>I just got you babe 6</p></td>
</tr>
<tr>
<td><p>I just got you babe 7</p></td>
<td><p>I just got you babe 8</p></td>
<td><p>I just got you babe 9</p></td>
<td><p>I just got you babe 10</p></td>
<td><p>I just got you babe 11</p></td>
<td><p>I just got you babe 12</p></td>
</tr>
<tr>
<td><p>I just got you babe 13</p></td>
<td><p>I just got you babe 14</p></td>
<td><p>I just got you babe 15</p></td>
<td><p>I just got you babe 16</p></td>
<td><p>I just got you babe 17</p></td>
<td><p>I just got you babe 18</p></td>
<td><p>I just got you babe 19</p></td>
<td><p>I just got you babe 20</p></td>
</tr>
</table>
</div>
colspanon them.table.