Content disappears behind the menu - html

I have a gwt website and if I use the zoom function of my browser the content is displayed behind the menu. So no one can read the tables.
the used layout code looks like this:
<div id="globalContent" style="width: 100%;">
<table class="" cellspacing="0" cellpadding="0" style="width: 100%; height: 100%;">
<tbody>
<tr>
<td align="left" colspan="2" style="vertical-align: middle;">
<div id="headerContent"> </div>
</td>
</tr>
<tr>
<td align="left" style="vertical-align: top; width: 270px">
<div id="navigationContent" class="" style="float: left">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td align="left" style="vertical-align: top;">
<table class="navigationPanel" cellspacing="0" cellpadding="0" style="height: 100%;" aria-hidden="false"> /*menu goes here*/
</table>
</td>
</tr>
</tbody>
</table>
</div>
</td>
<td style="vertical-align: middle;">
<div id="mainContent" style="float: left; width: 100%">
<table class="bodyPanel" cellspacing="0" cellpadding="0" style="height: 775px;"> /* Content goes here /* </table>
</div>
</td>
</tr>
</tbody>
</table>
</div>
Edit: Css
#globalContent {
background-color: #F1F1F1;
}
.bodyPanel {
width: 100%;
height: 100%;
background-color: #F1F1F1;
margin-top: 70px;
position: absolute;
}
.navigationPanel { /*border: 2px Black;*/
width: 260px;
max-width: 260px;
height: 100%;
min-height: 800px;
background-color: #F1F1F1;
margin-right: 10px;
position: fixed;
z-index: 1;
margin-top: 70px;
}
When "navigationPanel" has position: fixed and mainContent has position: absolute.
The Content appears right of the menu but it ist 270px to width.
I have to support IE8 so I can't use CSS3 :-(

Related

Create and align 2 html tables

I want to create 2 tables with the opening hours of 2 shops. I would like them to align next to each other in the middle of the page when there is room for it. And otherwise, I want them to center align under each other? For some reason, this really isn't working.
I'm using a Saas solution and I don't have access to the css files so I need to use inline css?
Could someone help me with this?
<div style="width: 100%; padding: 5%; display: flex; justify-content: center;">
<div style="padding: 2%;">
<h3 style="text-align: center;">Rotterdam</h3>
<table style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap;">
<tbody>
<tr style="height: 15px; text-align: left;">
<td style="width: 50%; height: 15px;">Maandag</td>
<td style="width: 50%; height: 15px;">12:00 - 18:00</td>
</tr>
<tr style="height: 15px; text-align: left;">
<td style="width: 50%; height: 15px;">Dinsdag </td>
<td style="width: 50%; height: 15px;">10:00 - 18:00</td>
</tr>
<tr style="height: 15px; text-align: left;">
<td style="width: 50%; height: 15px;">Woensdag </td>
<td style="width: 50%; height: 15px;">10:00 - 18:00</td>
</tr>
<tr style="height: 15px; text-align: left;">
<td style="width: 50%; height: 15px;">Donderdag</td>
<td style="width: 50%; height: 15px;">10:00 - 18:00</td>
</tr>
<tr style="height: 15px; text-align: left;">
<td style="width: 50%; height: 15px;">Vrijdag</td>
<td style="width: 50%; height: 15px;">10:00 - 18:00</td>
</tr>
<tr style="height: 15px; text-align: left;">
<td style="width: 50%; height: 15px;">Zaterdag</td>
<td style="width: 50%; height: 15px;">10:00 - 17:30 </td>
</tr>
<tr style="height: 15px;">
<td style="width: 50%; height: 15px; text-align: left;">Zondag</td>
<td style="width: 50%; height: 15px; text-align: left;">12:00 - 17:30</td>
</tr>
</tbody>
</table>
</div>
<div style="padding: 2%;">
<h3 style="text-align: center;">Capelle a/d IJssel</h3>
<table style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap;">
<tbody>
<tr style="height: 13px; text-align: left; align: center;">
<td style="width: 50%; height: 13px;">Maandag</td>
<td style="width: 50%; height: 13px;">12:00 - 17:30</td>
</tr>
<tr style="height: 15px; text-align: left;">
<td style="width: 50%; height: 15px;">Dinsdag</td>
<td style="width: 50%; height: 15px;">09:30 - 17:30</td>
</tr>
<tr style="height: 15px; text-align: left;">
<td style="width: 50%; height: 15px;">Woensdag</td>
<td style="width: 50%; height: 15px;">09:30 - 17:30</td>
</tr>
<tr style="height: 15px; text-align: left;">
<td style="width: 50%; height: 15px;">Donderdag</td>
<td style="width: 50%; height: 15px;">09:30 - 17:30</td>
</tr>
<tr style="height: 15px; text-align: left;">
<td style="width: 50%; height: 15px;">Vrijdag</td>
<td style="width: 50%; height: 15px;">09:30 - 21:00</td>
</tr>
<tr style="height: 15px; text-align: left;">
<td style="width: 50%; height: 15px;">Zaterdag</td>
<td style="width: 50%; height: 15px;">09:30 - 17:00</td>
</tr>
<tr style="height: 15px;">
<td style="width: 50%; height: 15px; text-align: left;">Zondag</td>
<td style="width: 50%; height: 15px; text-align: left;">Gesloten</td>
</tr>
</tbody>
</table>
</div>
</div>
You just need to add
box-sizing: border-box;
to the main div: this is telling the browser to calculate the children width with the remaining width inside that div.
For the responsiveness you should use media queries to change the alignment

Overflow method not working in html page.

I am working on an assignment for school which is designing an app with HTML. I am having trouble with the contents of the apps bleeding over at the bottom when you scroll down. I tried various options of the overflow method and nothing seems to work. I included the entire css and html. Thanks to anyone who takes the time to help me out!
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<link rel="stylesheet" href="CSS/reset.css">
<link rel="stylesheet" href="CSS/style.css">
<link href=https://fonts.googleapis.com/css?family='Roboto' rel='stylesheet'>
</head>
<body>
<div id="table-wrapper">
<div id="table-scroll">
<section class="container">
<nav>
<img src="images/status bar.png" width="360" height="24" alt=""/>
<div class="app-bar">
<table width="100%" border="0">
<tbody>
<tr>
<td class="ham-menu"><img src="images/menu.png" width="24" height="24" alt=""/></td>
<td class="title">Washington at State Station</td>
<td class="search-icon"><img src="images/search.png" width="24" height="24" alt=""/></td>
<td class="icon"><img src="images/menu-item.png" width="5" height="24" alt=""/></td>
</tr>
</tbody>
</table>
</div>
<div class="route-bar"><table width="100%" border="0">
<tbody>
<tr>
<td class="lines"><h2>Line</h2></td>
<td class="dest"><h2>Destination</h2></td>
<td class="times"><h2>Arrival</h2></td>
</tr>
</tbody>
</table>
</div>
</nav>
<section class="bus-list">
<div class="info">
<table width="100%" border="0">
<tbody>
<tr>
<td class="lines"><h1>124</h1></td>
<td class="dest"><h1>Eastbound</h1>
<h3>Navy Pier</h3></td>
<td class="times"><h1>5 Min</h1>
<h3>Freq. 10 min</h3>
</td>
</tr>
</tbody>
</table>
</div>
<div class="info">
<table width="100%" border="0">
<tbody>
<tr>
<td><h1>124</h1></td>
<td class="dest"><h1>Southbound</h1> <h3>Navy Pier</h3></td>
<td class="times"><h1>10 Min</h1>
<h3>Freq. 10 min</h3>
</td>
</tr>
</tbody>
</table>
</div>
<div class="info">
<table width="100%" border="0">
<tbody>
<tr>
<td><h1>J14</h1></td>
<td class="dest"><h1>Southbound</h1>
<h3>103rd/Stony Island</h3></td>
<td class="times"><h1>15 Min</h1>
<h3>Freq. 15 min</h3></td>
</tr>
</tbody>
</table>
</div>
<div class="info">
<table width="100%" border="0">
<tbody>
<tr>
<td class="lines"><h1>151</h1></td>
<td class="dest"><h1>Northbound</h1>
<h3>Devon/Clark</h3></td>
<td class="times"><h1>16 Min</h1>
<h3>Freq. 16 min</h3></td>
</tr>
</tbody>
</table>
</div>
<div class="info">
<table width="100%" border="0">
<tbody>
<tr>
<td class="lines"><h1>60</h1></td>
<td class="dest"><h1>Eastbound</h1>
<h3>Randolph/Harbor Dr</h3></td>
<td class="times"><h1>18 Min</h1>
<h3>Freq. 20 min</h3></td>
</tr>
</tbody>
</table>
</div>
<div class="info">
<table width="100%" border="0">
<tbody>
<tr>
<td class="lines"><h1>6X</h1></td>
<td class="dest"><h1>Reroute</h1>
<h3>Jackson Park Express</h3>
</td>
<td class="times"><h1>30 Min</h1>
<h3>Freq. N/A</h3></td>
</tr>
</tbody>
</table>
</div>
<div class="info">
<table width="100%" border="0">
<tbody>
<tr>
<td class="lines"><h1>4</h1></td>
<td class="dest"><h1>Out of Service</h1>
<h3>Cottage Grove</h3>
<h3>Resumes 12:10 am</h3></td>
<td class="alert">
</td>
</tr>
</tbody>
</table>
</div>
<div class="info">
<table width="100%" border="0">
<tbody>
<tr>
<td class="lines"><h1>20</h1></td>
<td class="dest"><h1>Out of Service</h1>
<h3>Madison</h3>
<h3>Resumes 12:10 am</h3></td>
</td>
<td class="alert">
</td>
</tr>
</tbody>
</table>
</div>
<div class="info">
<table width="100%" border="0">
<tbody>
<tr>
<td class="lines"><h1>157</h1></td>
<td class="dest"><h1>Out of Service</h1>
<h3>Streeterville/Taylor</h3>
<h3>Resumes 6:00 am</h3></td>
<td class="alert">
</td>
</tr>
</tbody>
</table>
</div>
</section>
<footer class="footer"></footer>
</section>
</div>
</div>
</body>
</html>
CSS
*, *:before, *:after {
box-sizing: border-box;
}
body {
background-color: #6E6C6C;
font-family: 'Roboto';
font-size: 16px;
color: #ffffff;
margin-top: 75px;
}
#table-wrapper {
position: relative;
}
#table-scroll {
height: 647px;
overflow: auto;
}
h1 {
font-size: 18px;
font-weight:600;
line-height: 1.3em;
color:#02356A;
}
h3 {
font-size: 14px;
font-weight: 400;
line-height: 1.3em;
color:#02356A;
}
.container {
margin: 0 auto;
width: 360px;
height: 667px;
}
nav {
margin: 0 auto;
position: fixed;
width: 360px;
height: 111px;
background-color: #164F9C;
}
.bus-list {
padding-top: 158px;
width: 100%;
padding-bottom: 50px;
}
.info {
text-align: left;
padding: 16px;
width: 100%;
background-color: #e5edf2;
border-bottom: thin #000000 solid;
}
.info:hover {
background-color: #81aef1;
}
.content {
width: 90%;
display:inline-block;
}
.icon {
width: 4px;
padding-left: 24px;
}
.title {
font-size: 20px;
color: #ffffff;
width: 180px;
padding-left: 32px;
vertical-align: middle;
line-height: 1.3em;
}
.ham-menu {
width: 24px;
}
.search-icon {
padding-left: 24px;
width: 24px;
}
.app-bar {
padding: 16px;
}
.route-bar {
background-color:#02356A;
height: 48px;
width: 360px;
text-align: left;
padding: 16px;
}
.lines {
text-align: left;
width: 100px;
}
.dest {
width: 37%;
}
.times {
width: 27%;
text-align: right;
}
.bottom-bar {
background-color: #000000;
margin-top: 425px;
}
.alert {
background-image: url(file:///C:/Users/Steve/bloc/frontend/images/alerts.png);
background-repeat: no-repeat;
background-size: 42px 38px;
background-position: right;
width: 27%;
}
.footer {
position: fixed;
background-color: #000000;
width: 360px;
bottom: 37px;
height: 48px;
background-image:url(file:///C:/Users/Steve/bloc/frontend/images/bottom-bar.png);
background-size: cover;
}
You have a bottom: 37px; in your CSS in the footer. Set this to 0px and you won't see the element under it anymore.

Can´t set div width inside table row

I´m sure this is the most stupid question for HTML developers. But I´m not one of them.
I have the following table and I need to get the three rounded images inside the table to be a circle and not like they are showing. I cannot get them to be rounded even if I have set width to be on 50px. The divs are like 'filling' the table row. I´m sure that what I ´m trying to do is pretty easy. Can someone help me?:
This is the HTML Code:
<div style="align-items:center; text-align: center; width:300px; height:200px; margin:0 auto">
<table border="1">
<tbody><tr style="height: 200px">
<td style="height: 200px; width: 300px;" colspan="3" align="center" valign="middle">
<div style="background-color: red; width: 150px; height: 150px; border-radius: 25px; border-bottom-left-radius:50%; border-bottom-right-radius:50%; border-top-left-radius:50%; border-top-right-radius:50%;">
</div></td>
</tr>
<tr>
<td colspan="3">
<h3 class="col-md-12 text-center" style="align-items: center">
Cantidad de Gente: <strong>Poca</strong>
</h3>
</td>
</tr>
<tr style="height: 50px; padding-top: 10px;">
<td style="height: 50px; width: 50px;">
<div style="background-color: green; width: 100%; height: 100%; border-radius: 25px; border-bottom-left-radius:50%; border-bottom-right-radius:50%; border-top-left-radius:50%; border-top-right-radius:50%;">
</div></td>
<td style="height: 50px; width: 50px;">
<div style="background-color: yellow; width: 100%; height: 100%; border-radius: 25px; border-bottom-left-radius:50%; border-bottom-right-radius:50%; border-top-left-radius:50%; border-top-right-radius:50%;">
</div></td>
<td style="height: 50px; width: 50px;">
<div style="background-color: red; width: 100%; height: 100%; border-radius: 25px; border-bottom-left-radius:50%; border-bottom-right-radius:50%; border-top-left-radius:50%; border-top-right-radius:50%; ">
</div></td>
</tr>
<tr>
<td>
Poco
</td>
<td>
Mediana
</td>
<td>
Mucho
</td>
</tr>
</tbody></table>
</div>
If you put the 50px height and 50px width on the circle itself instead of it's container you will get a perfect circle. I also added margin:0 auto to center them but you may not need this.
<div style="align-items:center; text-align: center; width:300px; height:200px; margin:0 auto">
<table border="1">
<tbody><tr style="height: 200px">
<td style="height: 200px; width: 300px;" colspan="3" align="center" valign="middle">
<div style="background-color: red; width: 150px; height: 150px; border-radius: 25px; border-bottom-left-radius:50%; border-bottom-right-radius:50%; border-top-left-radius:50%; border-top-right-radius:50%;">
</div></td>
</tr>
<tr>
<td colspan="3">
<h3 class="col-md-12 text-center" style="align-items: center">
Cantidad de Gente: <strong>Poca</strong>
</h3>
</td>
</tr>
<tr style="height: 50px; padding-top: 10px;">
<td style="height: 50px; width: 50px;">
<div style="background-color: green; width: 50px; height: 50px; border-radius: 50%;margin:0 auto;">
</div></td>
<td style="height: 50px; width: 50px;">
<div style="background-color: yellow; width: 50px; height: 50px; border-radius: 50%;margin:0 auto;">
</div></td>
<td style="height: 50px; width: 50px;">
<div style="background-color: red; width: 50px; height:50px; border-radius: 50%; margin:0 auto;">
</div></td>
</tr>
<tr>
<td>
Poco
</td>
<td>
Mediana
</td>
<td>
Mucho
</td>
</tr>
</tbody></table>
</div>
The table you created has width 300px, whereas the row with three circle you are defining has width 50px each i.e. 150px total. And since the table row element suppose to fill the table width, it is stretching your row to 300px. You need to increase the width and height of row td element to 100px to make cover the whole row or if you want the circle strictly 25px radius then you can add padding to your td element.

Firefox renders table incorrect with multiple rowspan and colspan

The following code works well in Chrome and IE, but does not working in Firefox.
The table is generated dynamically and tr/td can't be removed from the following example
.widget-table-container,
tr td {
border: 1px solid red;
}
.widget {
border: 1px solid green;
margin: 0px;
padding: 0px;
background-color: #ffffff;
border-radius: 5px;
overflow: hidden;
height: 100%;
width: 100%;
left: 1px;
top: 1px;
bottom: 0px;
right: 0px;
}
<table class="widget-table-container">
<tbody>
<tr>
<td colspan="2" rowspan="2" style="width: 378px; height: 378px;">
<div class="widget" style="width: 371px; height: 371px; background-color:lightblue;">
<div class="widget-title">
<p>Title</p>
</div>
<div class="widget-body"></div>
</div>
</td>
<td colspan="8" rowspan="4" style="width: 1512px; height: 756px;">
<div class="widget" style="width: 1493px; height: 745px;">
<div class="widget-title">Title CPU</p>
</div>
<div class="widget-body">BODY</div>
</div>
</td>
</tr>
<tr>
</tr>
<tr>
<td colspan="2" rowspan="2" style="width: 378px; height: 378px;">
<div class="widget" style="width: 371px; height: 371px;">
<div class="widget-title">
<p>Some Title</p>
</div>
<div class="widget-body"></div>
</div>
</td>
</tr>
<tr></tr>
</tbody>
</table>
I have removed last empty and it looks like fixed problem.
I'm not sure why only removing last tr fixed problem not all tr.
But i my case it is working, Thanks All for help.

Unexplained Extra Space, Possibly Padding Surrounding a Table within a Table

This is an experiment I'm working on for a layout. I had a lot of issues positioning divs to achieve this effect, so I turned to the old standby, table cascades. My problem here is that that last upper box has extra padding in all 3 browsers and I cannot seem to CSS or HTML it away no matter what I try. The red boxes should be flush over the green bits you see surrounding them and there shouldn't be a 1px visible green line to the right of the blue row between the red boxes. Any insight would be extremely appreciated.
<!doctype html>
<html>
<head>
<style>
table { border-collapse: collapse; border-spacing: 0; padding: 0; margin: 0;}
td table { border-collapse: collapse; border-spacing: 0; padding: 0; margin: 0;}
img { display: block; }
</style>
</head>
<body style="background-color: black;">
<table style="background-color: white; height: 525px; width: 3200; padding-top: 25px; padding-bottom: 25px;">
<tr>
<td colspan="1" style="width: 350px;">
<table class="container" style="height: 475px; width: 350px; margin-left: 25px; margin-right: 25px;">
<tr>
<td style="background-color: green; height: 225px; width: 350px;" colspan="3">
</td>
</tr>
<tr>
<td style="background-color: blue; height: 25px; width: 350px;" colspan="3">
</td>
</tr>
<tr>
<td style="background-color: green; height: 200px; width: 175px;">
</td>
<td style="background-color: blue; height: 200px; width: 25px;">
</td>
<td style="background-color: green; height: 200px; width: 125px;">
</td>
</tr>
</table>
</td>
<td colspan="1" style="width: 125px;">
<table class="container" style="height: 475px; width: 125px; margin-right: 25px;">
<tr>
<td style="background-color: red; height: 475px; width: 125px;">
</td>
</tr>
</table>
</td>
<td colspan="1">
<table class="container" style="height: 475px; width: 450px; margin-right: 25px;">
<tr>
<td style="background-color: green; height: 25px; width: 225px;">
</td>
<td style="background-color: blue; height: 225px; width: 25px;" >
</td>
<td style="background-color: green; height: 225px; width: 225px;" >
</td>
</tr>
<tr>
<td style="background-color: blue; height: 25px; width: 450px;" colspan="3">
</td>
</tr>
<tr>
<td style="background-color: green; height: 200px; width: 450px;" colspan="3">
</td>
</tr>
</table>
</td>
<td colspan="1">
<table class="container" style="height: 475px; width: 400px; margin-right: 25px;">
<tr style="height: 225px;">
<td style="background-color: green; height: 225px; width: 275px;">
<table style="width: 100%; height: 225px;">
<tr>
<td style="height: 100px; width: 225px; background-color: red;">
</td>
</tr>
<tr>
<td style="background-color: blue; height: 25px; width: 225px;">
</td>
</tr>
<tr>
<td style="height: 100px; width: 225px; background-color: red;">
</td>
</tr>
</table>
</td>
<td style="background-color: blue; height: 225px; width: 25px;" >
</td>
<td style="background-color: green; height: 225px; width: 100px;" >
</td>
</tr>
<tr>
<td style="background-color: blue; height: 25px; width: 400px;" colspan="3">
</td>
</tr>
<tr>
<td style="background-color: green; height: 200px; width: 400px;" colspan="3">
</td>
</tr>
</table>
</td>
</table>
</td>
</table>
</body>
</html>
Do you mean this?
http://jsfiddle.net/Nq8Us/1/
I've edited your code and removed the extra 'padding' of green under red in question, by removing inline-styling, then added some styles in css pointing to the #problem_cell_table.
I suggest you remove all your inline styling and shift them to the stylesheet. Inline-styling overrides all stylesheet code. That's bad and also explains why you don't get any effect from stylesheet changes.
As to why there's a padding, it's because your main table's height that is wrapping all the rows, cells, and inner-tables, is higher than the declared row height added together. The cells in your all the rows automatically adjusts it's size to compensate for pixels that doesn't add up to your total declared of 525px.
In the example I've done, I "cheated" by setting css of the inner-table to height: 100% so it will expand to fit the height, should miscalculations occur.
Give me a moment, I'll add more to the <div> styling methods in my answer.
Edit:
Ok here my attempt at the layout using <div> and CSS. http://jsfiddle.net/XbFcJ/
Remember to use a CSS Reset Stylesheet first!
The CSS:
<style>
body{
background: black;
}
.wrapper{
}
.container{
width: 1500px;
}
.content-table {
border: 25px solid #fff;
overflow: hidden;
background: #fff;
}
.content-column {
margin-right: 25px;
float: left;
height: 475px;
}
.content-column.last {
margin-right: 0;
}
.first, .third, .last {
width: 425px;
background-color: green;
margin-right: 25px;
}
.top{
height: 225px;
border-bottom: 25px solid blue;
}
.left {
height: 225px;
width: 200px;
border-right: 25px solid blue;
}
.content-column.second {
width: 100px;
background-color: red;
}
.last .left {
background-color: red;
}
.last .left .top {
height: 100px;
border-bottom: 25px solid blue;
}​
</style>
The HTML:
<body>
<div class="wrapper">
<div class="container">
<div class="content-table">
<div class="content-column first">
<div class="top">
</div>
<div class="bottom">
<div class="left">
</div>
</div>
</div>
<div class="content-column second">
</div>
<div class="content-column third">
<div class="top">
<div class="left">
</div>
</div>
<div class="bottom">
</div>
</div>
<div class="content-column last">
<div class="top">
<div class="left">
<div class="top">
</div>
</div>
</div>
<div class="bottom">
</div>
</div>
</div>
</div>
</div>
</body>​