I'm working on a project, I have the layout how my client wants it. I'm rekatively new to responsive layouts. In mobile devices with width 321px Im struggling to get right column to expand over the full width of the screen/device.
I understand this is likely a duplicate question, below is a fiddle but if anyone can take a look and either offer some adive or point me to previous answers I'd be grateful.
#media only screen
and (max-width : 320px) {
.container {
width: 321px ! important;
}
#columnright {
display: block ! important;
float: non ! important;
width: 100% ! important;
clear: right;
margin-left; 10%;
}
}
body {
background-image: url(images/khBG.gif);
background-position: center center;
background-repeat: no-repeat;
background-attachment: fixed;
background-size: cover;
background-color: #464646;
margin: 0;
padding: 0;
font-family: "Century Gothic", Verdana, sans-serif;
color: black;
border: 1px solid black;
}
#banner {
padding-right: 5%;
opacity: 0.7234;
background-color: #ffffff;
border-bottom: 1px solid black;
}
#banner ul {
float: right;
font-size: 0.70em
}
#banner ul li {
display: block;
float: left
}
#columnleft {
padding-left: 1%;
background-color: #ffffff;
border-bottom: 1px solid black;
opacity: 0.7234;
float: left;
width: 15%;
margin-left: 0%;
padding-top: 1%;
}
#columnright {
padding-left: 1%;
background-color: #ffffff;
border-bottom: 1px solid black;
opacity: 0.7234;
padding-top: 2%;
width: 50%;
float: right;
overflow: hidden;
margin-right: 30%;
}
#columnright ul {
overflow: hidden;
}
#footer {
clear: both;
background-color: #ffffff;
filter: alpha(opacity=60);
opacity: 0.7234;
padding-bottom: 1em;
padding-left: 200px;
font-size: .60em;
}
#pic-gallery {
margin-left:17.5%;
width: 400px;
height: 400px;
border: 1px solid black;
align-items: center;
display:flex;
}
#pic-ver {
padding-top: 50px;
padding-right: 0px;
padding-bottom: 0px;
padding-left: 100px;
}
#pic-hor {
padding-top: 100px;
padding-right: 0px;
padding-bottom: 0px;
padding-left: 50px;
}
#myGallery {
position: relative;
width: 320px;
/* Set your image width */
height: 267px;
/* Set your image height */
}
#myGallery img {
display: none;
position: absolute;
top: 0;
left: 0;
}
#myGallery img.active {
display: block;
}
.titlegrp {
}
.title {
float: right;
margin-right: 17.5%;
margin-top: 7.5%;
}
.subtitle {
font-family: "Segoe Script", Segoe, sans-serif;
font-size: 1.05em;
}
.h1 {
font-family: "Segoe Script", Segoe, sans-serif;
font-size: .9em;
}
.imgleft {
float: left;
margin-right: 5px;
}
.imgright {
float: right;
margin-right: 60px;
}
.contentpara {
padding-left: 15px;
}
.sidelinks {
font-family: "Century Gothic", Verdana, sans-serif;
}
.sidelinks a:link {
text-decoration: none;
color: black;
}
.sidelinks a:hover {
text-decoration: none;
font-family: "Segoe Script", Segoe, sans-serif;
}
.sidelinks a:visited {
text-decoration: none;
color: blue;
}
.tablecont {
padding-left: 15px;
}
div.img {
margin: 5px;
border: 1px solid #ccc;
float: left;
width: 180px;
-webkit-transition: width 2s, height 4s; /* For Safari 3.1 to 6.0 */
transition: width 2s, height 4s;
}
div.img:hover {
border: 1px solid #777;
}
div.img {
width: 100%;
height: auto;
}
div.desc {
padding: 15px;
text-align: center;
}
.image-wrapper {
margin: auto;
align-items: center;
justify-content: center;
}
.gal-butt {
font-size: 2.5em;
margin: auto;
}
<!doctype html>
<html lang="en">
<header>
<meta charset="utf-8">
<title>Katie's House - West Hull Based Childminder</title>
<link rel="ICON" href="images/KH_logo.ico" type="image/ico" />
<meta name="description" content="">
<meta name="author" content="Brian Johnson">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="KHjscript.js"></script>
<link rel="stylesheet" href="kHIndex.css">
</header>
<body>
<div class="container">
<div id="banner">
<ul class="none">
<li class="nav"> <a href="https://www.facebook.com/KatieSummersChildminder/" target="_blank">
<img border="0" alt="Contact us on Facebook" src="images/fBook_Icon_Black.gif" width="30" height="30"></a></li>
<li class="nav"> <a href="mailto:katiesummers789#gmail.com">
<img border="0" alt="Contact via Email" src="images/email_Icon_Black.gif" width="30" height="30"></a></li>
<li class="field"><input type="text" title="Search" text="Search" /></li>
</ul>
<div class="titlegrp">
<img class="title" src="images/kH_title.png" alt="Katies House Title">
<img src="images/KH_logo.jpg" alt="Katies House Logo">
</div>
<div style="clear: both;"></div>
</div>
<div id="columnleft">
<div class="subtitle"><p><u>Site Navigation</u></p></div>
<div class="sidelinks">
Home
<br>
About
<br>
Sample Day
<br>
Gallery
<br>
Testimonials
<br>
Enquiries
<br>
</div>
</div>
<div id="columnright">
<div class="subtitle"><u>Katie's House Services</u></div>
<div class="imgleft"><img border="1" alt="Katie and Mindees" src="images/katie_intro_page.jpg"></a>
</div>
<p>What Katie's house can offer you</p>
<ul>
<li>Early years child care 0-5 years</li>
<li>Funded places for eligible 2,3 and 4 year olds at 15 hours per week free</li>
<li>Long term and short term care</li>
<li>Full time and part time places</li>
<li>Professional and affordable</li>
</ul>
<hr>
<p>My Qualifications</p>
<p>I attend training regularly and have qualifications in:</p>
<ul>
<li>Paediatric First Aid</li>
<li>Child Protection</li>
<li>Special Educational Needs</li>
<li>Food Hygiene</li>
<li>Health and Safety</li>
<li>Equal Opportunities</li>
<li>Home based Childcare</li>
<li>Working with two year olds</li>
<li>schemas</li>
<li>NVQ3 Children's care, Learning and Development</li>
<li>Open University - Understanding Autism</li>
</ul>
<br>
<p>Click below for a little information on Childminding</p>
Pacey's Info on Registered Childminders
<div style="clear: both;"></div>
<br>
</div>
<div id="footer">
<p>Brian Johnson
<br>© Copyright 2016. All Rights Reserved</p>
</div>
</div>
</body>
</html>
https://jsfiddle.net/aw3eb1oa/
You were really close - just need to put your media query at the bottom of the CSS so it can override the other styles. Then add a width:100%; and margin-left: 0;
#columnleft, #columnright {
float: none;
width: 100%;
}
#columnright {
display: block ! important;
clear: right;
margin-left: 0;
}
Updated: Fiddle
You need to over-ride your earlier CSS like this:
#media only screen and (max-width : 320px) {
.container {
width: auto;
}
#columnleft,#columnright {
float: none;
width: 100%;
}
}
Why does my header and navigation go below my hero image?
Whenever I increase the size of my text on my image the nav and heading goes down further. If i get rid of the size for the text it goes back to where i want it.
Here is my html and css.
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Amanda Farrington</title>
<link rel="stylesheet" href="css/demo.css" />
<link href='http://fonts.googleapis.com/css?family=Roboto:400,300,500' rel='stylesheet' type='text/css'>
</head>
<body>
<div id="header">
<div id="leftHeader">
<img src="assets/logo2.jpg" alt="Logo" style="width:65px;height:65px">
<h1>Amanda Farrington</h1>
</div>
<div id="nav">
<ul>
<li>About</li>
<li>Work</li>
<li>Contact</li>
</ul>
</div>
</div>
<div id="hero">
<div id="heroImage">
<img src="assets/trees.jpg" alt="trees" style="width:100%;height:10%">
</div>
<div id="overlay">
<h2>Amanda Farrington</h2>
</div>
</div>
</body>
</html>
CSS
body {
margin: 0px;
padding: 0px;
height: 100%;
background: white;
}
#header {
color: #D7DADB;
font-family: 'Roboto', sans-serif;
font-weight: 300;
font-size : 15px;
text-align: left;
width: 97%;
margin:0;
padding-left: 3em;
float: left;
background: white;
height: 10%;
}
#leftHeader
{
}
#header img
{
float: left;
padding-left: 3em;
}
h1{
width: 9em;
float: left;
padding-left: 0.5em;
color: #45CCCC;
padding-bottom: 1px;
}
#nav {
width: 40%;
margin:0;
padding:0;
text-align: right;
color: red;
font-size:20px;
float: right;
padding-right: 2em;
}
#nav ul {
padding: 1px;
}
#nav li {
display: inline;
padding: 38px;
}
#nav li a {
color: #2C3E50;
text-decoration: none;
}
#nav li a:hover {
color: #45CCCC;
}
#hero{
width: 100%;
height: 30em;
}
#heroImage
{
top: 12%;
width: 100%;
z-index: 1;
position: absolute;
}
#overlay{
width: 30em;
top: 90%;
margin-left: 30%;
z-index: 2;
position: relative;
}
h2{
width: 9em;
position: relative;
font-family: 'Roboto', sans-serif;
font-weight: 300;
font-size: 60px;
float: center;
color: white;
opacity: 1.0;
text-shadow: 2px 2px 3px rgba(0,0,0,0.6);
}
It's because of position: absolute; of your #heroImage div (if I understand, what do you want)
I'm trying to make my header banner stretch / fit to the website's dimensions, however, I am unsure how to make this happen on every browser.
HTML5:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Play - Learn - Grow</title>
<link rel="stylesheet" href="main.css">
</head>
<body class="body">
<span class="text_h">
Welcome to KUBE Toy Library!
</span>
<span class="banner_h">
<img src="Images\Top_Banner.jpg" alt="Banner" height="150" width ="1240"/>
</span>
<nav>
<ul class="nav">
<li>Home</li>
<li>About Us</li>
<li>Contact Us</li>
<li>Become a Member</li>
<li>Borrow Toys</li>
<li>Our Policies</li>
<li>Site Map</li>
</ul>
</nav>
<span class="banner_l">
<img src="Images\Left_Banner.jpg" alt="Banner" />
</span>
<span class="banner_r">
<img src="Images\Left_Banner.jpg" alt="Banner" />
</span>
<h2 class="headers">Welcome to the Home Page!</h2>
<div class="container">
Our aim is to provide the children of the community with an ever-changing variety of educational and fun toys to enhance
their cognitive, social, emotional and physical development in the important first six years of their lives.
<br><br><span class="Links">Be sure to check out our Wikispace site with more information here!</span>
</div>
<div id="content"></div>
<div id="footer">
Copyright © 2013
</div>
</body>
</html>
CSS:
/* Entire Document CSS */
html{
height: 100%;
}
/* Header CSS */
.headers{
color: #FFD89A;
text-align: center;
padding: 10px;
}
/* Body CSS */
.body{
background-color: #61B329;
height: 50%;
color: #FFFFFF;
}
.container{
margin: 0 auto 0 auto;
width: 50em;
text-align: center;
padding-bottom: 500px;
height: 50%;
}
/* Navigation CSS */
.nav {
display: inline-block;
background-color: #00B2EE;
border: 1px solid #000000;
border-width: 1px 0px;
margin: 0;
padding: 0;
min-width: 1000px;
width: 100%;
}
.nav li {
list-style-type: none;
width: 14.28%;
float: left;
}
.nav a {
display: inline-block;
padding: 10px 0;
width: 100%;
text-align: center;
}
/* Banner / Picture CSS / Text in Images */
.banner_l{
float: left;
}
.banner_r{
float: right;
}
.banner_h{
positon: relative;
width: 100%;
}
.text_h{
position: absolute;
color: white;
text-align: center;
font: bold 24px/45px Helvetica, Sans-Serif;
letter-spacing: -1px;
}
/* Footer CSS */
#footer {
clear: both;
position: relative;
z-index: 10;
height: 3em;
margin-top: -3em;
}
#content {
padding-bottom: 3em;
}
/* Link CSS */
a:link{
color: #FFFFFF;
text-decoration: none;
}
a:visited{
color: #FFFFFF;
text-decoration: none;
}
a:hover{
background-color: #028482;
color: #FFFFFF;
text-decoration: underline;
}
a:active{
background-color: #FCDC3B;
color: #AA00FF;
text-decoration: overline;
}
.Links A:hover{
color: #028482;
background-color: transparent;
text-decoration: underline overline;
}
If your wondering why this is being created, this is for a school assessment task, and all content is fictious.
Try:
* {margin:0; padding: 0;}
.banner_h {display: block; width: 100%;}
.banner_h img {width:100%}
Check the result out in a fiddle.
I've read countless threads here now and I have been having no luck so far. I am trying to remove space between the divs on this page.
The divs called "postarea" and "rightsidebar" should have the same distance between "postadvert" as "postadvert" has on it's top between it and the menu. Can anyone help?
here is the jsfiddle
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="styles.css" rel="stylesheet" type="text/css" />
<title>DTR html</title>
</head>
<body>
<div class="pageWrapper">
<div class="header">
<img src="images/banner_gundam_space.jpg" width="600" height="150" alt="Banner" class="banner"/>
<div id="rssline">
<img src="images/register.gif" width="70" height="40" alt="Register" class="rssline"/>
<img src="images/commentsrss.gif" width="160" height="40" alt="CommentsRSS" class="rssline"/>
<img src="images/entriesrss.gif" width="137" height="40" alt="EntriesRSS" class="rssline"/>
</div>
<div id="topadvert">
<img src="images/adunit_234x60.gif" width="234" height="60" alt="Advert" />
</div>
<div id="welcome"><img src="images/welcome.jpg" width="250" height="60" alt="Welcome to Dubtopia" /></div>
<div id="menu">
<ul>
<li>Home</li>
<li>Anime Reviews</li>
<li>Activity</li>
<li>Forums</li>
<li>Group Forums</li>
<li>Groups</li>
<li>Members</li>
</ul>
</div>
</div><!-- End header -->
<div id="contentWrapper">
<div id="postadvert"><img src="images/advert_example_728x90.png" width="729" height="90" alt="Advert" /></div>
<div id="rightsidebar">
<div class="rightcontainer">
<div id="searchBox"><input type="text" name="search" size="25" /><input type="submit" value="Search" /></div>
<div class="sidebaradvert"><img src="images/advert_example_300x250.png" width="300" height="250" alt="Advert" /></div>
<div class="sidebarTitle1"><img src="images/recentseries.jpg" width="200" height="40" alt="Recent Series" /></div>
<ol>
<li><a class="widgetlink" href="#">Fullmetal Alchemist Brotherhood</a></li>
<li><a class="widgetlink" href="#">Aquarion Age</a></li>
<li><a class="widgetlink" href="#">Gurren Lagann</a></li>
<li><a class="widgetlink" href="#">Black Lagoon</a></li>
<li><a class="widgetlink" href="#">Chrome Shelled Regios</a></li>
<li><a class="widgetlink" href="#">Ergo Proxy</a></li>
<li><a class="widgetlink" href="#">Ghost Hunt</a></li>
<li><a class="widgetlink" href="#">Kurau Phantom Memory</a></li>
<li><a class="widgetlink" href="#">When They Cry</a></li>
</ol>
</div> <!-- END top series -->
</div><!-- End rightsidebar -->
<div id="postarea">
<div class="post">
<div class="postdate">5th Feb</div>
<img src="images/anime_images/fullmetal_alchemist_brotherhood.jpg" width="225" height="329" alt="Fullmetal Alchemist Brotherhood" />
<p class="postcontent"><h2><a class="postlink" href="#">Fullmetal Alchemist Brotherhood</a></h2><br />In this world there exist alchemists, people who study and perform the art of alchemical transmutation—to manipulate objects and transform one object into another. They are bounded by the basic law of alchemy: in order to gain something you have to sacrifice something of the same value. The main character is the famous alchemist Edward Elric—also known as the Fullmetal Alchemist—who almost lost his little brother, Alphonse, in an alchemical accident. Edward managed to attach his brother's soul to a large suit of armor. While he did manage to save his brother's life, he paid the terrible price of his limbs. To get back what they've lost, the brothers embark on a journey to find the Philosopher's Stone that is said to amplify the powers of an alchemist enormously. Fullmetal Alchemist: Brotherhood is a re-telling of the story from the manga point of view.</p>
<a class="postcomments" href="#">comments</a>
</div><!-- End post -->
</div><!-- End postarea -->
<div id="footer">
© 2013 Dubtopian Review. "Dubtopian" - A fan of English dubbed anime.
</div><!-- End footer -->
</div><!-- End contentWrapper -->
</div><!-- End pageWrapper -->
</body>
</html>
And here is the CSS
/* Typograhpy */
#charset "utf-8";
#font-face {
font-family: Roboto;
src: url('./webfonts/Roboto/Roboto-Black.eot'); /* EOT file for IE */
}
#font-face {
font-family: Roboto;
src: url('Roboto-Black.ttf') /* TTF file for CSS3 browsers */
}
/* Eric Meyer's Reset CSS v2.0 - http://cssreset.com */
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{border:0;font-size:100%;font:inherit;vertical-align:baseline;margin:0;padding:0}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:none}table{border-collapse:collapse;border-spacing:0}
body {
background-image: url(images/bg.png);
background-repeat: no-repeat;
background-color: #666666;
margin-top: 50px;
}
.pageWrapper {
font-family: 'Roboto', sans-serif;
color: #FFFFFF;
width: 1040px;
background-color: #42413c;
margin-left: auto;
margin-right: auto;
font-size: 14px;
line-height: 1.4;
overflow: hidden;
}
h2 {
font-size:16px;
color:#E15122;
}
a {
color:#FFF;
}
a:hover {
color:#CCC;
}
/* Start of header */
.header {
height: 211px;
width: 1040px;
}
.banner {
border:0px;
position:relative;
}
.rssline {
position: relative;
bottom: 151px;
left: 628px;
}
#rssline img {
border:0px;
border-bottom: solid 1px transparent;
}
#rssline img:hover {
border-color: white;
}
#topadvert {
border: 0px;
position: relative;
bottom: 140px;
left: 703px;
}
#welcome {
position: relative;
bottom: 113px;
}
#menu {
position: relative;
bottom: 177px;
right: 10px;
}
.header #menu {
float: right;
height: 60px;
display: inline;
}
.header #menu ul {
font-family: 'Roboto', sans-serif;
color: #FFFFFF;
font-size:14px;
list-style-type:none;
margin:0;
padding:0;
padding-top:18px;
padding-bottom:6px;
}
.header #menu li {
display:inline;
}
.header #menu li a:link,a:visited {
font-size: 18px;
background-color:#2c2c2c;
text-align:center;
padding:15px;
text-decoration:none;
}
.header #menu li a:hover,a:active {
background-color:#191919;
}
/* END header */
/* START slider area */
#slider {
margin-right:10px;
margin-left:10px;
width: 1020px;
height: 250px;
background-color: #2c2c2c;
}
/* END slider area */
/* START posts and sidebar */
#contentWrapper {
width: 1040px;
height: 100%;
}
#postadvert {
width: 1000px;
background-color: #2C2C2C;
margin-top: 10px;
height: 100%;
margin-bottom: 10px;
margin-right: 10px;
margin-left: 10px;
padding: 10px;
}
#postadvert img{
position: relative;
left: 140px;
}
/* START sidebar */
#searchBox {
width:350px;
height:40px;
background-color: #1f1f1f;
}
.rightcontainer #searchBox input {
position:relative;
left:50px;
top:6px;
}
#rightsidebar {
width: 350px;
background-color: #2C2C2C;
float: right;
margin-top: 10px;
height: 100%;
margin-bottom: 10px;
margin-right: 10px;
padding: 10px;
}
#rightsidebar .rightcontainer .sidebarTitle1 img{
position:relative;
left:74px;
}
.number, .widgetlink {
display:inline;
margin-top:1px;
}
.rightcontainer ol {
position:relative;
background-color: #1f1f1f;
padding: 10px;
list-style-type: decimal;
margin:0px;
}
.rightcontainer ol li {
position:relative;
left:20px;
margin-top: 1px;
}
.commentdate {
background-color: #E15122;
width:50px;
padding-right: 5px;
padding-left: 5px;
}
.sidebaradvert {
margin-top: 10px;
background-color:#1f1f1f;
padding:10px 10px 10px 10px;
}
.sidebaradvert img {
position:relative;
left: 15px;
}
/* END sidebar */
/* START post area */
#postarea {
Float:left;
width: 620px;
background-color: #2C2C2C;
margin-top: 10px;
height: 100%;
margin-bottom: 10px;
margin-right: 10px;
margin-left: 10px;
padding: 10px;
}
.post {
background-color: #1f1f1f;
padding: 5px;
text-align: justify;
clear: both;
}
.postdate {
position:absolute;
background-color: #E15122;
width:50px;
padding-right: 5px;
padding-left: 5px;
margin-top: 10px;
margin-left: 10px;
}
#postarea img {
float:left;
padding: 5px;
}
#postarea h2, #postarea p {
padding: 5px;
}
#postarea h2 a {
text-decoration:none;
color:#E15122;
}
#postarea .post .postcomments {
position:relative;
left:500px;
padding: 10px;
}
/* END post area */
/* START footer */
#footer {
float: left;
width: 1010px;
background-color: #2C2C2C;
padding: 5px;
text-align: center;
margin-top: 10px;
height: 100%;
margin-bottom: 10px;
margin-right: 10px;
margin-left: 10px;
}
/* END footer */
Float the other elements too, besides postarea and rightsidebar.
Something like this: http://jsfiddle.net/ePySF/5/
.header #postadvert #contentwrapper {
float: left;
}
Ok so as you all will see I am very new to this and am really struggling to get what I want here. I would like to know how to push the youtube video down inside of that div a bit farther. Anyways I'm sure this is a simple fix that I will get reamed for but I have searched and tried to understand what I have been doing wrong but it just isn't working out. Here is what I have so far.
<html>
<head>
<meta charset="UTF-8">
<title>James Photo Tab</title>
<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<style>
aside, article, section, header, footer, nav {
display: block;
}
article, div, h1, p {
margin: 0;
padding:0;
}
html {
background: url(images/grid.gif);
}
body {
width: 520px;
margin: auto;
background:white;
}
.one {
background:grey;
width:520px;
height:75px;
border-radius:15px;
position:relative;
}
.two {
background:#0000FF;
width: 50px;
height: 30px;
position: absolute;
font-size: 1em;
font-weight: normal;
text-align: center;
border-radius:5px;
top:78px;
left:px;
}
.three {
background: rgba(227,208,123,.6);
width: 50px;
height: 30px;
position: absolute;
font-size: 1em;
font-weight: normal;
text-align: center;
border-radius:5px;
top:78px;
left: 424px;
}
div {
clear: both;
}
p{ height: 50px;
line-height: 50px;
}
.three { background:#33FFFF;
}
.four { width:520px;
height:auto;
background:grey;
border-radius:0px 10px 10px 10px;
position: absolute;
top:160px;
}
.five {width: 400px;
height:233px;
background:black;
top:250px;
}
.six {width:450px;
height:75px;
background:#0000FF;
top:750px;
border-radius:15px;
position:static;
margin:10px;
bottom: 10px;
}
.like {width: 200px;
height: 45px;
background:#33FFFF;
border-radius: 5px;
position:absolute;
top: 15px;
right: 40px;
text-align: center;
font-size: 2em;
}
.tab1 {
width: 75px;
height: 45px;
float: left;
font-size: 1em;
font-weight: normal;
text-align: center;
border-radius:8px 8px 0px 0px;
background:grey;
position: absolute;
top:115px;
left:368px;
}
.tab2 {
width: 75px;
height: 45px;
float: left;
font-size: 1em;
font-weight: normal;
text-align: center;
border-radius:8px 8px 0px 0px;
background:grey;
position:absolute;
top:115px;
left: 445px;
}
/*add styles here*/
</style>
</head>
<body>
<article>
<div class="one">
<p>
<font size="10em" color="white">
BANNER IMG
</font>
</p>
<div class="like">
<p>
Like Counter
</p>
</div>
</div>
<h1 class="two">Share!</h1>
<h1 class="three">Like!</h1>
</article>
</body>
<body>
<article>
<h1 class="tab1"> Tab 1</h1>
<h1 class="tab2"> Tab 2</h1>
<div class="four" align="center">
<div class="five" align="center">
<div class="eight"><iframe width="400" height="233" top="50px" margin="40px" src="http://www.youtube.com/embed/ErkaM9IvZ7U" frameborder="0" allowfullscreen></iframe></div>
</div>
<div class="six" align="center" onclick="location.href='http://www.facebook.com';" style="cursor:pointer;">
<p><font size="30em" color="white">Share Button</font></p>
</div>
<div class="six" align="center" onclick="location.href='http://www.facebook.com';" style="cursor:pointer;">
<p><font size="30em" color="white">Share Button</font></p>
</div>
</div>
</article>
</body>
</html>
Adding some top margin to the div containing the youtube video would move it down. Not sure how far you wanted it but you can play around with the pixels.
.eight{
margin-top: 10px;
}