Why I can't scroll down on my page - html

I can't scroll down on my page, i have looked for the overflow property to change it from hidden to scroll but its still not working.
I hope someone can help me with this frustrating problem...
I have pasted all my css files in the overflow editor so you guys can see what is going wrong.
Here is my source code:
body {
font-family: sans-serif;
font-size: 16px;
font-weight: 400;
overflow: scroll;
}
div.gallery1 {
border: 5px solid #2f354e;
border-radius: 10px;
width: 300px;
background: #17c;
}
div.table-title {
display: block;
max-width: 600px;
padding:5px;
width: 100%;
}
.table-title h3 {
color: #000;
font-size: 30px;
font-weight: 400;
font-style: normal;
font-family: Helvetica, arial, sans-serif;
text-transform: uppercase;
}
.table-fill {
background: white;
border-radius:3px;
border-collapse: collapse;
height: 320px;
max-width: 600px;
padding:5px;
width: 100%;
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
animation: float 5s infinite;
}
th {
color:#D5DDE5;
background:#1b1e24;
border-bottom:4px solid #9ea7af;
border-right: 1px solid #343a45;
font-size:23px;
font-weight: 100;
padding:24px;
text-align:left;
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
vertical-align: middle;
}
th:first-child {
border-top-left-radius: 3px;
}
th:last-child {
border-top-right-radius: 3px;
border-right: none;
}
tr {
border-top: 1px solid #C1C3D1;
border-bottom-: 1px solid #C1C3D1;
color:#666B85;
font-size:16px;
font-weight:normal;
text-shadow: 0 1px 1px rgba(256, 256, 256, 0.1);
}
tr:hover td {
background:#4E5066;
color:#FFFFFF;
border-top: 1px solid #22262e;
}
tr:first-child {
border-top:none;
}
tr:last-child {
border-bottom:none;
}
tr:last-child td:first-child {
border-bottom-left-radius:3px;
}
tr:last-child td:last-child {
border-bottom-right-radius:3px;
}
td {
background:#FFFFFF;
padding:20px;
text-align:left;
vertical-align:middle;
font-weight:300;
font-size:18px;
text-shadow: -1px -1px 1px rgba(0, 0, 0, 0.1);
border-right: 1px solid #C1C3D1;
}
td:last-child {
border-right: 0px;
}
th.text-left {
text-align: left;
}
th.text-center {
text-align: center;
}
th.text-right {
text-align: right;
}
td.text-left {
text-align: left;
}
td.text-center {
text-align: center;
}
td.text-right {
text-align: right;
}
/**********************/
body {
margin: 0;
padding: 0;
/* Location of the image */
background-image: url("http://kb4images.com/images/red-wallpaper-hd/37940982-red-wallpaper-hd.jpg");
/* Background image is centered vertically and horizontally at all times */
background-position: center center;
/* Background image doesn't tile */
background-repeat: no-repeat;
/* Background image is fixed in the viewport so that it doesn't move when
the content's height is greater than the image's height */
background-attachment: fixed;
/* This is what makes the background image rescale based
on the container's size */
background-size: cover;
/* Set a background color that will be displayed
while the background image is loading */
background-color: #464646;
}
h1 {
color: white;
}
p {
font-family: Impact, Charcoal, sans-serif;
font-size: 20px;
}
/**********************/
/*------Nav-------*/
header {
width:100%;
position: fixed;
}
header nav {
width:100%;
background:#2f354e;
}
.menu_bar {
display:none;
}
header nav ul {
overflow:hidden;
list-style:none;
margin: 0px;
padding: 0px;
}
header nav ul li {
float:left;
}
header nav ul li a {
color:#fff;
padding:14px;
display:block;
text-decoration:none;
}
header nav ul li span {
margin-right:10px;
}
header nav ul li a:hover {
background:red;
text-decoration: none;
color:#ffffff;
}
#media screen and (max-width:800px ) {
header nav {
width:150px;
height:100%;
left:-100%;
margin:0px;
position: fixed;
}
header nav ul li {
display:block;
float:left !important
}
.menu_bar {
display:block;
width:100%;
background:#ccc;
text-align:center;
}
.menu_bar .bt-menu {
display:block;
padding:20px;
background:#2f354e;
color:#fff;
text-decoration:none;
font-weight: bold;
font-size:25px;
-webkit-box-sizing:border-box;
-moz-box-sizing:border-box;
box-sizing:border-box;
}
.menu_bar span {
float:right;
font-size:30px;
}
}
/*--------End of the nav-------*/
/*-------- Generic styles-------*/
body{
overflow: scroll;
margin:0px;
font-family: sans-serif;
}
/*-------- Generic styles-------*/
body {
color: #fff;
}
footer {
background: #2f354e;
bottom: 0;
left: 0;
padding: 20px 0;
position: fixed;
right: 0;
text-align: center;
}
<!DOCTYPE html>
<html>
<title>test</title>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" type="image/png" href="favicon/popcorn-32.png">
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="css/index.css">
<link rel="stylesheet" href="css/loader.css">
<link rel="stylesheet" href="css/footer.css">
<link rel="stylesheet" href="css/filmtoevoegen.css">
<script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src="js/index.js"></script>
<script src="js/loader.js"></script>
</head>
<body>
<header>
<div class="menu_bar">
<span class="fa fa-bars"></span>test
</div>
<nav>
<ul>
<li><span class="fa fa-home"></span>Admin dashboard</li>
<li style="float:right"><span class="fa fa-sign-out"></span>Loguit</li>
</ul>
</nav>
</header>
<br>
<br>
<br>
<br>
<br>
<center>
<div class="gallery1">
<h3>Film toevoegen</h3>
</div>
<br>
<br>
<table class="table-fill">
<thead>
<tr>
<th class="text-left">Film:</th>
<th class="text-left">Sales</th>
</tr>
</thead>
<tbody class="table-hover">
<tr>
<td class="text-left">Genre:</td>
<td class="text-left">$ 50,000.00</td>
</tr>
<tr>
<td class="text-left">Film omschrijving:</td>
<td class="text-left">$ 10,000.00</td>
</tr>
<tr>
<td class="text-left">Datum van uitkomst:</td>
<td class="text-left">$ 85,000.00</td>
</tr>
<tr>
<td class="text-left">Datum uit bioscoop:</td>
<td class="text-left">$ 56,000.00</td>
</tr>
<tr>
<td class="text-left">Film draai dagen:</td>
<td class="text-left">$ 98,000.00</td>
</tr>
<tr>
<td class="text-left">Zaal:</td>
<td class="text-left">$ 98,000.00</td>
</tr>
<tr>
<td class="text-left">Film afbeelding:</td>
<td class="text-left">$ 98,000.00</td>
</tr>
</tbody>
</table>
</center>
<footer>© Copyright test</footer>
</body>
</html>

Your footer is positioned with fixed position, that's why it is overlapping with your content of body.
In case of setting position fixed for header/footer, make sure to set padding of the body in top/bottom respectively.
So in this case setting the padding-bottom of the body to the height of the footer will make the content visible.
add below css line to your body tag.
body {
padding-bottom:58px; /* height of the footer */
}

you might need to reset the overflow-x to hidden html{ overfloq-x:hidden; }

Related

Background Color in CSS Going Over in Table

In my HTML project, I set the background color of a table tr to white, but it goes over the edge of the table with padding = 10px;
<!DOCTYPE html>
<html>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>--!</title>
<link href="https://fonts.googleapis.com/css2?family=Kumbh+Sans:wght#300&display=swap" rel="stylesheet">
<style>
body {
margin: 0;
background-color: #e8e8e8;
font-family: 'Kumbh Sans', sans-serif;
}
.topnav {
background-color: #11a642;
overflow: hidden;
}
.topnav a {
float: left;
color: #f2f2f2;
text-align: center;
padding: 18px 20px;
text-decoration: none;
font-size: 17px;
}
.topnav a:hover {
background-color: #0a6127;
}
.topnav a.active {
background-color: #11a642;
color: white;
}
.topnav a.active:hover {
background-color: #0a6127;
}
#noCss {
display: none;
}
#page {
margin-left: 50px;
margin-right: 50px;
}
tr, td {
border: 1px solid black;
}
table {
width: 100%;
}
.box {
width: 100%;
padding: 10px;
background-color: white;
}
</style>
<body>
<div class = "topnav">
<b>--</b>
My Folders
Search
Sign up
Log In
</div>
<br><br>
<center>
<div id="noCss" style="background-color: #a7ab35;width: 70%; border: 1px solid black;">
<br>
<h2>⚠️ Uh-oh ⚠️</h2>
It looks like the CSS didn't load. Please reload the page.
<br><br><span style="color:#a7ab35;">.</span>
</div>
</center>
<div id="page">
<h2>--</h2>
<table>
<tr>
<td><div class="box">
hi
</div></td>
</tr>
</table>
</div>
</body>
</html>
Notice when you run it the white background sticks out.
Image of background going over edge
How can I fix this?
try this
You given here width:100%;padding:10px; makes
width = 100% + 20px (both left and right)
so, one method to using calc() in CSS to minus 20px padding
.box {
padding: 10px;
background-color: white;
width: calc(100% - 20px); // minus padding of both left and right
}
<!DOCTYPE html>
<html>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>--!</title>
<link href="https://fonts.googleapis.com/css2?family=Kumbh+Sans:wght#300&display=swap" rel="stylesheet">
<style>
body {
margin: 0;
background-color: #e8e8e8;
font-family: 'Kumbh Sans', sans-serif;
}
.topnav {
background-color: #11a642;
overflow: hidden;
}
.topnav a {
float: left;
color: #f2f2f2;
text-align: center;
padding: 18px 20px;
text-decoration: none;
font-size: 17px;
}
.topnav a:hover {
background-color: #0a6127;
}
.topnav a.active {
background-color: #11a642;
color: white;
}
.topnav a.active:hover {
background-color: #0a6127;
}
#noCss {
display: none;
}
#page {
margin-left: 50px;
margin-right: 50px;
}
tr, td {
border: 1px solid black;
}
table {
width: 100%;
}
.box {
width: calc(100% - 20px);
padding: 10px;
background-color: white;
}
</style>
<body>
<div class = "topnav">
<b>--</b>
My Folders
Search
Sign up
Log In
</div>
<br><br>
<center>
<div id="noCss" style="background-color: #a7ab35;width: 70%; border: 1px solid black;">
<br>
<h2>⚠️ Uh-oh ⚠️</h2>
It looks like the CSS didn't load. Please reload the page.
<br><br><span style="color:#a7ab35;">.</span>
</div>
</center>
<div id="page">
<h2>--</h2>
<table>
<tr>
<td><div class="box">
hi
</div></td>
</tr>
</table>
</div>
</body>
</html>
Or
no need to assign width:100%; actually in here one having given width:100%
so just remove the width:100%;
<!DOCTYPE html>
<html>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>--!</title>
<link href="https://fonts.googleapis.com/css2?family=Kumbh+Sans:wght#300&display=swap" rel="stylesheet">
<style>
body {
margin: 0;
background-color: #e8e8e8;
font-family: 'Kumbh Sans', sans-serif;
}
.topnav {
background-color: #11a642;
overflow: hidden;
}
.topnav a {
float: left;
color: #f2f2f2;
text-align: center;
padding: 18px 20px;
text-decoration: none;
font-size: 17px;
}
.topnav a:hover {
background-color: #0a6127;
}
.topnav a.active {
background-color: #11a642;
color: white;
}
.topnav a.active:hover {
background-color: #0a6127;
}
#noCss {
display: none;
}
#page {
margin-left: 50px;
margin-right: 50px;
}
tr, td {
border: 1px solid black;
}
table {
width: 100%;
}
.box {
padding: 10px;
background-color: white;
}
</style>
<body>
<div class = "topnav">
<b>--</b>
My Folders
Search
Sign up
Log In
</div>
<br><br>
<center>
<div id="noCss" style="background-color: #a7ab35;width: 70%; border: 1px solid black;">
<br>
<h2>⚠️ Uh-oh ⚠️</h2>
It looks like the CSS didn't load. Please reload the page.
<br><br><span style="color:#a7ab35;">.</span>
</div>
</center>
<div id="page">
<h2>--</h2>
<table>
<tr>
<td><div class="box">
hi
</div></td>
</tr>
</table>
</div>
</body>
</html>

Navbar fits on most pages except one

The navbar on my homepage is cropping out my last link while on my other pages it works perfectly fine.
Excuse the extraneous code for all of this, this is all new to me.
html {
height: 100%;
margin: 0;
width: 100%;
overflow: auto;
}
/* HTML code */
header {
font-size:3.5em;
}
h1 {
text-align: center;
font-size: 250%;
}
/*H1 style */
h2 {
font-size: 130%;
}
/*H2 style */
table {
border: 3px solid white;
text-align: center;
border-collapse: collapse;
}
/* tale style */
th {
text-align: center;
font-size:120%;
border: 3px solid white;
border-collapse:collapse;
}
/* Table Header style */
td {
text-align: Left;
border-left: 3px solid white;
border-collapse: collapse;
}
/*table cell alignment */
p {
font-size: 100%;
}
/*paragraph style */
.body {
font:helvetica, serif;
color: white;
overflow:auto;
background-color: black;
font-family: Arial, Verdana;
width: 100%;
display: block;
margin:auto;
text-align: center;
position:fixed;
top:0;
bottom:0;
left:0;
right:0;
}
/* Body style */
.topnav {
background-color: black;
overflow:hidden;
position:fixed;
height: 120px;
width: 100%;
}
/* Navbar style */
.topnav a {
font:serif;
float:left;
color:white;
text-align:center;
padding: 12px 14px;
text-decoration: none;
font-size: 24px;
height: 120px;
display: inline-block;
vertical-align: top;
line-height: 90px;
width: 14.59%;
}
/* Navbar component style */
.topnav a:hover {
background-color: white;
color: black;
}
/* Hover Navbar option */
.topnav a.active {
background-color: white;
color: black;
}
/* Active Navbar option */
.BG1 {
background-image: url('CNRTap2.jpg');
height: 80%;
width:100%;
background-attachment: fixed;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}
/* Background 1 */
.BG2 {
background-image: url('CNRPizza1.jpg');
height: 80%;
width:100%;
background-attachment: fixed;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}
/* Background 2 */
.BG3 {
background-image: url('CNRPing1.jpg');
height: 80%;
width:100%;
background-attachment: fixed;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}
/* Background 3 */
.logo {
display:inline-block;
vertical-align: top;
width: 16.666%px;
height: 90px;
padding-top: 15px;
margin-right:20px;
margin-left:20px;
float: left;
}
/* Logo in Navbar */
.footer {
text-align: center;
background-color: grey;
padding: 15px;
}
/* Footer */
/* Add social media links and logo */
.form {
text-align:center;
position:center;
padding-left:10px;
}
/* Contact Us Form */
input[type=text], input[type=email], [type=number], select, textarea {
width: 40%;
border: 2px solid white;
border-radius:3px;
padding:15px;
margin:10px;
}/*-- Form input styles */
input[type=submit] {
background-color:black;
color:white;
font-size: 20px;
padding:15px 15px;
border:1px white;
border-radius:3px;
cursor:pointer;
border:2px solid white
}
/* Submit button style */
input[type=submit]:hover {
background-color:white;
color:black;
}
/*Submit button hover style */
<!DOCTYPE html>
<html lang="en">
<head>
<title> Standard Cocktail Bar Home Page </title>
<meta name="author" content="joshualavulohodges#gmail.com">
<meta name="description" content="This page is homepage of Standard Cocktail Bar">
<meta name="keywords" content="Alcohol, Gungahlin, Drinks, Food, Standard Bar, Cocktail">
<meta name="viewport" content="width=device-width, height=auto, initial-scale=1">
<link href="Stylesheet.css" rel="stylesheet" type="text/css">
<!-- Meta Data -->
</head>
<body>
<div class="body">
<nav>
<div class="topnav">
<img class="logo" src="logo1.png">
<a class="active" href="Home Page.html">Home </a>
About Us
Whats On
Menu
Contact Us
</div>
</nav>
<!--NavBar-->
<div class="BG1"></div>
<!--BG1-->
<h1> Set Title</h1>
<!--Heading-->
<p> Intro to business </p>
<p> Quick Info of business </p>
<!--Business Info-->
<div class="BG2"></div>
<!--BG2-->
<table style="width:80%; margin-left:auto; margin-right:auto">
<caption style="font-size:180%"> <b>Opening Hours</b></caption>
<tr>
<th> Days </th><th>Hours</th>
</tr>
<tr>
<td>Monday</td><td>Closed</td>
</tr>
<tr>
<td>Tuesday</td><td>12:00pm - 9:00pm</td>
</tr>
<tr>
<td>Wednesday</td><td>12:00pm - Late</td>
</tr>
<tr>
<td>Thursday</td><td>12:00pm - Late</td>
</tr>
<tr>
<td>Friday</td><td>12:00pm - Late</td>
</tr>
<tr>
<td>Saturday</td><td>10:00pm - Late</td>
</tr>
<tr>
<td>Sunday</td><td>12:00pm - Late</td>
</tr>
</table>
<!--Opening Hours-->
<p> Summary of promos </p>
<!--Promo Info-->
<div class="BG3"></div>
<!--BG3-->
<footer>
<p> insert some social media links etc </p>
</footer>
<!--Footer-->
</div>
</body>
</html>
Remove overflow: hidden; from your.topnav class. Style overflow: hidden; hides the all elements, which exists deyond the screen view port.
.topnav {
background-color: black;
/* overflow: hidden; */
position: fixed;
height: 120px;
width: 100%;
}

Table not fit to size screen width

Screenshot:
I tried to display HTML with UIWebView for an iOS project, but as you can see from the above image, the TD is not fit to the screen's width. I tried the HTML source with a browser and it is working well, but in mobile it doesn't.
What do I need to make the table fit exactly to the screen?
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<style>
body {
font: 9pt tahoma, sans-serif;
direction:rtl;
}
*
{
margin: 0px;
padding: 0px;
}
html, body
{
height: 100%;
}
#print-header {
width:95%;
margin:10px auto 10px auto;
/*
background-image:url('../../icon/logo.png');
background-repeat:no-repeat;
background-position:left top;
*/
}
#print-header table {
border-collapse: collapse;
border:0;
margin:10px auto 10px auto;
text-align: center;
width:100%;
/*border:1px solid black;*/
}
#print-header .key {
text-align: left;
}
#print-header .value {
text-align: right;
/*font-weight:bold;*/
}
#print-header th {
border:0;
text-align: right;
width:50%;
/*background:red;*/
}
#print-header td {
border:0;
}
#print-body table{
border-collapse: collapse;
border:1px solid black;
margin:20px auto 20px auto;
text-align: center;
width:200%;
white-space: nowrap;
}
#print-body thead {
font-weight:bold;
}
#print-body th{
border:1px solid black;
padding:2px;
}
#print-body td{
border:1px solid black;
padding:2px;
}
#print-footer {
text-align: center;
font-size:13px
}
#print-body #print-caption {
text-align: center;
font-weight: bold;
font-size: small;
padding: 40px 0 30px 0;
}
</style>
</head>
<body>
<div >
<table>
<tr>
<th rowspan="2" align=right><img border="0" src=".../img.png"></th>
</tr>
</table>
</div>
<div id="print-body">
<hr size="4px" style="background-color:black">
<table cellspacing="0" cellpadding="0">
<tr>
<td width="100%">ISSUE DATE</td>
</tr>
</table>
</div>
<hr size="4px" style="background-color:black">
<div id="print-footer">
<p>sassas<br>asassasa</p>
</div>
</body>
</html>
Try table witdh:100% and position:fixed

How to move a table(or other content) next to vertical navigation bar

I've tried searching for a solution, but none of them have helped. Right now I have a vertical navigation bar, on the left, and I have also made a table, but the table is resting underneath the navigation bar. I cannot figure out how to make them go side by side. I think it may have to do with me not having a div of any sort, but when I tried to add a div it didn't fix the problem, unless I did something wrong with where I placed it or with my CSS. Here's what I got at the moment.
body {
margin: 0px;
padding: 0px;
background: lavenderblush;
}
header {
padding: 0px 0px 20px 0px;
margin: 0px;
}
h1 {
margin: 0px;
padding: 5px;
font-family: 'Indie Flower', cursive;
font-size: 55px;
}
ul {
list-style-type: none;
margin: 1px;
padding: 0px;
border: 0px solid honeydew;
width: 120px;
border-radius: 5px;
}
a {
font-family: 'Indie Flower', cursive;
display: block;
width: 80px;
background: honeydew;
text-align: center;
text-decoration: none;
font-size: 25px;
color: cadetblue;
padding: 20px;
margin: 0px;
}
li.active a {
color: black;
background: lavenderblush;
border: 1px solid lavenderblush;
border-radius: 0px;
}
a:hover {
color: black;
}
table {
border-collapse: collapse;
width: 500px;
font-family: 'Indie Flower', cursive;
font-size: 20px;
}
table, td, th {
border: 1px solid black;
}
<!doctype html>
<html>
<head>
<title>Homepage</title>
<link href="main.css" rel="stylesheet"/>
<link href='https://fonts.googleapis.com/css?family=Architects+Daughter|Indie+Flower' rel='stylesheet' type='text/css'>
</head>
<body>
<header>
<h1>Italian Glossary</h1>
</header>
<nav>
<ul>
<li>Home</li>
<li class="active">Food</li>
<li>Animals</li>
<li>Verbs</li>
</ul>
</nav>
<table align="center">
<tr><th>Italian</th><th>English</th></tr>
<tr><td>Acqua</td><td>Water</td></tr>
<tr><td>Aglio</td><td>Garlic</td></tr>
<tr><td>Arancia</td><td>Orange</td></tr>
<tr><td>Banana</td><td>Banana</td></tr>
<tr><td>Bevanda</td><td>Beverage</td></tr>
<tr><td>Bira</td><td>Beer</td></tr>
<tr><td>Biscotto</td><td>Cookie</td></tr>
<tr><td>Bistecca</td><td>Steak</td></tr>
<tr><td>Burro</td><td>Butter</td></tr>
<tr><td>Caffe</td><td>Coffee</td></tr>
<tr><td>Caramella</td><td>Candy</td></tr>
<tr><td>Carne</td><td>Meat</td></tr>
<tr><td>Carota</td><td>Carrot</td></tr>
<tr><td>Cioccolato</td><td>Chocolate</td></tr>
<tr><td>Cipolla</td><td>Onion</td></tr>
<tr><td>Creama</td><td>Cream</td></tr>
<tr><td>Dolce</td><td>Sweet</td></tr>
<tr><td>Fagiolo</td><td>Bean</td></tr>
<tr><td>Fragola</td><td>Strawberry</td></tr>
<tr><td>Frito</td><td>Fried</td></tr>
<tr><td>Frutta</td><td>Fruit</td></tr>
<tr><td>Funghi</td><td>Mushroom</td></tr>
<tr><td>Gelato</td><td>Ice Cream</td></tr>
<tr><td>Ghiaccio</td><td>Ice </td></tr>
<tr><td>Insalata</td><td>Salad</td></tr>
<tr><td>Latte</td><td>Millk</td></tr>
<tr><td>Limonata</td><td>Lemonade</td></tr>
<tr><td>Limone</td><td>Lemon</td></tr>
<tr><td>Maiale</td><td>Pork</td></tr>
<tr><td>Manzo</td><td>Beef</td></tr>
<tr><td>Marmellata</td><td>Jam</td></tr>
<tr><td>Mela</td><td>Apple</td></tr>
<tr><td>Olio</td><td>Oil</td></tr>
<tr><td>Pane</td><td>Bread</td></tr>
<tr><td>Panino</td><td>Sandwich</td></tr>
<tr><td>Pasta</td><td>Pasta</td></tr>
<tr><td>Patata</td><td>Potato</td></tr>
<tr><td>Pepe</td><td>Pepper</td></tr>
<tr><td>Pesce</td><td>Fish</td></tr>
<tr><td>Pollo</td><td>Chicken</td></tr>
<tr><td>Pomodoro</td><td>Tomato</td></tr>
<tr><td>Riso</td><td>Rice</td></tr>
<tr><td>Sale</td><td>Salt</td></tr>
<tr><td>Salciccia</td><td>Sausage</td></tr>
<tr><td>Succo</td><td>Juice</td></tr>
<tr><td>Tacchino</td><td>Turkey</td></tr>
<tr><td>Te</td><td>Tea</td></tr>
<tr><td>Torta</td><td>Cake</td></tr>
<tr><td>Uovo</td><td>Egg</td></tr>
<tr><td>Uva</td><td>Grape</td></tr>
<tr><td>Verdura</td><td>Vegetables</td></tr>
<tr><td>Vino</td><td>Wine</td></tr>
<tr><td>Zucchero</td><td>Sugar</td></tr>
<tr><td>Zuppa</td><td>Soup</td></tr>
</table>
</body>
</html>
You can change display from nav element and wrap the table in a div
body {
margin: 0px;
padding: 0px;
background: lavenderblush;
}
header {
padding: 0px 0px 20px 0px;
margin: 0px;
}
h1 {
margin: 0px;
padding: 5px;
font-family: 'Indie Flower', cursive;
font-size: 55px;
}
ul {
list-style-type: none;
margin: 1px;
padding: 0px;
border: 0px solid honeydew;
width: 120px;
border-radius: 5px;
}
a {
font-family: 'Indie Flower', cursive;
display: block;
width: 80px;
background: honeydew;
text-align: center;
text-decoration: none;
font-size: 25px;
color: cadetblue;
padding: 20px;
margin: 0px;
}
li.active a {
color: black;
background: lavenderblush;
border: 1px solid lavenderblush;
border-radius: 0px;
}
a:hover {
color: black;
}
table {
border-collapse: collapse;
width: 500px;
font-family: 'Indie Flower', cursive;
font-size: 20px;
}
table, td, th {
border: 1px solid black;
}
nav { display: inline-block; vertical-align: top; }
.table-wrapper { display: inline-block; }
**HTML:**
<!doctype html>
<html>
<head>
<title>Homepage</title>
<link href="main.css" rel="stylesheet"/>
<link href='https://fonts.googleapis.com/css?family=Architects+Daughter|Indie+Flower' rel='stylesheet' type='text/css'>
</head>
<body>
<header>
<h1>Italian Glossary</h1>
</header>
<nav>
<ul>
<li>Home</li>
<li class="active">Food</li>
<li>Animals</li>
<li>Verbs</li>
</ul>
</nav>
<div class="table-wrapper">
<table align="center">
<tr><th>Italian</th><th>English</th></tr>
<tr><td>Acqua</td><td>Water</td></tr>
<tr><td>Aglio</td><td>Garlic</td></tr>
<tr><td>Arancia</td><td>Orange</td></tr>
<tr><td>Banana</td><td>Banana</td></tr>
<tr><td>Bevanda</td><td>Beverage</td></tr>
<tr><td>Bira</td><td>Beer</td></tr>
<tr><td>Biscotto</td><td>Cookie</td></tr>
<tr><td>Bistecca</td><td>Steak</td></tr>
<tr><td>Burro</td><td>Butter</td></tr>
<tr><td>Caffe</td><td>Coffee</td></tr>
<tr><td>Caramella</td><td>Candy</td></tr>
<tr><td>Carne</td><td>Meat</td></tr>
<tr><td>Carota</td><td>Carrot</td></tr>
<tr><td>Cioccolato</td><td>Chocolate</td></tr>
<tr><td>Cipolla</td><td>Onion</td></tr>
<tr><td>Creama</td><td>Cream</td></tr>
<tr><td>Dolce</td><td>Sweet</td></tr>
<tr><td>Fagiolo</td><td>Bean</td></tr>
<tr><td>Fragola</td><td>Strawberry</td></tr>
<tr><td>Frito</td><td>Fried</td></tr>
<tr><td>Frutta</td><td>Fruit</td></tr>
<tr><td>Funghi</td><td>Mushroom</td></tr>
<tr><td>Gelato</td><td>Ice Cream</td></tr>
<tr><td>Ghiaccio</td><td>Ice </td></tr>
<tr><td>Insalata</td><td>Salad</td></tr>
<tr><td>Latte</td><td>Millk</td></tr>
<tr><td>Limonata</td><td>Lemonade</td></tr>
<tr><td>Limone</td><td>Lemon</td></tr>
<tr><td>Maiale</td><td>Pork</td></tr>
<tr><td>Manzo</td><td>Beef</td></tr>
<tr><td>Marmellata</td><td>Jam</td></tr>
<tr><td>Mela</td><td>Apple</td></tr>
<tr><td>Olio</td><td>Oil</td></tr>
<tr><td>Pane</td><td>Bread</td></tr>
<tr><td>Panino</td><td>Sandwich</td></tr>
<tr><td>Pasta</td><td>Pasta</td></tr>
<tr><td>Patata</td><td>Potato</td></tr>
<tr><td>Pepe</td><td>Pepper</td></tr>
<tr><td>Pesce</td><td>Fish</td></tr>
<tr><td>Pollo</td><td>Chicken</td></tr>
<tr><td>Pomodoro</td><td>Tomato</td></tr>
<tr><td>Riso</td><td>Rice</td></tr>
<tr><td>Sale</td><td>Salt</td></tr>
<tr><td>Salciccia</td><td>Sausage</td></tr>
<tr><td>Succo</td><td>Juice</td></tr>
<tr><td>Tacchino</td><td>Turkey</td></tr>
<tr><td>Te</td><td>Tea</td></tr>
<tr><td>Torta</td><td>Cake</td></tr>
<tr><td>Uovo</td><td>Egg</td></tr>
<tr><td>Uva</td><td>Grape</td></tr>
<tr><td>Verdura</td><td>Vegetables</td></tr>
<tr><td>Vino</td><td>Wine</td></tr>
<tr><td>Zucchero</td><td>Sugar</td></tr>
<tr><td>Zuppa</td><td>Soup</td></tr>
</table>
</div>
</body>
</html>
To fix this you can float the nav element to the left. That way the table will show up to the right of it, and only below it when the screen is not wide enough to show them side by side.
nav {
float: left;
}
JSFiddle: https://jsfiddle.net/5fxnpwLu/

Small align issue

very new to code and all this, i am trying to make a simple page with html and css for class. Basically the problem is there is a space between the picture div and the menu div, you can see if you check out my code, also if there is anything that i really don't need, it would be really helpful to point it out. Also i am making this in Chrome. Cheers :)
PS. I am only showing one page of the html so the links wont work.
Here the link to jsFiddle.
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Cristiano Ronaldo</title>
<link rel="stylesheet" type="text/css" href="../realstyle.css" />
</head>
<body>
<div id="contentwrap">
<div id="languagebar">
<ul id="languagelist">
<li id="Ronaldo">CRISTIANO RONALDO</li>
<li>Português</li>
<li>English</li>
</ul>
</div> <!--languagebar-->
<div id="bigpic">
<a href="http://www.realmadrid.com/cs/Satellite/en/Home.htm">
<img id="Madrid" border="0" src="../GalleryI/Madrid.jpg" width="100" height="100px" />
</a>
<a href="http://www.manutd.com/Splash-Page.aspx">
<img id="United" border="0" src="../GalleryI/United.jpg" width="120" height="100px" />
</a>
</div> <!--bigpic-->
<div id="menubar">
<ul id="menubarlist">
<li>Home</li>
<li>Early Life</li>
<li>Clubs</li>
<li>Records/medals</li>
<li>Personal Life</li>
</ul>
</div> <!--menubar-->
<div id="content">
</div> <!--Content-->
</div> <!--contentwrap-->
</body>
</html>
CSS
body {
background-image: url("GalleryI/Background.jpg");
width:100%;
margin:0;
padding:0;
}
A:hover {text-decoration: none; color:#CD2626;}
a:link {color: White; text-decoration: none;}
a:visited {color: White; text-decoration: none;}
#contentwrap {
text-align:center;
white-space: nowrap;
width: 50%;
margin-left: auto;
margin-right: auto;
background-color: red;
}
#languagebar {
width:800px;
height:30px;
background-image: url("GalleryI/languagebaricon.jpg");
background-repeat: no-repeat;
border-left: #FFF 1px solid;
border-right: #FFF 1px solid;
margin:0 auto;
}
#languagelist li {
display:inline;
list-style:none;
position: relative;
line-height:25px;
padding: 2px 10px 0px 10px;
color:#CD2626;
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
float: right;
}
#languagelist li a:hover{
color:#CD2626;
}
#bigpic {
width:800px;
height:100px;
background: #fff;
background-image: url("GalleryI/Jersey1.jpg");
background-repeat: no-repeat;
background-position: 190px -155px;
border-left: #FFF 1px solid;
border-right: #FFF 1px solid;
margin:0 auto;
}
#menubar {
width:800px;
height:40px;
background-image: url("GalleryI/menuicon.jpg");
background-repeat: no-repeat;
padding:0;
white-space: nowrap;
list-style:none;
font-family: Impact, Arial, sans-serif;
text-transform:uppercase !important;
font-size: 16px;
margin:0 auto;
border-left: #FFF 1px solid;
border-right: #FFF 1px solid;
}
#Madrid {
float: left;
}
#United {
float: left;
}
#content {
width: 800px;
height: 726px;
background-color: #FFF;
color: white;
font-size: 18px;
text-align:center;
font-family: arial,sans-serif;
color: white;
margin:0 auto;
border-left: #FFF 1px solid;
border-right: #FFF 1px solid;
}
li#Ronaldo {
line-height:25px;
padding: 2px 25px 2px 25px;
font-family: Arial, Helvetica, sans-serif;
font-size: 22px;
color: white;
float: left;
font-weight: bold;
}
ul#menubarlist li {
display:inline;
position: relative;
letter-spacing:2px;
line-height:35px;
padding: 0px 25px 0px 25px;
color:#CD2626;
}
ul#menubarlist li a:hover{
color:#CD2626;
}
ul#list-nav li a {
text-decoration:none;
color:#ffffff;
}
Just remove this:
#languagebar{
border-left:1px solid #FFFFFF;
}
There is a white space because you have a border!
Edit:
If you mean the gap between the images, see http://jsfiddle.net/GZ8ZT/5/
Just add
#bigpic{font-size:0}
And if you want to add text inside bicpic, you will also need
#bicpic>*{font-size:16px}​ /* Or your default font-size value */
Remove this
border-left:1px solid #FFFFFF;
from *css #languagebar *