Content over footer - html

So I have reviewed all of the posts about this and have tried everything... My content is pushing my footer down as I want. However, there is a very small portion of a div that is overlaying my footer. It can be found at http://www. newshongumpto.org
Its only that bottom portion of the div and I cannot figure out why. I had to move my footer css to the actual includes files as it wasn't find the media query to hide the footer on mobile but I digress. I know, a lot going on here:
Site CSS:
#charset "UTF-8";
.navbar-nav> li > a {
font-family: 'Arial';
font-weight: bold;
color: #000000;
font-size: 15px;
}
.dropdown-menu > li > a {
font-family: 'Arial';
font-weight: bold;
color: #000000;
font-size: 15px;
}
.navbar-default {
border-color: #000000;
}
.nav.navbar-nav a:hover {
color: #206E38;
}
.dropdown-menu .dropdown .dropdown-toggle a {
font-family: 'Arial';
font-weight: bold;
font-size: 15px;
}
.banner {
/* Permalink - use to edit and share this gradient: http://colorzilla.com/gradient-editor/#ffffff+0,206e38+100&1+0,0.52+43,1+100 */
background: linear-gradient(-45deg, rgba(255,255,255,1) 0%, rgba(159,193,169,0.52) 43%, rgba(32,110,56,1) 100%); /* FF3.6-15 */
background: linear-gradient(-45deg, rgba(255,255,255,1) 0%,rgba(159,193,169,0.52) 43%,rgba(32,110,56,1) 100%); /* Chrome10-25,Safari5.1-6 */
background: linear-gradient(135deg, rgba(255,255,255,1) 0%,rgba(159,193,169,0.52) 43%,rgba(32,110,56,1) 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#206e38',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
}
.ptobigtitle {
font-family:'Anton', sans-serif;
padding: 10px;
}
.ptosubtitle {
font-family: 'Anton', sans-serif !important;
padding-left: 10px;
font-size: 30px;
color: #535252;
}
.navbar-btn {
float: right;
}
.btn-default {
background-color: #206E38;
color:#FFF;
}
.jumbotronimg {
float: right;
}
.learnmorebtn {
margin-left: 200px;
}
.articleheadline{
font-family: 'Anton', sans-serif;
font-size: 20px;
background: #A1C2AB;
color: #000;
letter-spacing: 2px;
padding: 5px;
max-width: 400px;
margin: 0 auto;
margin-left: auto;
margin-right: auto;
margin-top: 10px;
border-style: solid;
border-width: 1px;
}
.info{
text-align: center;
top: 37px;
}
.rightinfo{
text-align: center;
}
.footer {
display:block;
background:#CDCDCD;
overflow:hidden;
margin-bottom: 0;
postion: fixed !important;
height: auto;
bottom: 0 !important;
width: 100%;
clear: both;
}
.bottomfooter {
color:#FFF;
font-family: 'Arial';
font-size: 10px;
background: #CDCDCD;
bottom: 0;
}
.footerheading {
font-family: 'Anton', sans-serif;
font-size: 18px;
text-align: center;
text-decoration: underline;
}
.form-inline{
background: #CDCDCD;
}
#mc_embed_signup #mce-EMAIL{
font-family: "Arial";
font-size: 13px;
padding: 5px;
padding-top: 2px;
margin-left:auto;
margin-right:auto;
}
.callistcontainer {
margin-left: auto;
margin-right: auto;
height: 150px;
width: 300px;
overflow: scroll;
}
.footertext{
font-size: 11px;
table-layout: fixed;
width: 100%;
height: auto;
text-align: center;
margin-left: auto;
margin-right:auto;
}
.footerposition{
font-weight: bold;
text-align: right;
padding-right: 10px;
border-right: solid;
border-width: 1px
}
.footername{
border-width: 1px;
text-align: center;
}
.footerphone{
border-width: 1px;
text-align: center
}
.footeremail {
padding-left: 10px;
border-width: 1px;
text-align: center
}
.vl {
border-right: solid;
border-width:1px;
border-color: #000000;
}
.footernavigation {
text-align: center;
color: #000000;
font-size: 11px;
margin-left:auto;
margin-right: auto;
border: none;
border-collapse: separate;
border-spacing: 20px 0
}
.footernavheader{
text-align: center;
text-decoration: underline;
font-size: 11px
}
.copywrite{
font-family: "Arial";
font-size:11px;
text-align: center;
font-weight:bold;
padding-top: 25px;
}
#mc-embedded-subscribe{
-webkit-appearance: none;
margin-left:285px
}
.paypal_btn{
display: inline-block;
font-family: "Gotham", "Helvetica Neue", "Helvetica", "Arial", "sans-serif";
font-size: 14px;
font-weight: 500;
color: #000000;
text-align: center;
padding: 5px 10px;
margin-top: 10px;
margin-left: 30px;
background: #FFD700;
border: solid;
border-width:thin;
border-color: #C5C5C5;
cursor: pointer;
outline: none;
border-radius: 3px;
}
.paypal_btn:hover{ background:#e7e7e7;
}
.shongumTitle{
font-family: 'Anton', sans-serif !important;
font-size: 20px;
color: #767373;
padding-right:5px
}
.store{
margin-top:60px;
}
FOOTER CSS
<style>
.footer {
display: none;
}
#media (min-width: 767px) {
.footer {
display:block;
background:#CDCDCD;
overflow:hidden;
margin-bottom: 0;
postion: fixed;
height: auto;
bottom: 0;
width: 100%;
clear: both;
</style>
HTML
<?php include("includes/navigation.php");?>
<div class="jumbotron banner">
<img src="images/ShongumSkyhawkBird_bg.png" alt="Shongum Elemtary School - Skyhawks" width="252" height="321" class="jumbotronimg img-responsive"/>
<h1 class="ptobigtitle">Shongum Elementary School</h1>
<h2 class="ptosubtitle">Parent Teacher Organization - A Quest for Excellence</h2>
<a class="btn btn-primarybtn-lg btn-default learnmorebtn" href="contentPages/about.php">Learn more »</a>
</div>
<div class="col-lg-4 info">
<h2 class="articleheadline"><img src="images/003-calendar.png" width="32" height="32" alt=""/> UPCOMING EVENTS</h2><br>
<div class="callistcontainer">
<link href="http://www.newshongumpto.org/calendarScript/core/framework/libs/pj/css/pj.bootstrap.min.css" type="text/css" rel="stylesheet" />
<link href="http://www.newshongumpto.org/calendarScript/index.php?controller=pjFront&action=pjActionLoadCss&theme=5" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="http://www.newshongumpto.org/calendarScript/index.php?controller=pjFront&action=pjActionLoad&theme=5&view=list&icons=T&cats=T"></script>
</div>
</div>
<div class="col-lg-4 info">
<h2 class="articleheadline">
<img src="images/001-news.png" width="32" height="32" alt=""/> LATEST NEWS</h3>
<p><style type="text/css">
<!--
.display_archive {font-family: arial,verdana; font-size: 12px;}
.campaign {line-height: 125%; margin: 5px;}
//-->
</style>
<script language="javascript" src="//ShongumPTO.us14.list-manage.com/generate-js/?u=94f392b8b8898807cb75b5931&fid=6999&show=5" type="text/javascript"></script></p>
<p> </p>
</div>
<div class="col-lg-4 rightinfo">
<h2 class="articleheadline">
<img src="images/002-group.png" width="32" height="32" alt=""/> GET INVOLVED!</h3>
</div>
</div>
<br>
<?php include("includes/footer.php");?>
</body>
</html>
FOOTER
<body id="footer" is="dmx-app">
<dmx-serverconnect id="serverconnect1" url="../dmxConnect/api/homePage/officerInfo.php"></dmx-serverconnect>
<div class="footer">
<div class="container-fluid">
<div class="col-lg-4">
<h2 class="footerheading"> Officers</h2>
<div class="footertext" dmx-repeat:repeat1="serverconnect1.data.ptoOfficers">
<table width="549" height="46" class="footertext">
<tbody>
<tr>
<td class="footerposition">{{col_position}}</td>
<td class="footername">{{col_firsrtName}} {{col_lastName}}</td>
<td class="footerphone">{{col_phone}}</td>
<td> {{col_email}} </td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="col-lg-4">
<h2 class="footerheading">Navigate</h2>
<table class="footernavigation">
<tbody>
<tr>
<p class="footernavheader"><strong>PTO</strong></p>
</tr>
<tr>
<td>About Us</td>
<td>Membership</td>
</tr>
<tr>
<td>Programs</td>
<td>Classes</td>
</tr>
<tr>
<td>Store</td>
<td>Lunch Menu</td>
</tr>
<tr>
<td><a href="../contentPages/newsCalendar/news.php">News</td>
<td><a href="../contentPages/newsCalendar/calendar.php">Calendar</td>
</tr>
</tbody>
</table>
<br>
<table class="footernavigation">
<tbody>
<tr>
<p class="footernavheader"><strong>Randolph School District</strong></p>
</tr>
<tr>
<td>RAM Alerts</td></td>
<td>District Calendar</td></td>
</tr>
</tbody>
</table>
</tbody>
</table>
</div>
<div class="col-lg-4">
<h2 class="footerheading">Stay in Contact!</h2>
<!-- Begin MailChimp Signup Form -->
<link href="//cdn-images.mailchimp.com/embedcode/slim-10_7.css" rel="stylesheet" type="text/css">
<style type="text/css">
#mc_embed_signup{background:#CDCDCD; clear:left; font:10px "Arial",sans-serif; width:500px;}
/* Add your own MailChimp form style overrides in your site stylesheet or in this style block.
We recommend moving this block and the preceding CSS link to the HEAD of your HTML file. */
</style>
<div id="mc_embed_signup">
<form action="https://ShongumPTO.us14.list-manage.com/subscribe/post?u=94f392b8b8898807cb75b5931&id=07d0e3a6fb" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate>
<div id="mc_embed_signup_scroll">
<input type="email" value="" name="EMAIL" class="email" id="mce-EMAIL" placeholder="Newsletter Signup" required>
<!-- real people should not fill this in and expect good things - do not remove this or risk form bot signups-->
<div style="position: absolute; left: -5000px;" aria-hidden="true"><input type="text" name="b_94f392b8b8898807cb75b5931_07d0e3a6fb" tabindex="-1" value=""></div>
<div class="clear"><input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="btn btn-default"></div>
</div>
</form>
</div>
<!--End mc_embed_signup-->
</div>
<br>
<br>
<div class="col-lg-12 copywrite"> © <?php echo date("Y"); ?> Shongum Elementary School Parent Teacher Organization
</div>
</div>
<script type="text/javascript">
/* dmxServerAction name "ptoOfficersExecutor" */
jQuery.dmxServerAction(
{"id": "ptoOfficersExecutor", "url": "../dmxConnect/api/homePage/officerInfo.php", "method": "GET", "sendOnSubmit": false, "sendOnReady": true, "data": {}}
);
/* END dmxServerAction name "ptoOfficersExecutor" */
</script>
</body>
</html>

You have this...
.info {
text-align: center;
top: 37px;
}
Remove the 37px and it will fix it.

Related

How to make the calculation work in a shopping cart?

I was trying to get the price calculator to work in my shopping cart but I can't understand why it doesn't work. I entered the price, the quantity and I wanted to calculate the price of the product in the last column.
I attach the Html and Css code.
I thank everyone who will help me. Thanks a lot to everyone!!!
body,
html {
height: 100%;
width: 100%;
}
html,
body {
margin: auto;
padding: 0%;
font-family: Arial;
}
/*
Topnav
*/
.topnav {
background-color: #fff;
overflow: auto;
padding-left: 1em;
}
.topnav a {
float: left;
color: #707070;
text-align: center;
padding: 14px 16px;
text-decoration: none;
font-size: 15px;
font-family: Arial;
}
.topnav a:hover {
color: #D4988E;
}
.topnav a.active {
background-color: #fff;
color: #D4988E;
}
.topnav-right {
float: right;
padding-right: 1em;
}
/*
Cart
*/
.title {
font-family: Arial;
margin-left: 100px;
color: #403F3F;
margin-top: 50px;
}
hr.new2 {
height: 4px;
color: #D4988E;
background-color: #D4988E;
border: none;
margin-right: 1280px;
margin-bottom: 20px;
border-radius: 5px;
}
.cartcontainer {
margin-left: 100px;
margin-right: 100px;
margin-top: 50px;
overflow-x: auto;
}
.cartcontainer table {
border-collapse: collapse;
width: 100%;
table-layout: fixed;
white-space: nowrap;
}
.cartcontainer table thead {
font-weight: 700;
font-family: Arial;
}
.cartcontainer table thead td {
background: #D4988E;
color: #ffffff;
border: none;
padding: 6px 0;
}
.cartcontainer table td {
border: 1px solid #b6b3b3;
text-align: center;
}
.cartcontainer table td:nth-child(1) {
width: 100px;
}
.cartcontainer table td:nth-child(2),
.cartcontainer table td:nth-child(3) {
width: 200px;
}
.cartcontainer table td:nth-child(4),
.cartcontainer table td:nth-child(5),
.cartcontainer table td:nth-child(6) {
width: 170px;
}
.cartcontainer table tbody img {
width: 100px;
height: 80px;
object-fit: cover;
}
.cartcontainer table tbody i {
color: #8d8c89;
}
.coupon-code {
margin-top: 20px;
}
.total {
margin-left: 650px;
margin-top: -174px;
margin-right: 100px;
}
h6,
p {
display: inline;
}
.price {
margin-top: -15px;
margin-bottom: 10px;
}
.cartbottom .coupon>div,
.cartbottom .total>div {
border: 1px solid #b6b3b3;
border-top: 20px;
}
.cartbottom .coupon>div {
margin-left: 100px;
margin-right: 800px;
}
.border {
margin-top: 20px;
}
.cartbottom .coupon h5,
.cartbottom .total h5 {
background: #D4988E;
color: #ffffff;
border: none;
padding: 6px 12px;
font-weight: 700;
}
.cartbottom .coupon p,
.cartbottom .coupon input {
padding: 0 12px;
}
.cartbottom .coupon input {
height: 44px;
width: 220px;
}
.cartbottom .coupon input {
margin: 0 10 20px 12px;
margin-left: 10px;
margin-bottom: 15px;
}
.cartbottom .total div>div {
padding: 0 12px;
}
.cartbottom .total h6 {
color: #2a2a2a;
}
.second-hr {
height: 4px;
color: #D4988E;
background-color: #D4988E;
border: none;
margin-right: 580px;
}
.cartbottom .total div>button {
margin: 20px 12px 20px 10px;
}
.button1 {
padding: 3%;
width: 200px;
background-color: #D4988E;
border: none;
color: white;
border-radius: 10px;
margin-left: 20px;
cursor: pointer;
transition-duration: 0.4s;
}
.button1:hover {
background-color: #BD847A;
color: white;
}
.button2 {
padding: 2%;
width: 650px;
background-color: #D4988E;
border: none;
color: white;
border-radius: 10px;
text-align: center;
cursor: pointer;
transition-duration: 0.4s;
}
.button2:hover {
background-color: #BD847A;
color: white;
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<link rel="stylesheet" href="/Users/giuliettamotolese/Desktop/Accademia/III ANNO/II Semestre/Web Design/flowerbee/codice/css/cart.css">
<script src="https://kit.fontawesome.com/e8f8804c71.js" crossorigin="anonymous"></script>
<script type="text/javascript" src="cart.js" async></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script>
<title>Shopping Cart</title>
</head>
<body>
<!-- topnav======================================== -->
<div class="topnav-logo">
</div>
<div class="topnav">
Homepage
Custom Order
Contact
About
<div class="topnav-right">
<i class="fa-brands fa-instagram"></i>
<i class="fa-brands fa-linkedin-in"></i>
<i class="fa-brands fa-facebook-f"></i>
<a class="active" href="#home"><i class="fa-solid fa-cart-shopping"></i></a>
<i class="fa-solid fa-user"></i>
</div>
</div>
<hr>
<div class="title">
<h2 class="font-weight-bold pt-5">Shopping Cart</h2>
<hr class="new2">
</div>
<div class="cartcontainer">
<table width="100%">
<thead>
<tr>
<td>Remove</td>
<td>Image</td>
<td>Product</td>
<td>Price</td>
<td>Quantity</td>
<td>Total</td>
</tr>
</thead>
<tbody>
<tr>
<td><a class="btn-remove" href="#"><i class="fas fa-trash-alt"></i></a></td>
<td><img src="/Users/giuliettamotolese/Desktop/Accademia/III ANNO/II Semestre/Web Design/flowerbee/codice/immagini/Big Bang/BigBang2.jpg" alt=""></td>
<td>
<h5>Big Bang Standard</h5>
</td>
<div data-ng-app="" data-ng-init="quantity=1; price=33.00">
<td><input type="number" ng-model="price"></td>
<td><input type="number" ng-model="quantity"></td>
<td>
<h5>{{quantity * price}}
<h5>
</td>
</tr>
</div>
<tr>
<td><a class="btn-remove" href="#"><i class="fas fa-trash-alt"></i></a></td>
<td><img src="/Users/giuliettamotolese/Desktop/Accademia/III ANNO/II Semestre/Web Design/flowerbee/codice/immagini/Big Bang/BigBang1.jpg" alt=""></td>
<td>
<h5>Big Bang Premium</h5>
</td>
<div data-ng-app="" data-ng-init="quantity=1; price=39.00">
<td><input type="number" ng-model="price"></td>
<td><input type="number" ng-model="quantity"></td>
<td>
<h5>{{quantity * price}}
<h5>
</td>
</tr>
</div>
<tr>
<td><a class="btn-remove" href="#"><i class="fas fa-trash-alt"></i></a></td>
<td><img src="/Users/giuliettamotolese/Desktop/Accademia/III ANNO/II Semestre/Web Design/flowerbee/codice/immagini/Big Bang/BigBang4.jpg" alt=""></td>
<td>
<h5>Big Bang Deluxe</h5>
</td>
<div data-ng-app="" data-ng-init="quantity=1; price=42.00">
<td><input type="number" ng-model="price"></td>
<td><input type="number" ng-model="quantity"></td>
<td>
<h5>{{quantity * price}}
<h5>
</td>
</tr>
</div>
</tbody>
</table>
</div>
<div class="cartbottom" class=" container">
<div class="row">
<div class=" coupon col-lg-6 col-md-6 col-12 mb-4">
<div>
<h5>COUPON</h5>
<p>Enter your coupon code if you have one.</p>
<input class="coupon-code" type="text" placeholder="Coupon Code">
<button type="button" onclick="alert('Your coupon code has been authenticated!')" class="button1">APPLY COUPON</button>
</div>
</div>
<div class="total col-1g-6 col-md-6 col-12">
<div>
<h5>CART TOTAL</h5>
<div class="d-flex justify-content-between">
<h6>Subtotal</h6>
<div class="price" style="text-align: right;">
<p>$215.00</p>
</div>
</div>
<div class="d-flex justify-content-between">
<h6>Shipping</h6>
<div class="price" style="text-align: right;">
<p>$215.00</p>
</div>
</div>
<hr class="second-hr">
<div class="d-flex justify-content-between">
<h6>Total</h6>
<div class="price" style="text-align: right;">
<p>$215.00</p>
</div>
</div>
<button type="button" class="button2">PROCEED TO CHECKOUT</button>
</div>
</div>
</div>
</div>
You can not add logics only using HTML and CSS.
You need to use JavaScript to handle the logical parts to do calculation and display it in HTML.
Example on how to use javascript to do the calculation

Website looks off when working on a smaller screen

I need my work done soon, but I don't have access to my bigger monitor. I assume the teacher also has a big monitor where he'll look at my work, so it shouldn't be a problem.
But my site only looks normal on 70% and I'm having a big headache trying to make it work so I have to work on 70%.
* {
margin: 0px;
padding: 0px;
box-sizing: border-box;
}
body {
font-family: 'Poppins', sans-serif;
}
header {
display: flex;
width: 50%;
height: 8vh;
margin: auto;
align-items: center;
}
.nav-links,
.search-container {
display: flex;
}
nav {
position: relative;
flex: 1;
}
.nav-links {
justify-content: space-evenly;
max-width: 300px;
list-style: none;
}
.nav-link {
color: #ffffff;
font-size: 18px;
text-decoration: none;
}
.search-container {
flex: 1;
position: absolute;
top: 50%;
transform: translateY(-50%);
right: 0;
}
#justdance {
display: flex;
width: 50%;
margin: auto;
align-items: top;
}
.about {
background-color: #c4c4c4;
display: flex;
width: 50%;
height: 30vh;
margin: auto;
flex-direction: column;
align-items: flex-start;
}
.quote {
text-align: center;
display: block;
border-radius: 10px;
border-style: solid;
box-shadow: rgba(0, 0, 0, 0.42) 0px 2px 2px 0px;
width: 500px;
height: 30px;
margin: 20px auto 0 auto;
}
.description {
margin: 30px auto 0 auto;
text-align: justify;
width: 70%;
font-size: 13px;
}
.sideimage {
position: absolute;
right: 640px;
top: 390px;
}
.polygon {
position: absolute;
right: 960px;
bottom: 260px;
width: 0;
height: 0;
border-top-width: 82px;
border-top-style: solid;
border-top-color: transparent;
border-right-width: 90px;
border-right-style: solid;
border-right-color: #c4c4c4;
transform: rotate(-180deg);
}
.piirkonnad {
background-color: #222222;
display: flex;
width: 50%;
height: 29vh;
margin: auto;
flex-direction: column;
align-items: flex-start;
}
.piirkonnad p {
position: absolute;
left: 554px;
bottom: 270px;
font-family: Roboto;
font-style: italic;
font-weight: 300;
font-size: 20px;
line-height: 23px;
color: #FFFFFF;
}
.copyright p {
position: absolute;
right: 803px;
bottom: 24px;
font-family: Roboto;
font-style: normal;
font-weight: normal;
font-size: 13px;
line-height: 12px;
color: #FFFFFF;
}
.social {
position: absolute;
right: 550px;
bottom: -2px;
}
.fa {
padding: 15px;
font-size: 30px;
width: 50px;
text-align: center;
text-decoration: none;
margin: 5px 2px;
border-radius: 50%;
}
.fa-instagram {
background: #c4c4c4;
color: black;
}
.fa-twitter {
background: #c4c4c4;
color: black;
}
.fa-facebook {
background: #c4c4c4;
color: black;
}
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=yes">
<title>Just Dance</title>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
</head>
<style>
body {
background-color: #000000;
}
</style>
<body>
<header>
<nav>
<ul class="nav-links">
<li><a class="nav-link" href="#">Avaleht</a></li>
<li><a class="nav-link" href="#">Meist</a></li>
<li><a class="nav-link" href="#">Login</a></li>
</ul>
<div class="search-container">
<input type="text" placeholder="Otsing" name="search">
</div>
</nav>
</header>
<main>
<img src="header.jpg" alt="Just Dance" id="justdance" ;>
<div class="about">
<div class="quote">“Dance is the hidden language of the soul” - Marta Graham</div>
<div class="description">
<div class="text">
<p>Kunagi pole liiga hilja alustada. Just Dance veebilehelt leiad<br>
tantsukursusi üle Eesti.</p>
<br>
<p>Sulle sobiva kursuse leidmine on imelihtne - vali piirkond või<br>
tantsustiil ning sulle avaneb loetelu kursustest.</p>
<br>
<p>Ka tantsukaaslaste leidmine on imelihtne. Kirjuta sulle sobiva<br>
kursuse kommentaaridesse oma kaaslaseotsingust ning jää<br>
ootama vastust. Ehk leiad juba homme oma unelmate partneri?<br>
Kursuste kommenteerimiseks registreeru "Just Dance" kasutajaks.</p>
</div>
<div class="sideimage">
<img src="dancers.png" alt="Dancers" id="dancer" ;>
</div>
<div class="polygon"></div>
</div>
</main>
<section>
<div class="piirkonnad">
<p>Piirkonnad</p>
</div>
<div class="row1">
<img src="1.jpg" alt="Harjumaa" width="170" height="100">
</div>
</section>
<footer>
<div class="copyright">
<p>Just Dance © Noor Meister Kõik õigused kaitstud</p>
</div>
<div class="social">
</div>
</footer>
</body>
</html>
I've heard about responsive design already, but I can't figure it out. I'm not the greatest at coding and it was hard to achieve what I have so help is appreciated a ton.
Your code has some mistakes on it, you have ; on your img element and your style element should be in the head tag, and the reason why your website is not responsive is because you are using position:absolute, keep your website simple, or if you really want to still use position:absolute, then that div should be contained on another div but set it it to position:relative.
Anyways, I fixed it and now totally responsive, here it is:
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Poppins', sans-serif;
padding-top:20px;
}
header{
display:flex;
justify-content:space-evenly;
width: 50%;
margin: auto;
flex-wrap:wrap;
}
.nav-links{
display: flex;
}
.nav-links{
justify-content: space-evenly;
max-width: 300px;
list-style: none;
}
.nav-link{
color: #ffffff;
font-size: 18px;
padding:10px;
text-decoration: none;
}
#justdance {
display: flex;
width: 50%;
margin: auto;
align-items: top;
}
.about {
padding:10px;
background-color: #c4c4c4;
width: 50%;
margin: auto;
}
.search-container{
min-width:30px
}
.quote {
text-align: center;
display: block;
border-radius: 10px;
border-style: solid;
box-shadow: rgba(0, 0, 0, 0.42) 0px 2px 2px 0px;
padding:5px;
margin: 10px auto 0 auto;
}
.description {
margin: 30px auto 0 auto;
width: 70%;
font-size: 13px;
}
.polygon {
height: 0;
border-top-width: 82px;
border-top-style: solid;
border-top-color: transparent;
border-right-width: 90px;
border-right-style: solid;
border-right-color: #c4c4c4;
transform: rotate(-180deg);
}
.piirkonnad {
position:relative;
display:flex;
background-color: #222222;
display: flex;
width: 50%;
padding-top:30px;
height: 29vh;
margin: auto;
justify-content:space-evenly;
}
.piirkonnad p {
text-align:center;
font-family: Roboto;
font-style: italic;
font-weight: 300;
font-size: 20px;
line-height: 23px;
color: #FFFFFF;
}
footer{
margin-top:1em;
}
.copyright p {
text-align:center;
font-family: Roboto;
font-style: normal;
font-weight: normal;
font-size: 13px;
line-height: 12px;
color: #FFFFFF;
}
.social {
display:flex;
justify-content:center;
}
.fa {
padding: 15px;
font-size: 30px;
width: 50px;
text-align: center;
text-decoration: none;
margin: 5px 2px;
border-radius: 50%;
}
.fa-instagram {
background: #c4c4c4;
color: black;
}
.fa-twitter {
background: #c4c4c4;
color: black;
}
.fa-facebook {
background: #c4c4c4;
color: black;
}
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=yes">
<title>Just Dance</title>
<link rel="stylesheet" href="./style.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<style>
body {
background-color: #000000;
}
</style>
</head>
<body>
<header>
<nav>
<ul class="nav-links">
<li><a class="nav-link" href="#">Avaleht</a></li>
<li><a class="nav-link" href="#">Meist</a></li>
<li><a class="nav-link" href="#">Login</a></li>
</ul>
</nav>
<div class="search-container">
<input type="text" placeholder="Otsing" name="search">
</div>
</header>
<main>
<img src="header.jpg" alt="Just Dance" id="justdance">
<div class="about">
<div class="quote">“Dance is the hidden language of the soul” - Marta Graham</div>
<div class="description">
<div class="text">
<p>Kunagi pole liiga hilja alustada. Just Dance veebilehelt leiad<br>
tantsukursusi üle Eesti.</p>
<br>
<p>Sulle sobiva kursuse leidmine on imelihtne - vali piirkond või<br>
tantsustiil ning sulle avaneb loetelu kursustest.</p>
<br>
<p>Ka tantsukaaslaste leidmine on imelihtne. Kirjuta sulle sobiva<br>
kursuse kommentaaridesse oma kaaslaseotsingust ning jää<br>
ootama vastust. Ehk leiad juba homme oma unelmate partneri?<br>
Kursuste kommenteerimiseks registreeru "Just Dance" kasutajaks.</p>
</div>
</div>
</div>
<section>
<div class="piirkonnad">
<div class="polygon"></div>
<p>Piirkonnad</p>
<div class="sideimage">
<img src="dancers.png" alt="Dancers" id="dancer">
</div>
</div>
<div class="row1">
<img src="1.jpg" alt="Harjumaa" width="170" height="100">
</div>
</section>
</main>
<footer>
<div class="copyright">
<p>Just Dance © Noor Meister Kõik õigused kaitstud</p>
</div>
<div class="social">
</div>
</footer>
</body>
</html>
For make a website responsive you need to avoid px and use %, vw (viewport width) or vh (viewport height).
After in your css you need to declare #media only screen and (max-width: screenSizepx) and inside make the responsive layout for each screen.
Usually i make this with:
#media only screen and (max-width: 1000)
#media only screen and (max-width: 550px)
#media only screen and (max-width: 400px)

How can I place an image inside an input?

So I am trying to make an input field which is a search bar and I want to place a search icon on the left of the input field. I tried making this with setting the background-image property of the input field but it didn't work for me.
I've already read some other questions like this on Stackoverflow but these solutions didn't work for me.
I tried setting the display property of the input field as well but that didn't solve the problem for me.
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="style/reset.css">
<link rel="stylesheet" href="style/style.css">
<title>Google</title>
</head>
<body>
<div id="header">
<div>
Gmail
Képek
<img src="images/squares.png" alt="">
<img class="profile" src="images/profile.png" alt="">
</div>
</div>
<div id="body">
<img src="images/google.gif" alt="">
<div id="sbcontainer">
<div id="searchbar">
<input type="text">
</div>
</div>
</div>
</body>
</html>
body {
font-family: arial, sans-serif;
}
#header {
text-align: right;
margin: 15px 15px;
padding: 0 15px 0 15px;
word-spacing: 10px;
}
.profile {
border-radius: 50%;
}
a {
display: inline;
color: rgba(0,0,0,0.87);
text-decoration: none;
font-size: 13px;
line-height: 24px;
}
a:hover {
text-decoration: underline;
}
#body {
padding-top: 47px;
text-align: center;
}
#searchbar {
padding-top: 20px;
}
input {
background: url(images/searchicon.png) no-repeat left center;
line-height: 34px;
padding-left: 30px;
border: 1px solid rgb(216, 216, 216);
padding-top: 5px;
padding-bottom: 5px;
width: 30%;
border-radius: 40px;
}
With background-image. Your code is fine, your issue lies in your image path.
input{
background-image: url("https://via.placeholder.com/50");
height: 50px;
width: 50px;
}
<input>
Here, the same exact thing but with your code.
body {
font-family: arial, sans-serif;
}
#header {
text-align: right;
margin: 15px 15px;
padding: 0 15px 0 15px;
word-spacing: 10px;
}
.profile {
border-radius: 50%;
}
a {
display: inline;
color: rgba(0,0,0,0.87);
text-decoration: none;
font-size: 13px;
line-height: 24px;
}
a:hover {
text-decoration: underline;
}
#body {
padding-top: 47px;
text-align: center;
}
#searchbar {
padding-top: 20px;
}
input {
background: url("https://via.placeholder.com/30") no-repeat left center;
line-height: 34px;
padding-left: 30px;
border: 1px solid rgb(216, 216, 216);
padding-top: 5px;
padding-bottom: 5px;
width: 30%;
border-radius: 40px;
}
<!DOCTYPE html>
<html>
<body>
<div id="header">
<div>
Gmail
Képek
<img src="images/squares.png" alt="">
<img class="profile" src="images/profile.png" alt="">
</div>
</div>
<div id="body">
<img src="images/google.gif" alt="">
<div id="sbcontainer">
<div id="searchbar">
<input type="text">
</div>
</div>
</div>
</body>
</html>
I used your code and was able to put a picture of an apple to the left inside of the search bar, so im not sure what trouble you are having.
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="style/reset.css">
<link rel="stylesheet" href="style/style.css">
<title>Google</title>
</head>
<body>
<div id="header">
<div>
Gmail
Képek
<img src="images/squares.png" alt="">
<img class="profile" src="images/profile.png" alt="">
</div>
</div>
<div id="body">
<img src="images/google.gif" alt="">
<div id="sbcontainer">
<div id="searchbar">
<input type="text">
</div>
</div>
</div>
</body>
</html>
body {
font-family: arial, sans-serif;
}
#header {
text-align: right;
margin: 15px 15px;
padding: 0 15px 0 15px;
word-spacing: 10px;
}
.profile {
border-radius: 50%;
}
a {
display: inline;
color: rgba(0,0,0,0.87);
text-decoration: none;
font-size: 13px;
line-height: 24px;
}
a:hover {
text-decoration: underline;
}
#body {
padding-top: 47px;
text-align: center;
}
#searchbar {
padding-top: 20px;
}
input {
background: url(https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQgfZeQfcPa39Zodu_eXAUs9xYjmRk5lBry4TWh5nCWiWLf7dka-g&s) no-repeat left center;
background-size: 20px;
line-height: 34px;
padding-left: 30px;
border: 1px solid rgb(216, 216, 216);
padding-top: 5px;
padding-bottom: 5px;
width: 30%;
border-radius: 40px;
}
Here is a fiddle: https://jsfiddle.net/p8jb0r7s/

Images Not Displaying In Table

I am working on an assignment and I need to place some images in a table, which normally isn't a problem for me. Today when I added the images to the table it just displays a square border with the alt text written in it. I am pretty sure that I am pointing to the right directory.
My folder structure is:
Website
css
fonts
html (Page with table in here)
js
images (Images for table in here)
#font-face{ font-family:customFont; src: url('../fonts/Balkeno.ttf'); }
* {
margin: 0;
border: 0;
padding: 0;
font-size: 12px;
font-family: arial, sans-serif;
}
body {
width: 100%;
height: 300%;
background-color: #D8D8D8;
}
nav {
font-family: customFont;
font-size: 30px;
width: 100%;
height: 40px;
position: fixed;
z-index: 50;
}
.nav-background {
width: 100%;
height: 100%;
background: #12A7CB;
opacity: 0;
position: absolute;
}
.nav-content {
position: relative;
top: 50%;
transform: translateY(-50%);
}
header {
width: 100%;
height: 320px;
}
#slideshow {
position:relative;
height:320px;
width: 100%;
}
#slideshow IMG {
position:absolute;
top:0;
left:0;
z-index:8;
width: 100%;
height: 320px;
box-shadow: 0px 5px 10px #5E5E5E;
}
#slideshow IMG.active {
z-index:10;
}
#slideshow IMG.last-active {
z-index:9;
}
#logo {
float: left;
padding-left: 100px;
padding-right: 200px;
}
#nav {
background: url(http://4.bp.blogspot.com/-dVtgikk-kOY/UprtswP0yGI/AAAAAAAADag/Og0DtZ8t_oQ/s1600/header+base.png) no-repeat scroll top left; background-color: transparent;
width:100%;
height:50px;
box-shadow: 0px 1px 10px #5E5E5E;
position:fixed;
top:0px;
}
.title {
display:none;
color:#EDEDED;
font-size:25px;
width:350px;
margin-top:6px;
margin-left:150px;
font-weight:bold;
float:left;
}
.navigation li{
list-style-image: url('navIcon.png');
float: left;
padding-right:45px;
margin-bottom: 25px;
color: black;
}
li {
}
.navigation a {
font-size: 19px;
font-family: customFont;
text-decoration:none;
color: #01ebfe;
}
.navigation a:hover {
}
.wrapper {
width: 900px;
height: 1000%;
margin-top: 25px;
margin-left: auto;
margin-right: auto;
padding: 20px;
background-color: white;
padding-top: 100px;
box-shadow: 10px 10px 5px #888888;
}
p{
font-size: 14px;
padding-bottom: 32px;
}
p:first-letter {
font-size: 32px;
color: #71CAE0;
}
h1 {
font-family: customFont;
font-size: 32px;
font-weight: bolder;
color: #12A7CB;
text-align: center;
}
h2 {
font-family: customFont;
font-size: 22px;
font-weight: bold;
color: #12A7CB;
text-align: left;
text-decoration: underline;
}
section {
width: 100%;
height: 100%;
background-color: #D8D8D8;
}
img.logo {
text-align: center;
margin: auto;
display: block;
}
img.slideshow {
width: 100%;
height: 480px;
}
footer {
width: 900px;
margin: 25px auto 0 auto;
padding-top: 20px;
padding-left: 20px;
padding-right: 20px;
background-color: white;
text-align: center;
box-shadow: 10px 10px 5px #888888;
}
.members {
padding: 10px;
display: inline-block;
background-color: #e4f4f8;
margin-top: 15px;
margin-left: 15px;
border: 1px solid #12A7CB;
float: right;
}
ol.test {
list-style-type: lower-alpha;
}
.members ol {
list-style-type: lower-alpha;
}
.members li {
display: list-item;
color: #6c6c6c;
list-style-type: lower-alpha;
padding: 5px;
margin-bottom: 5px;
margin-left: 10px;
}
/* TABLE STUFF */
table, tr, th, td {
border: 1px solid black;
border-collapse: collapse;
}
th {
padding: 5px;
color: #12A7CB;
background-color: #e4f4f8;
}
td {
background-color: #f2eded;
width: 150px;
height: 150px;
}
/* END TABLE STUFF */
.video-wrapper {
width: 100%;
text-align: center;
}
.video-wrapper a {
color: blue;
text-decoration: none;
font-size: 12px;
font-family: arial, sans-serif;
}
.social img {
padding-top: 32px;
padding-right: 8px;
width: 48px;
height: 48px;
border: none;
}
<!DOCTYPE html>
<html>
<!--
Author: #####
Date: 11/08/2014
-->
<head>
<meta charset="utf-8" />
<title>Home - Three Doors Down</title>
<link rel="stylesheet" type="text/css" href="../css/style.css" />
<link href='http://fonts.googleapis.com/css?family=Ubuntu' rel='stylesheet' type='text/css'>
<script src="../js/jquery.js"></script>
<script type="text/javascript" src="../js/scroll.js"></script>
<script type="text/javascript" src="../js/header.js"></script>
</head>
<body>
<nav class="nav">
<div class="nav-background">
</div>
<div class="nav-content">
<img src="../images/navTitle.png" alt="Three Doors Down" id="logo" width=250 />
<ul class='navigation'>
<li>Home</li>
<li>Biography</li>
<li>Discography</li>
<li>Video</li>
</ul>
</div>
</nav>
<header class="header">
<div id="slideshow">
<img src="../images/header1.jpg" alt="Three Doors Down" class="active" />
<img src="../images/header2.jpg" alt="Three Doors Down" />
<img src="../images/header3.jpg" alt="Three Doors Down" />
</div>
</header>
<section>
<div class="wrapper">
<h1>Discography</h1>
<div class="disco" >
<table >
<tr>
<th>
Album
</th>
<th>
Year
</th>
<th>
Record Label
</th>
<th>
CD Cover
</th>
</tr>
<tr>
<td >
The Better Life
</td>
<td>
2000
</td>
<td>
Universal Republic
</td>
<td>
<img href="../images/theBetterLifeCover.jpg" alt="The Better Life" width="100" height="100" />
</td>
</tr>
<tr>
<td >
Away from the Sun
</td>
<td>
2002
</td>
<td>
Universal Republic
</td>
<td>
<image href="../images/awayFromTheSunCover.jpg" alt="Test" width="100" height="100" />
</td>
</tr>
<tr>
<td >
Seventeen Days
</td>
<td>
2005
</td>
<td>
Universal Republic
</td>
<td>
Cover
</td>
</tr>
<tr>
<td >
3 Doors Down
</td>
<td>
2008
</td>
<td>
Universal Republic
</td>
<td>
<image />
</td>
</tr>
<tr>
<td >
Time of My Life
</td>
<td>
2011
</td>
<td>
Universal Republic
</td>
<td>
Cover
</td>
</tr>
</table>
</div>
</div>
</section>
<footer>
<div class="nav-content">
<ul class='navigation'>
<li>Home</li>
<li>Biography</li>
<li>Discography</li>
<li>Video</li>
</ul>
</div>
</footer>
</body>
</html>
Changed href="../images/imageName.png" to src="../images/imageName.png"
change the code below code...
<image href="../images/awayFromTheSunCover.jpg" alt="Test" width="100" height="100" />
New code
<image src="../images/awayFromTheSunCover.jpg" alt="Test" width="100" height="100" />
href attr is for links i.e for a tag. For image use src attr
I checked your code. The image path is you mentioned in your HTML code is point to this link only. So check the path and make sure the images are there
It's < img src="" >, not < img href="" >.

Having issues positioning divs

This is basically what I want. Record ID on the left, then the actual post on the right. Instead I get this.
body{
background-color: #333333;
color: #ffffff;
font-family: Arial, Helvetica, sans-serif;
font-size: 16pt;
}
h2{
display:inline;
}
h2 a{
color:#ffffff;
}
hr{
border: 1px solid #db8039;
}
.post {
margin-left:auto;
margin-right:auto;
width: 66%;
background-color: #1a1a1a;
border-radius:10px;
font-size: 15px;
padding: 10px 10px 5px 10px;
}
.button{
background: -webkit-gradient(linear, left top, left bottom, from(#333), to(#222));
background: -moz-linear-gradient(top, #333, #222);
color:#888;
height:40px;
}
div.test{
border: 1px solid white;
}
<div id="post'.$row['postId'].'" class="post">
<div id="left" style="float:left">
<h2>0</h2>
</div>
<div id="right">
<div style="float:left;">
<h2><a href=#>TITLE</a></h2>
</div>
<div style="float:right;">
Posted By: USER on DATE
</div>
<br style="clear:both;"/>
<hr />
<p>BODY</p>
</div>
</div>
I'm sure this is extremely simple to do, I am just at a loss, my CSS skills are... sub par I suppose.
Any help would be greatly appreciated! Thanks!
I made a complete new 1 if you wish to check it out
Demo
Edit: New Demo
HTML
<div class="container">
<div class="count">1</div>
<div class="upper">Test 2</div>
<hr>
<div class="down">Body</div>
</div>
CSS
.container {
width: 500px;
height: 100px;
background: #000;
position: relative;
}
.count {
float: left;
color: #fff;
font-size: 30px;
line-height: 100px;
width: 50px;
text-align: center;
}
.upper {
color: #fff;
font-size: 22px;
line-height: 40px;
}
.down {
color: #fff;
font-size: 22px;
line-height: 40px;
}
Though I don't recommend to use this, it will be pretty easier to achieve this using tables too
Table Demo
HTML
<table border="1">
<tr>
<td rowspan="2"> </td>
<td> </td>
</tr>
<tr>
<td> </td>
</tr>
</table>
CSS
table {
width: 50%;
margin: 30px;
}
table tr:nth-child(1) td:nth-child(1) {
width: 100px;
}
Try adding the following rules:
#left{
width:5%;
display:inline-block
}
#left h2{
font-size:40px;
}
#right{
width:94%;
display:inline-block
}
jsfiddle: http://jsfiddle.net/dPX8J/15/