I can't get rid of a small white line in my HTML page at the bottom:
.text {
width: 90%;
}
.divfloatleft {
float: left;
margin-left: 35%;
width: 15%;
text-align: left;
background: linear-gradient(#036, #0FF);
height: 70%;
margin-top: 6%;
}
.divpaginalogin {
height: 100%;
}
.divfloatright {
float: right;
margin-right: 35%;
width: 15%;
text-align: right;
background: linear-gradient(#0FF, #036);
height: 70%;
margin-top: 6%;
}
.div-container {
background-image: url(../Images/pellicola.png);
background-repeat: no-repeat;
background-size: 100% 100%;
height: 88%;
overflow: hidden;
}
.div-child {
height: 50%;
border: 1px solid;
width: 100%;
position: relative;
}
.div-child a {
text-decoration: none;
font-weight: bold;
color: black;
font-family: helvetica, arial, sans-serif;
}
.div-child:hover {
background-size: 100% 100%;
}
a:hover {
color: #00C;
}
.div-login {
background: linear-gradient(#003, #00F);
color: white;
font-family: helvetica, arial, sans-serif;
font-weight: normal;
font-size: 12px;
border-bottom: 1px solid black;
overflow: auto;
}
.div-footer {
min-height: 5%;
text-align: center;
color: white;
background: linear-gradient(#00F, #003);
border-top: 1px solid black;
}
.table-login {
margin-left: auto;
margin-right: 0px;
}
.loginbutton {
color: white;
background-color: #0066ff;
border-radius: 4px;
border-color: black;
border-width: 1px;
box-shadow: 2px 2px 4px 0px #333333;
font-weight: bold;
font-size: 14px;
width: 65px;
cursor: pointer;
}
This is my Razor page:
<div class="divpaginalogin">
<div class="div-login">
#using (Html.BeginForm())
{
#Html.ValidationSummary(true)
#Html.AntiForgeryToken()
<table class="table-login">
<tr>
<td>#Html.LabelFor(a => a.Username)</td>
<td>#Html.LabelFor(a => a.Password)</td>
</tr>
<tr>
<td>#Html.TextBoxFor(a => a.Username, new { #class = "text" })</td>
<td>#Html.PasswordFor(a => a.Password, new { #class = "text" })</td>
<td>
<input type="submit" value="Login" class="loginbutton" /></td>
</tr>
<tr>
<td>#Html.ValidationMessageFor(a => a.Password)</td>
<td>#Html.ValidationMessageFor(a => a.Username)</td>
</tr>
</table>
}
</div>
<div class="div-container">
<div class="divfloatleft">
<div class="div-child" onmouseover="Show(this, 'Contatti.png')" onmouseout="Hide(this)">
#Html.ActionLink("Contatti", "Contatti", null, new { #style = "position: absolute; top: 0px; left: 0px;" })
</div>
<div class="div-child" onmouseover="Show(this, 'Mappa.png')" onmouseout="Hide(this)">
#Html.ActionLink("Dove Siamo", "DoveSiamo", null, new { #style = "position: absolute; bottom: 0px; left: 0px;" })
</div>
</div>
<div class="divfloatright">
<div class="div-child" onmouseover="Show(this, 'Informazioni.png')" onmouseout="Hide(this)">
#Html.ActionLink("Informazioni", "Informazioni", null, new { #style = "position: absolute; top: 0px; right: 0px;" })
</div>
<div class="div-child" onmouseover="Show(this, 'Chi-siamo.png')" onmouseout="Hide(this)">
#Html.ActionLink("Chi Siamo", "ChiSiamo", null, new { #style = "position: absolute; bottom: 0px; right: 0px;" })
</div>
</div>
</div>
<div id="footer" class="div-footer">
<p>Videoteca online P.IVA: 00000000000</p>
</div>
</div>
at the bottom appear a line which is about 0.3% height, it seems I can't cover the full HTML page if I add 1% to the footer instead the scrollbar appears, I also use this CSS:
* {
margin: 0;
padding: 0;
}
html, body {
height: 100%;
}
I was thinking to set footer height from 5% to 5.3% but I don't know if that's the correcty way since I may be have something wrong in my HTML..
Thanks to all!
Just tested your page, and with this minor modification in your .div-footer class the white line at the bottom seems to be gone. I've tested in several resolutions including mobile.
.div-footer {
min-height: 5%;
text-align: center;
color: white;
background: linear-gradient(#00F, #003);
border-top: 1px solid black;
/* changes added to fix footer at bottom */
position:absolute;
bottom:0;
width:100%;
}
Here's an edited Punkler
Related
Please help me, i am having a tough time with a box shadow, i've been looking for some time now and didn't find a solution
https://jsfiddle.net/4xqavefz/ .input1 / .input2 / .input3
Above is the whole code, in css you are looking for the .input1 ,.input2, and .input3
I am trying to make the box shadow to be seen through the input like below image
image
You could keep the shadow as it is (it falls outside the element) and add in the rest of the coloring with a background-image which is a linear-gradient.
This snippet puts that background-image displaced by 12px (=14px minus a border width).
#font-face {
font-family: futuraptbook;
src: url(../fonts/futuraptbook.ttf);
}
#font-face {
font-family: futuraptdemi;
src: url(../fonts/futuraptbook.ttf);
}
body {
background: black;
}
.block {
display: block;
}
.center {
margin-left: auto;
margin-right: auto;
}
.logo {
width: 185;
height: 161;
}
.p1 {
color: white;
font-size: 24px;
text-align: center;
width: 620px;
height: 63px;
line-height: 32px;
font-family: futuraptbook;
margin-bottom: 100px;
}
.th1 {
color: white;
font-size: 32px;
line-height: 43px;
font-family: futuraptdemi;
padding-bottom: 30px;
}
.age {
font-size: 15px;
text-align: left;
line-height: 20px;
font-family: futuraptdemi;
color: white;
letter-spacing: 1.5px;
}
td input[class^='input'],
td input[class^=" input"] {
width: 176px;
height: 60px;
border: 2px solid #FFFFFF;
background: rgba(0, 0, 0, 0);
background-image: linear-gradient(#54B3A1, #54B3A1);
background-position: 12px 12px;
background-repeat: no-repeat;
box-shadow: 14px 14px 0px 0px #54B3A1;
margin-right: 40px;
color: white;
font-size: 18px;
font-family: futuraptbook;
text-align: center;
}
td input[class^='input']:focus,
td input[class^=" input"] {
box-shadow: 0px 0px 0px 0px black;
width: 218px;
margin-right: -1px;
margin-left: -1px;
border-radius: 0px;
background-image: linear-gradient(transparent, transparent);
}
td input[class^='input']:valid,
td input[class^=" input"] {
box-shadow: 14px 14px 0px 0px #54B3A1;
background-image: linear-gradient(#54B3A1, #54B3A1);
background-position: 12px 12px;
background-repeat: no-repeat;
width: 218px;
margin-right: -1px;
margin-left: -1px;
border-radius: 0px;
}
.btn {
border-radius: 27px;
background: #D94016;
width: 300px;
height: 50px;
margin-top: 50px;
}
.ftr {
position: relative;
text-align: center;
width: 100%;
margin-top: 100px;
margin-bottom: 40px;
}
.under {
text-decoration: none;
position: relative;
}
.under:after {
position: absolute;
content: '';
height: 1px;
bottom: -4px;
width: 75%;
background: #54B3A1;
left: 0px;
}
.logo:hover {
cursor: pointer;
}
.cookiesdiv {
border: 1px solid white;
padding: 10px;
bottom: 0px;
width: 942px;
}
.pcook {
width: 95%;
font-size: 15px;
text-align: left;
color: white;
font-family: futuraptbook;
}
.ckbtn1 {
border-radius: 27px;
background: #54B3A1;
width: 72px;
height: 27px;
color: white;
font-family: futuraptdemi;
font-size: 13px;
}
.ckbtn2 {
border: 1px solid white;
border-radius: 27px;
background: black;
width: 134px;
height: 27px;
color: white;
font-family: futuraptdemi;
font-size: 13px;
}
<html>
<head>
<link rel="stylesheet" href="css/agev.css">
</head>
<body>
<img src="images/viennalogo.png" class="logo center block">
<div>
<p class="p1 center">Welcome! In order to continue your visit on Vienna distribution, you must be of legal drinking age.</p>
</div>
<table class="center">
<tr>
<th colspan="3" class="th1">WHEN WER<span class="under">E Y</span>OU BORN</th>
</tr>
<tr>
<td><label class="age" for="day">DAY (DD)</label></td>
<td><label class="age" for="month">MONTH (MM)</label></td>
<td><label class="age" for="year">YEAR (YYYY)</label></td>
</tr>
<tr>
<td><input type="text" class="input1" name="day" required></td>
<td><input type="text" class="input2" name="month" required></td>
<td><input type="text" class="input3" name="year" required></td>
</tr>
<tr>
<td colspan="3"><button class="btn center block">I AM OF LEGAL DRINKING AGE</button></td>
</tr>
</table>
<footer class="ftr">
<img src="images/facebooklogo.png">
<img src="images/instalogo.png">
<img src="images/twitterlogo.png">
</footer>
<div class="cookiesdiv center">
<table>
<tr>
<td>
<p class="pcook">We use cookies on our website to give you the most relevant experience. By clicking “Accept”, you consent to the use of ALL cookies. Alternatively, you may click “Cookie Settings” to provide a controlled consent.</p>
</td>
<td>
<button class="ckbtn1">ACCEPT</button>
</td>
<td>
<button class="ckbtn2">COOKIE SETTINGS</button>
</td>
</tr>
</table>
</div>
</body>
</html>
Note - to prevent having to repeat the settings for each of the 3 inputs the snippet instead selects by the class beginning with 'input'. You will want to refine that if there is more structure added later to be sure of getting the right elements.
I noted that there was no validation in the sense of making sure that the numbers typed were both numbers and of the right length, but appreciate this is a different question.
The issue is that box-shadow wraps around an element, so you cant use box-shadow here instead you should use an absolute div like in the below example
<td>
<input type="text" class="input1" name="day" required>
<div style="
position: absolute;
width: 80%;
height: 100%;
background: #54b3a1;
top: 16px;
left: 16px;
z-index: 22;
">
</div>
</td>
working example https://jsfiddle.net/ahforcuw/1/
i am programming an App with Angular. And the problem is, that my button is looking different in Safari on my iPhone then on my Simulated iPhone in Chrome.
in Chrome it looks like this:
And on my iPhone it looks like this:
I know that it could be a problem because i have not implemented anything webkit related, but i couldnt find something with webkit that could help me with this.
The Code is the Following:
#colorPicker button {
border: none;
border-radius: 30px;
width: 100%;
height: 86%;
position: relative;
top: -6%;
overflow: hidden;
}
#colorPicker i {
color: white;
}
#colorPicker #second {
background-color: rgb(48, 209, 88);
}
#colorPicker #third {
background-color: rgb(12, 50, 102);
}
#colorPicker #fourth {
background-color: rgb(0, 0, 0);
}
#content {
overflow: hidden;
}
.resetSettings {
border: none;
padding: none;
margin: none;
border-radius: 25px;
color: white;
}
#activeButton {
color: white;
background-color: rgb(88, 86, 214);
width: 100%;
height: 120%;
border-top-left-radius: 25px;
border-top-right-radius: 25px;
border: none;
padding: none;
margin: none;
}
#settingsDatenschutz {
width: 80%;
border: none;
background-color: transparent;
padding: none;
margin: none;
margin-right: 10%;
margin-left: 10%;
border-radius: 25px;
font-family: Arial, Helvetica, sans-serif;
}
#settingsDatenschutz p {
font-size: 18pt !important;
font-family: Arial, Helvetica, sans-serif !important;
}
#settingsDatenschutz i {
font-size: 18pt !important;
}
#datenschutz {
margin: none;
border: none;
padding: none;
border-top-left-radius: 25px;
border-top-right-radius: 25px;
border-bottom-right-radius: 0px;
border-bottom-left-radius: 0px;
top: 0;
bottom: 0;
right: 0;
left: 0;
width: 100%;
height: 100%;
position: fixed;
z-index: 102;
background-color: rgb(44, 44, 46);
overflow-y: scroll;
}
#datenschutz button {
width: 100%;
bottom: 0;
position: fixed;
font-size: 20pt;
border-top-left-radius: 25px;
border-top-right-radius: 25px;
}
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet"/>
<style>
#content {
background-color: white;
color: black;
border: none;
border-bottom-left-radius: 20px;
border-bottom-right-radius: 20px;
margin: 5%;
margin-top: 2%;
width: 90%;
position: relative;
top: 12%;
left: 0;
right: 0;
overflow: scroll;
padding: 15px;
font-size: 20pt;
}
#content i {
font-size: 28pt;
padding-top: 5px;
}
#content p {
display: inline;
}
#view {
z-index: 2;
position: relative;
top: 0;
margin: none;
width: 100%;
height: 100%;
}
#colorPicker {
width: 90%;
height: 90%;
margin: 5%;
margin-top: 20%;
}
/* #colorPicker button {
border: none;
border-radius: 30px;
width: 100%;
position: relative;
top: -6%;
}
#colorPicker i {
color: white;
}
#colorPicker #default {
background-color: rgb(10, 132, 255);
}
#colorPicker #second {
background-color: rgb(48, 209, 88);
}
#colorPicker #third {
background-color: rgb(12, 50, 102);
}
#colorPicker #fourth {
background-color: rgb(0, 0, 0);
} */
</style>
<div id="view">
<div id="content">
<br>
<div id="colorPickerButtonView">
<div class="row">
<div id="firstMain" class="col-6">
<div class="activeColorFromColorPicker" id="colorPicker">
<button class="primaryColorDefault" alt="Hellblauer Hintergrund, weiße Schrift" onclick="colorPicker(0)" id="default">
<br>
<i class="fab fa-accessible-icon"></i>
<br>
<div id="activeButton">
<p>Active!</p>
</div>
</button>
</div>
</div>
<div id="secondMain" class="col-6">
<div id="colorPicker">
<button alt="Helglgrüner Hintergrund, weiße Schrift" onclick="colorPicker(1)" id="second">
<br>
<i class="fab fa-accessible-icon"></i>
<br>
<div id="activeButton">
<p>Active!</p>
</div>
</button>
</div>
</div>
<div id="thirdMain" class="col-6">
<div id="colorPicker">
<button alt="Dunkelblauer Hintergrund, weiße Schrift" onclick="colorPicker(2)" id="third">
<br>
<i class="fab fa-accessible-icon"></i>
<br>
<div id="activeButton">
<p>Active!</p>
</div>
</button>
</div>
</div>
<div id="fourthMain" class="col-6">
<div id="colorPicker">
<button alt="Schwarzer Hintergrund, weiße Schrift" onclick="colorPicker(3)" id="fourth">
<br>
<i class="fab fa-accessible-icon"></i>
<br>
<div id="activeButton">
<p>Active!</p>
</div>
</button>
</div>
</div>
</div>
</div>
</div>
</div>
<router-outlet></router-outlet>
The given code has several errors in the HTML such as multiple instances of the same id.
The error that is most likely to be confusing browsers as they won't necessarily know how you want the code parsed is having a div (and also a p) element within a button element. This is not allowed in the spec. See for example div not allowed as child element of button
Run your code through the W3C validator to get the full details.
Then the best thing to do next is probably to change the button elements for div elements with class="button", change the CSS which refers to button to .button
And check and correct any other validation errors.
Then if the problem is not cured we are at least on solid ground for having a further look - particularly at the implementations of class="row" when an inner div has a height larger than the container such as you have in this example
My slideshow div is paced above my header nav in HTML to create a fullscreen slideshow but all the elements on my page are fading with my slideshow, how do I prevent that?
Thank you
I'm new at this, so I'm not sure if the layout is correct or not.
enter code here
<head>
<meta charset="UTF-8">
<title>Untitled Document</title>
<link href="main.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
"use strict";
var scroll_start = 0;
var startchange = $('#about');
var offset = startchange.offset();
$(document).scroll(function() {
scroll_start = $(this).scrollTop();
if(scroll_start > offset.top) {
$('#header').css('background-color', '#3A3939');
} else {
$('#header').css('background-color', 'transparent');
}
});
});
var currentBackground = 0;
var backgrounds = [];
backgrounds[0] = 'images/pic3.png';
backgrounds[1] = 'images/pic2.png';
backgrounds[2] = 'images/pic1.png';
backgrounds[3] = 'images/pic4.png';
function changeBackground() {
currentBackground++;
if(currentBackground > 3) currentBackground = 0;
$('.slideshow').fadeOut(900,function() {
$('.slideshow').css({
'background-image' : "url('" + backgrounds[currentBackground] + "')"
});
$('.slideshow').fadeIn(1000);
});
setTimeout(changeBackground, 3500);
}
$(document).ready(function() {
setTimeout(changeBackground, 3500);
});
</script>
</head>
<body>
<div id="home">
<div class="slideshow">
<div id="header">
<nav>
<ul>
<li>Home</li>
<li>About</li>
<li>Projects</li>
<li>Contact</li>
</ul>
<div id="styledimg"></div>
</nav>
</div>
<div id="head-soc">
<div id="linkedin-icon">Linkedin</div>
<div id="youtube-icon">Youtube</div>
<div id="facebook-icon">Facebook</div>
</div>
<div class="content">
<p>Create, Collaborate, Innovate</p>
</div>
</div>
</div>
<div id="about">
<div class="wrapper">
<h4>Titus Jackson</h4>
<p>Film Maker ~ Screen Writer ~ Editor</p>
</div>
<img src="images/Titus-Jackson1.jpg" alt="Titus Jackson" width="425" height="365" border="0" />
<div id="section2">
<p>For over 15 years <span>Cinemuze</span> has had the honor of working with some of the most talented creative collaborators tulsa has to offer. We love working on a variety of projects. As it is our goal to be a well rounded company with our fingers in a lot of pies.</p>
<p>Our paramount value is to approach the material with excellence, and an original point of view to tell a unique and compelling story. It is our belief that life is what you make of it, and the saddest lost is not to explore all your potential in the short time you've been given.</p>
<p>We've had the opportunity to work on multiple feature films and national television shows ranging from christian television to TLC television. We've created multiple award winning music vidoes, short films and even a feature film. Feel free to take a look around the site, and drop us an email, we look forward to hearing from you.</p>
<img src="images/email1.png" alt="email" width="26" height="26" />
</div>
</div>
<div id="projects">
<h5>View our current projects:</h5>
<div class="wrapper1">
<iframe width="265" height="200" src="https://www.youtube.com/embed/8CZJzUk7fFM" frameborder="0" allowfullscreen></iframe>
<p>Eugene Gregory Promo</p>
</div>
<div id="wrapper2">
<iframe width="265" height="200" src="https://www.youtube.com/embed/cLm3Vh4_Ruc" frameborder="0" allowfullscreen></iframe>
<p>Family Cup Promo</p>
</div>
<div class="wrapper3">
<iframe width="265" height="200" src="https://www.youtube.com/embed/2t9-vVNgF7c" frameborder="0" allowfullscreen></iframe>
<p>This Generation</p>
</div>
</div>
<div id="contact">
<section3>
<h3>To connect with Us:</h3>
<p><span>Cinemuze</span> is based in Tulsa, Oklahoma and travels widely for a variety of projects.</p>
<p>If your interested in our work, you can connect with us via email or phone.</p>
</section3>
<div class="section4">
<img src="images/email1.png" alt="email" width="26" height="26" />
<a href="mailto:titusjackson#mac.com">
<p>titusjackson#mac.com</p>
</a><img src="images/phone.png" alt="phone" width="24" height="24" />
<p>+1 (918) 671-3340</p>
</div>
</div>
<footer>
</footer>
</body>
</html>
#charset "UTF-8";
/* CSS Document */
body {
font: 100%/1.4 Verdana, Arial, Helvetica, sans-serif;
background-color: #42413C;
margin: 0;
padding: 0;
color: #000;
}
#header {
width: 100%;
margin-top: -15px;
position: fixed;
background-color: transparent;
transition-duration: 1s;
}
div#header nav {
width: 1425;
height: 110px;
}
div#header ul {
list-style: none;
margin-left: 100px;
float: left;
}
div#header li {
float: left;
margin-left: 64px;
margin-top: 10px;
}
div#header a {
color: white;
text-decoration: none;
line-height: 45px;
font-size: .9em;
text-transform: capitalize;
}
div#header a:hover {
color: rgba(249,0,3,1.00);
}
div#styledimg {
background-image: url(images/logo.png);
background-repeat: no-repeat; width: 224px;
height: 85px;
float: right;
margin-right: 150px;
margin-top: 10px;
z-index: 1003;
}
/*page-specific header styles*/
#header {
background-color: rgba(60,59,59,1.00);
width: 1425;
height: 110px;
}
/* layout styles*/
/*home page*/
.slideshow {
background-image:url(images/pic3.png);
background-size: cover;
background-repeat: no-repeat;
background-position: 500px 0px 0px;
background-attachment: fixed;
top: 0px;
left: 0px;
width: 100%;
height: 900px;
line-height: 0px;
margin-top: -330px;
padding-top: -15px;
}
#header {
background-color: transparent;
}
#head-soc {
width: 129;
height: 86;
margin: 10px;
padding: 0px;
float: right;
margin-right: 40px;
margin-top: 255px;
right: 25px;
position: fixed;
z-index: 2;
}
#head-soc a {
margin-top: 10px;
margin-right: 20px;
}
#linkedin-icon a {
text-indent: -9999px;
font-size: 0;
line-height: 0;
overflow: hidden;
height: 43px;
width: 43px;
border: 0;
background-image: url(images/socialsprites_white.png);
display: block;
float: right;
background-position: 0px 0px;
}
#linkedin-icon a:hover {
background-image: url(images/socialsprites_white.png);
background-position: 0px -43px;
}
#youtube-icon a {
text-indent: -9999px;
font-size: 0;
line-height: 0;
overflow: hidden;
height: 43px;
width: 43px;
border: 0;
background-image: url(images/socialsprites_white.png);
display: block;
float: right;
margin-left: 20px;
background-position: -43px 0px;
}
#youtube-icon a:hover {
background-image: url(images/socialsprites_white.png);
background-position: -43px -43px;
}
#facebook-icon a {
text-indent: -9999px;
font-size: 0;
line-height: 0;
overflow: hidden;
height: 43px;
width: 43px;
border: 0;
background-image: url(images/socialsprites_white.png);
display: block;
float: right;
background-position: -86px -85px;
}
#facebook-icon a:hover {
background-image: url(images/socialsprites_white.png);
background-position: -86px -128px;
}
.content p {
font-family: BlairMdITC TT-Medium;
font-size: 44px;
line-height: 120%;
width: 550px;
text-align: center;
padding-top: 360px;
margin-top: 330px;
margin-left: 575px;
color: rgba(248,241,241,1.00);
}
/* about page*/
div#about {
background-color:rgba(188,184,184,1.00);
height: 550px;
margin-top: -35px;
padding-top: 100px;
}
.wrapper h4 {
font-famiy: Geneva;
font-size: 25px;
padding-left: 224px;
color: rgba(249,0,3,1.00);
margin-bottom: -20px;
}
.wrapper p {
font-family: Geneva;
font-size: 12px;
margin-left: 226px;
margin-top: 20px;
margin-bottom: 15px;
color: rgba(134,133,133,1.00);
}
h6 {
padding-left: 225px;
margin-top: -20px;
margin-bottom: 10px;
color: rgba(60,59,59,1.00);
}
img {
float: left;
margin-left: 225px;
margin-right: 15px;
}
#section2 {
font-family: Helvetica;
font-size: 16px;
color: rgba(60,59,59,1.00);
width: 1280px;
padding-top: -80px;
height: 300px;
}
#section2 p {
color: rgba(60,59,59,1.00);
}
#section2 img {
margin-left: 2px;
}
span {
color: rgba(249,0,3,1.00);
}
/* projects page */
div#projects {
background-color: #3A3939;
background-position: 25px;
height: 450px;
margin: 0px;
line-height: 0;
padding-top: 25px;
}
.wrapper1 {
float: left;
width: 265;
height: 200px;
margin-left: 200px;
padding-top: 50px;
}
#wrapper2 {
float: right;
width: 265;
height: 200px;
margin-right: 200px;
padding-top: 50px;
}
.wrapper3 {
float: left;
margin-left: 175px;
padding-top: 50px;
width: 265;
height: 200px;
}
.wrapper1 p {
margin-left: 42px;
font-family: BlairMdITC TT-Medium;
font-size: 20px;
color: rgba(249,0,3,1.00);
margin-top: 20px;
}
#wrapper2 p {
margin-left: 65px;
font-family: BlairMdITC TT-Medium;
font-size: 20px;
color: rgba(249,0,3,1.00);
margin-top: 20px;
}
.wrapper3 p {
margin-left: 70px;
font-family: BlairMdITC TT-Medium;
font-size: 20px;
color: rgba(249,0,3,1.00);
margin-top: 20px;
}
div#projects h5 {
margin-left: 650px;
font-size: 20px;
font-family: Helvetica, Arial, sans-serif;
color:rgba(179,178,178,1.00);
padding-bottom: 45px;
margin-bottom: -15px;
}
p {
font-size: 16px;
margin-left: 195px;
color: rgba(249,247,247,1.00);
}
/* contact page */
div#contact {
background-image:url(images/studio4.png);
background-size: cover;
background-attachment: fixed;
padding-top: 35px;
padding-bottom: 100px;
}
section3 h3 {
font-family: Arial, Helvetica, sans-serif;
font-size: 22px;
color: rgba(249,0,3,1.00);
margin-left: 660px;
margin-top: 75px;
}
section3 p {
font-family: Arial, Helvetica, sans-serif;
font-size: 18px;
color: rgba(255,255,255,1.00);
width: 650px;
padding-left: 85px;
margin-left: 385px;
}
.section4 {
font-family: Helvetica, sans-serif;
font-size: 16px;
color: rgba(255,255,255,1.00);
margin-left: 440px;
margin-top: 50px;
}
.section4 a {
text-decoration: none;
}
.section4 a p:hover {
color: rgba(249,0,3,1.00);
}
/* ~~ The footer ~~ */
/*HTML 5 support - Sets new HTML 5 tags to display:block so browsers know how to render the tags properly. */
header, section, footer, aside, article, figure {
display: block;
}
You've placed all of your HTML inside of the div with the slideshow class:
<div class="slideshow"> //this is left open
//other divs are closed later on like this one:
<div id="styledimg"></div>
//but all the divs below slideshow are inside of the slideshow div
So whatever animations you're doing to the slideshow div, will affect all of its children.
I am having trouble with my footer menu links and social icon buttons. I created the footer so that it will stretch across the entire browser window. However now when I lay the menu links and social media icons inside the div they are moving whenever the page is re-sized. What do I need to do in order to make the placement of the menu links and social media links stay in the proper place?
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>MECA Basketball Club</title>
<script type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js?ver=3.0.1">
</script>
<script type="text/javascript" src="jQuery/infinite-rotator.js"></script>
<script type="text/javascript" src="jQuery/infinite-rotator-2.js"></script>
<script type="text/javascript" src="jQuery/infinite-rotator-3.js"></script>
<script type="text/javascript" src="jQuery/infinite-rotator-4.js"></script>
<style type="text/css">
body
{
background-image: url(img/backgroundimg.png);
background-repeat: repeat-x;
/*background-color:white;*/
}
#maincontainer
{
width: 1024px;
margin: 0 auto;
}
#header
{
position: absolute;
top: 0;
left: 0;
min-width: 100%;
height: 47px;
background-image: url(img/headerimg.png);
}
#headerlogo
{
position: absolute;
top: 0;
width: 201px;
height: 118px;
background-image: url(img/headerlogo_padding.png);
}
#header-nav-menu
{
position: relative;
left: 580px;
top: 0px;
width: 400px;
list-style-type: none;
}
.nav-button-header-menu-1
{
float: right;
font-family: Calibri;
color: white;
text-decoration: none;
width: 125px;
}
.nav-button-header-menu-2
{
float: right;
font-family: Calibri;
color: white;
text-decoration: none;
width: 104px;
}
.nav-button-header-menu-3
{
float: right;
font-family: Calibri;
color: white;
text-decoration: none;
width: 105px;
}
.nav-button-header-menu-1:hover
{
color: #d4d3d2;
}
.nav-button-header-menu-2:hover
{
color: #d4d3d2;
}
.nav-button-header-menu-3:hover
{
color: #d4d3d2;
}
#main-nav-container
{
width: 197px;
height: 500px;
float: left;
margin-top: 95px;
}
#mainnav
{
position: relative;
top: 0px;
left: 0px;
list-style-type: none;
margin: 0;
padding-left: 8px;
}
.navbutton-red-top
{
/*Button Style*/
display: block;
height: 40px;
width: 193px;
background-color: #c41002;
padding-top: 20px;
border-bottom: 1px solid;
border-color: #a30e03;
/*Text Style*/
font-family: Calibri;
font-weight: 800;
color: white;
text-align: center;
text-decoration: none;
/*Making Button Fancy*/
border-radius: 10px 10px 0px 0px;
box-shadow: 0px 3px 8px #515050;
}
.navbutton-red
{
/*Button Style*/
display: block;
height: 40px;
width: 193px;
background-color: #c41002;
padding-top: 20px;
border-bottom: 1px solid;
border-color: #a30e03;
/*Text Style*/
font-family: Calibri;
font-weight: 800;
color: white;
text-align: center;
text-decoration: none;
/*Making Button Fancy*/
box-shadow: 0px 3px 8px #515050;
}
.navbutton-black
{
/*Button Style*/
display: block;
height: 40px;
width: 193px;
background-color: black;
padding-top: 20px;
border-bottom: 1px solid;
border-color: #515050;
/*Text Style*/
font-family: Calibri;
font-weight: 800;
color: white;
text-align: center;
text-decoration: none;
/*Making Button Fancy*/
box-shadow: 0px 3px 8px #515050;
}
.navbutton-black-bottom
{
/*Button Style*/
display: block;
height: 40px;
width: 193px;
background-color: black;
padding-top: 20px;
border-bottom: 1px solid;
border-color: #515050;
/*Text Style*/
font-family: Calibri;
font-weight: 800;
color: white;
text-align: center;
text-decoration: none;
/*Making Button Fancy*/
border-radius: 0px 0px 10px 10px;
box-shadow: 0px 3px 8px #515050;
}
.navbutton-red-top:hover
{
background: #e91101;
}
.navbutton-red:hover
{
background: #e91101;
}
.navbutton-black:hover
{
background: #2c2b2b;
}
.navbutton-black-bottom:hover
{
background: #2c2b2b;
}
#content
{
background-color: white;
width: 1024px;
float: left;
box-shadow: 0px 3px 20px #515050;
}
#rotating-item-wrapper
{
position: relative;
margin-left: 240px;
margin-top: 20px;
padding: 150px;
}
.rotating-item
{
display: none;
position: absolute;
top: 0;
left: 0px;
}
#placeholderdiv
{
padding-left: 40px;
padding-top: 10px;
}
#slideshow
{
padding-left: 40px;
padding-top: 10px;
}
#video1
{
padding-left: 40px;
padding-top: 10px;
float: left;
}
.stats-offense
{
padding-left: 10px;
padding-top: 10px;
float: left;
}
#events1
{
padding-left: 40px;
padding-top: 10px;
float: left;
}
#rotating-item-wrapper-2
{
position: relative;
left: 455px;
top: 281px;
}
.rotating-item-2
{
display: none;
position: absolute;
top: 0;
left: 0px;
}
#rotating-item-wrapper-3
{
position: relative;
left: 240px;
top: 532px;
padding: 300px;
}
.rotating-item-3
{
display: none;
position: absolute;
top: 0;
left: 0px;
}
.stats-defense
{
position: relative;
left: 766px;
top: -68px;
overflow: auto;
padding-bottom: 206px;
}
#rotating-item-wrapper-4
{
position: relative;
left: 240px;
top: -260px;
padding: 35px;
}
.rotating-item-4
{
display: none;
position: absolute;
top: 0;
left: 0px;
}
#footer-home
{
position: absolute;
bottom: -600px;
left: 0;
min-width: 100%;
height: 200px;
background-image: url(img/footerimg.png);
}
#footer-nav-menu-left
{
position: absolute;
left: 0px;
list-style-type: none;
margin-left: 430px;
}
#footer-nav-menu-right
{
position: absolute;
list-style-type: none;
margin-left: 550px;
}
.nav-button-footer
{
font-family: Calibri;
color: white;
text-decoration: none;
}
.nav-button-footer:hover
{
color: #c5c5c4;
}
#SocialMedia
{
font-family: Calibri;
color: white;
}
#Facebook-icon
{
}
#Twitter-icon
{
}
</style>
</head>
<body>
<div id="maincontainer">
<div id="header"></div>
<div id="headerlogo"></div>
<ul id="header-nav-menu">
<li><a class="nav-button-header-menu-3" href="#RegisterLeague">Login</a></li>
<li><a class="nav-button-header-menu-2" href="#RegisterLeague">Join The
Club</a></li>
<li><a class="nav-button-header-menu-1" href="#RegisterLeague">Register
League</a></li>
</ul>
<div id="content">
<div id="main-nav-container">
<ul id="mainnav">
<li><a class="navbutton-red-top" href="#stats">STATS</a></li>
<li><a class="navbutton-red" href="#stats">EVENTS</a></li>
<li><a class="navbutton-red" href="#stats">FIND A LEAGUE</a></li>
<li><a class="navbutton-red" href="#stats">SCHEDULE</a></li>
<li><a class="navbutton-black" href="#stats">BECOME A REFEREE</a></li>
<li><a class="navbutton-black" href="#stats">REGISTER LEAGUE</a></li>
<li><a class="navbutton-black-bottom" href="#stats">JOIN THE CLUB</a>
</li>
</ul>
</div>
<div id="rotating-item-wrapper">
<img class="rotating-item" src="img/ContentArea1/AdOne/MainAd1.png" />
<img class="rotating-item" src="img/ContentArea1/AdOne/MainAd2.png" />
</div>
<div id="video1">
<img src="img/ContentArea1/Video/video1img.png" />
</div>
<div class="stats-offense">
<img src="img/ContentArea1/Stats/stats1img.png" />
</div>
<div id="events1">
<img src="img/ContentArea1/Events/events1.png" />
</div>
<div id="rotating-item-wrapper-2">
<img class="rotating-item-2" src="img/ContentArea1/AdTwo/Ad2Img.png" />
<img class="rotating-item-2" src="img/ContentArea1/AdTwo/Ad23Img.png" />
</div>
<div id="rotating-item-wrapper-3">
<img class="rotating-item-3" src="img/ContentArea1/AdThree/Ad3Img.png" />
<img class="rotating-item-3" src="img/ContentArea1/AdThree/Ad4Img.png" />
</div>
<div class="stats-defense">
<img src="img/ContentArea1/Events/events1.png" />
</div>
<div id="rotating-item-wrapper-4">
<img class="rotating-item-4" src="img/ContentArea1/VBanner/vbanner1img.png"
/>
<img class="rotating-item-4" src="img/ContentArea1/VBanner/vbanner2img.png"
/>
</div>
</div>
<div id="footer-home">
<ul id="footer-nav-menu-left">
<li><a class="nav-button-footer" href="#RegisterLeague">About</a></li>
<li><a class="nav-button-footer" href="#RegisterLeague">Contact Us</a></li>
<li><a class="nav-button-footer" href="#RegisterLeague">Press Inquiry</a>
</li>
</ul>
<ul id="footer-nav-menu-right">
<li><a class="nav-button-footer" href="#RegisterLeague">Terms of Use</a>
</li>
<li><a class="nav-button-footer" href="#RegisterLeague">Privacy Policy</a>
</li>
</ul>
<div id="SocialMedia">Follow Us</div>
<div id="Facebook-icon">
<img src="img/SocialMediaIcon/FB_icon.png" alt="Facebook" /></div>
<div id="Twitter-icon">
<img src="img/SocialMediaIcon/Twitter_icon.png" alt="Twitter" /></div>
<div id="Instagram-icon">
<img src="img/SocialMediaIcon/IG_icon.png" alt="Instagram" /></div>
<div id="YouTube-icon">
<img src="img/SocialMediaIcon/YouTube_icon.png" alt="YouTube" /></div>
</div>
</div>
</body>
</html>
Click the link below to see how it currently looks:
http://www.micre8tivegroup.com/default.html
As I was writing on the comments section, this is not a single thing issue. This is a problem with many things being done incorrectly. But mainly:
The structure of the page is poorly designed. I understand that this page is more of testing, but creating a web site is not directly getting into coding but analyzing and designing a solution. Coding may be the "fun part", but it's not the most important.
The positioning of the elements is incorrect. As a personal recommendation: avoid using position:absolute for controls. In your page, the logo is a good example of position absolute (although it could be done in other ways), all the rest absolute positioning shouldn't be there and breaks the page.
Here you have a link to a version the solves the position problems that you commented about: http://muzaw.com/test.html. Test it, and let me know if that's what you were aiming for (I know not everything will fit perfectly but that's just a matter of changing some values in the CSS).
The changes that I made:
Removed the position absolute for the header and footer (or changed to position:relative)
Restructured the page to fit a "more convenient" web page design.
Changed the CSS of some of the elements.
I understand you are learning, that I sound patronizing, and that my comments and answer may frustrate you; but if you start learning bad things from the beginning, it will be worse later.
I've found a way to do what you want, but the header and the footer will be the same width as your mainContainer.
Just change your CSS to :
#footer-home
{
position: absolute;
bottom: 0; /* Put it back to 0 */
left: 0;
min-width: 100%;
height: 200px;
background-image: url(img/footerimg.png);
}
#maincontainer
{
width: 1024px;
margin: 0 auto;
/* Add the code below */
left: 0;
right: 0;
position: absolute;
}
That way, the footer will always stay at the bottom.
Being a newbie i'm struggling with the CSS of a site.
I've made an site with a couple of DIV's and wrappers but i can't get the overflow of the inner DIV to stretch the outer DIV (wrapper). I've seen http://www.sitepoint.com/examples/clearing_floats/example2.php but i'm not able to see my mistake.
Thanks in advance!
body {
text-align: center;
background: url(http://www.keenfuel.nl/v2/wb/templates/keenfuel/images/background.jpg)
}
#wrapper {
text-align: left;
width: 1250px;
padding: 0px;
margin: 0 auto;
height: 100%;
overflow:auto;
}
#logo {
position: absolute;
top: 50px;
right: 10px;
}
#header {
text-align:left;
width: 100%;
height: 155px;
position: relative;
background: url(http://www.keenfuel.nl/v2/wb/templates/keenfuel/images/body2_bg.fw_r1_c2.jpg);
padding-left: 4px;
z-index:9;
}
#menu {
text-align: left;
position: absolute;
bottom: 6px;
padding-left: 4px;
}
#headerimage {
text-align: left;
width: 100%;
height: 268px;
background: url(http://www.keenfuel.nl/v2/wb/templates/keenfuel/images/keenfuel_r2_c2.jpg);
}
#mainwrapper {
text-align:left;
width: 100%;
height: 488px;
background: url(http://www.keenfuel.nl/v2/wb/templates/keenfuel/images/body2_bg.fw_r 3_c2.jpg);
background-repeat: no-repeat;
}
#maincontent{
width: 800px;
height: 488px;
float: left;
padding-left: 15px;
font-family:Verdana, Geneva, sans-serif;
color: #000000;
}
#newscontent{
width: 360px;
heigth: 200px;
float: right;
margin-top: 20px;
background: url(http://www.keenfuel.nl/v2/wb/templates/keenfuel/images/news_background.fw.png);
overflow:hidden;
color: #000000;
padding-left: 15px;
font-family: Verdana, Geneva, sans-serif;
font-size: 11px;
}
#footer {
height: 56px;
background: url(http://www.keenfuel.nl/v2/wb/templates/keenfuel/images/body2_bg.fw_r6_c2.jpg);
text-align: center;
font-family: Verdana, Geneva, sans-serif;
clear:both;
}
<div id="wrapper">
<div id=header><div id="logo"></div>
<div id="menu">
<?php show_menu2(0, SM2_ROOT, SM2_START, SM2_ALL, '<font color="#FFFFFF"> | [ac][menu_title]</a>', '', '', '', '[ac][menu_title]</a></font>'); ?>
</div>
</div>
<div id="headerimage"></div>
<div id="mainwrapper">
<div id="maincontent"><?php page_content(1); ?><br style="clear:both"/></div>
<div id="newscontent">
<?php
// customized cwsoft-anynews function call
$config = array(
'group_id_type' => 'section_id',
'display_mode' => 4,
'max_news_length' => 20,
);
echo getNewsItems($config);
?>
<br style="clear:both"/>
</div>
</div>
<div id="footer"><br /></div>
if you strictly follow the link you gave, your newscontent div must become part of the main content div and also your main content must have width=100%. Like this:
<html>
<head>
<style>
body {
text-align: center;
background: url (http://www.keenfuel.nl/v2/wb/templates/keenfuel/images/background.jpg)
}
#wrapper {
text-align: left;
width: 1250px;
padding: 0px;
margin: 0 auto;
height: 100%;
overflow:auto;
}
#logo{
position: absolute;
top: 50px;
right: 10px;
}
#header {
text-align:left;
width: 100%;
height: 155px;
position: relative;
background: url(http://www.keenfuel.nl/v2/wb/templates/keenfuel/images/body2_bg.fw_r1_c2.jpg);
padding-left: 4px;
z-index:9;
}
#menu{
text-align: left;
position: absolute;
bottom: 6px;
padding-left: 4px;
}
#headerimage{
text-align: left;
width: 100%;
height: 268px;
background: url(http://www.keenfuel.nl/v2/wb/templates/keenfuel/images/keenfuel_r2_c2.jpg);
}
#mainwrapper{
text-align:left;
width: 100%;
height: 488px;
background:url(http://www.keenfuel.nl/v2/wb/templates/keenfuel/images/body2_bg.fw_r 3_c2.jpg);
background-repeat: no-repeat;
}
#maincontent{
width: 100%;
height: 488px;
float: left;
padding-left: 15px;
font-family:Verdana, Geneva, sans-serif;
color: #000000;
}
#newscontent{
width: 360px;
heigth: 200px;
float: right;
margin-top: 20px;
background: url(http://www.keenfuel.nl/v2/wb/templates/keenfuel/images/news_background.fw.png);
overflow:hidden;
color: #000000;
padding-left: 15px;
font-family: Verdana, Geneva, sans-serif;
font-size: 11px;
}
#footer{
height: 56px;
background: url(http://www.keenfuel.nl/v2/wb/templates/keenfuel/images/body2_bg.fw_r6_c2.jpg);
text-align: center;
font-family: Verdana, Geneva, sans-serif;
clear:both;
}
</style>
</head>
<body>
<div id="wrapper">
<div id=header> <div id="logo"> </div>
<div id="menu"> <?php show_menu2(0, SM2_ROOT, SM2_START, SM2_ALL, '<font color="#FFFFFF"> | [ac][menu_title]</a>', '', '', '', '[ac][menu_title]</a></font>'); ?> </div> </div>
<div id="headerimage"></div>
<div id="mainwrapper">
<div id="maincontent"><?php page_content(1); ?> <br style="clear:both"/>
<div id="newscontent">
<?php
// customized cwsoft-anynews function call
$config = array(
'group_id_type' => 'section_id',
'display_mode' => 4,
'max_news_length' => 20,
);
echo getNewsItems($config);
?>
<br style="clear:both"/>
</div>
</div>
</div>
<div id="footer"><br />
</div>
</body>
</html>
However if your newscontent div must become part of the main content div are meant to become a sort of table like view and your newscontent should fill up free space at the end - this could be achieved that way:
<html>
<head>
<style>
body {
text-align: center;
background: url (http://www.keenfuel.nl/v2/wb/templates/keenfuel/images/background.jpg);
}
#wrapper {
text-align: left;
width: 1250px;
padding: 0px;
margin: 0 auto;
height: 100%;
overflow-x:hidden;
}
#logo{
position: absolute;
top: 50px;
right: 10px;
}
#header {
text-align:left;
width: 100%;
height: 155px;
position: relative;
background: url(http://www.keenfuel.nl/v2/wb/templates/keenfuel/images/body2_bg.fw_r1_c2.jpg);
padding-left: 4px;
z-index:9;
}
#menu{
text-align: left;
position: absolute;
bottom: 6px;
padding-left: 4px;
}
#headerimage{
text-align: left;
width: 100%;
height: 268px;
background: url(http://www.keenfuel.nl/v2/wb/templates/keenfuel/images/keenfuel_r2_c2.jpg);
}
#mainwrapper{
text-align:left;
width: 100%;
height: 488px;
background:url(http://www.keenfuel.nl/v2/wb/templates/keenfuel/images/body2_bg.fw_r 3_c2.jpg);
background-repeat: no-repeat;
position:relative;
}
#maincontent{
width: 800px;
height: 488px;
display:inline-block;
padding-left: 15px;
font-family:Verdana, Geneva, sans-serif;
color: #000000;
overflow-x:hidden;
}
#newscontent{
left:800px;
heigth: 200px;
right:1px;
display:inline-block;
margin-top: 20px;
color: #000000;
padding-left: 15px;
font-family: Verdana, Geneva, sans-serif;
font-size: 11px;
background-color:#770000;
overflow-x:hidden;
}
#footer{
height: 56px;
background: url(http://www.keenfuel.nl/v2/wb/templates/keenfuel/images/body2_bg.fw_r6_c2.jpg);
text-align: center;
font-family: Verdana, Geneva, sans-serif;
clear:both;
}
</style>
</head>
<body>
<div id="wrapper">
<div id=header> <div id="logo"> </div>
<div id="menu"> <?php show_menu2(0, SM2_ROOT, SM2_START, SM2_ALL, '<font color="#FFFFFF"> | [ac][menu_title]</a>', '', '', '', '[ac][menu_title]</a></font>'); ?> </div> </div>
<div id="headerimage"></div>
<div id="mainwrapper">
<div id="maincontent"><?php page_content(1); ?> <br style="clear:both"/> </div>
<div id="newscontent">
<?php
// customized cwsoft-anynews function call
$config = array(
'group_id_type' => 'section_id',
'display_mode' => 4,
'max_news_length' => 20,
);
echo getNewsItems($config);
?>
<br style="clear:both"/>
</div>
</div>
<div id="footer"><br />
</div>
</body>
</html>