I've been struggling for the entire day to center the ul list with the id="menu" vertically in this responsive layout.
Would really appreciate a hand getting in in the right place. I Want it to be centered vertically to the right. The list consists of circles indicating where you are in a one page scroll layout and also functioning as navigation.
<ul id="menu">
<li data-menuanchor="firstPage">1</li>
<li data-menuanchor="secondPage">2</li>
<li data-menuanchor="3rdPage">3</li>
<li data-menuanchor="4thpage">4</li>
</ul>
<div id="1"><p>O</p></div>
<div id="2"><p>O</p></div>
<div id="3"><p>O</p></div>
<div id="4"><p>O</p></div>
<div class="section " id="section0">
<h1>Hi</h1>
<p>Hihi</p>
</div>
<div class="section" id="section1">
<div class="slide">
<div class="intro">
<h1>Hi</h1>
<p>Hihi</p>
</div>
</div>
<div class="slide">
<div class="intro">
<h1>Simple</h1>
<p>Hihi</p>
</div>
</div>
<div class="slide">
<div class="intro">
<h1>Hey</h1>
<p>Hihi</p>
</div>
</div>
<div class="slide">
<div class="intro">
<h1>Heyhey</h1>
<p>Hihi</p>
</div>
</div>
</div>
<div class="section" id="section2">
<div class="intro">
<h1>Hi</h1>
<p>Hihi</p>
</div>
</div>
<div class="section" id="section3">
<div class="intro">
<h1>Hi</h1>
<p>Hihi</p>
</div>
</div>
This is my CSS:
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,
form,fieldset,input,textarea,p,blockquote,th,td {
padding: 0;
margin: 0;
}
table {
border-spacing: 0;
}
ol,ul {
list-style: none;
margin:0;
padding:0;
}
body{
font-family: arial,helvetica;
color: #000;
color: rgba(246,192,6,1);
}
.wrap{
margin-left: auto;
margin-right: auto;
width: 960px;
position: relative;
}
h1{
font-size: 6em;
}
p{
font-size: 2em;
}
.section{
text-align:center;
}
#1 {
position: fixed;
z-index: 70;
top: 10px;
right: 10px;
}
#2 {
position: fixed;
z-index: 70;
bottom: 10px;
left: 10px;
}
#3 {
position: fixed;
z-index: 70;
top: 10px;
left: 10px;
}
#4 {
position: fixed;
z-index: 70;
bottom: 10px;
right: 10px;
}
#menu li {
display:;
margin-top: 40px;
margin-bottom: 40px;
color: #000;
background:#fff;
background: rgba(255,255,255, 0.5);
width: 35%;
height:0;
padding-bottom: 35%;
-moz-border-radius: 50%;
-webkit-border-radius: 50%;
border-radius: 50%;
}
#menu li.active{
background:#000;
background: rgba(255,255,255, 1);
color: #fff;
}
#menu li a{
text-decoration:none;
color: #000;
}
#menu li.active a:hover{
color: #000;
}
#menu li:hover{
background: rgba(255,255,255, 0.8);
}
#menu li a,
#menu li.active a{
padding: 9px 18px;
display:block;
}
#menu li.active a{
color: #fff;
}
#menu{
position:fixed;
top:0;
right:0;
height: 40px;
z-index: 70;
width: auto;
padding: 0;
margin:0;
}
Here is the JSFiddle demo
Your CSS is not being applied "}" is missing from this rule.
form,fieldset,input,textarea,p,blockquote,th,td {
padding: 0;
margin: 0;
}
Numbers should not be used as a ID tag.
This is a perfect place to do vertical centering using full html5 with CSS3 transform, which will center anything vertically.
#menu {
position:fixed;
top:50%;
transform:translateY(-50%);
-webkit-transform:translateY(-50%); /* for chrome preview */
right:0;
height: auto;
z-index: 70;
width: auto;
padding: 0;
margin:0;
}
Is what you want something like this fiddle.
I added the border so that you can see the ul is aligned to the right.
You want the div numbered elements to be part of the ul. So, the first code is now:
<ul id="menu">
<li data-menuanchor="firstPage"><a href="#firstPage"><div id="1"><p>O</p></div></a </li>
<li data-menuanchor="secondPage"><div id="2"><p>O</p></div></li>
<li data-menuanchor="3rdPage"><div id="3"><p>O</p></div></li>
<li data-menuanchor="4thpage"><div id="4"><p>O</p></div></li>
</ul>
Update
Actually, what I think you want is something like this: jsfiddle.
Note the change from p to span the new class bulletDiv and the addition of vertical-align middle:
<ul id="menu">
<li data-menuanchor="firstPage"><span id="1" class="bulletDiv">O</span>1</li>
<li data-menuanchor="secondPage"><span id="2" class="bulletDiv">O</span>2</li>
<li data-menuanchor="3rdPage"><span id="3" class="bulletDiv">O</span>3</li>
<li data-menuanchor="4thpage"><span id="4" class="bulletDiv">O</span>4</li>
</ul>
CSS:
.bulletDiv{
font-size: 2em;
vertical-align:middle;
}
#menu li a{
text-decoration:none;
color: #000;
vertical-align:middle;
}
Related
i build a basic sidebar, with an navigation list inside. What i'm trying is to get the last div container .sidebar-footer on the bottom of the sidebar. When i gave the class a position absolute, it's overlaying over the list item, what should i do to get it like in our design pic?
<div class="pulse-menu">
<div class="menu-bg clearfix">
<div class="sidebar-profile">
<img src="img/users/avatar.jpg" class="sidebar-img" alt="Candice Swanepoel" title="Candice Swanepoel" />
<h5>Candice Swanepoel</h5>
</div>
</div>
<nav>
<ul>
<li>Dashboard</li>
<li>Models</li>
<li>Kunden</li>
<li>Finanzen</li>
<li>Mitarbeiter</li>
<li>Einstellung</li>
</ul>
<div class="sidebar-footer">
<li><i class="icon-cloud-upload circle-icon"> </i></li>
</div>
</nav>
</div>
Css:
.pulse-menu {
background-color: #fafafa;
width: 19.286em;
position: fixed;
z-index: 1050;
top: 0;
bottom: 0;
height: 100%;
text-transform: uppercase;
overflow-y: scroll;
}
.menu-bg {
width: 270px;
height: 230px;
background: url(../img/media/menu_bg.svg) ;
background-size: 270px 221px;
background-repeat: no-repeat;
}
.sidebar-profile {
margin: 0 auto;
width: 100%;
text-align: center;
box-sizing: border-box;
padding: 20px 0;
color: #333;
line-height: 0.6em;
}
.sidebar-profile img {
border-radius: 100%;
height: 60px;
width:60px;
}
.sidebar-profile h5 {
padding-top: 0.50em;
color: #a8a8a8;
font-size: 1.02em;
}
.pulse-menu>nav ul {
padding: 0;
list-style-type: none;
}
.pulse-menu>nav>ul>li>a {
color:#333;
display:block;
font-size:1.02em;
height:40px;
line-height:0px;
padding-bottom:1.5em;
padding-left:2em;
padding-right:2em;
padding-top:1.5em;
text-align:center;
}
here is a working jsfiddle with my code
Give your footer class this styles
.sidebar-footer{
height: 50px;
position: absolute;
width: 100%;
bottom: 0;
list-style-type: none;
padding-bottom:5.5em;
}
You can use the :last-child selector in your CSS.
HTML:
<nav>
<ul>
<li>Dashboard</li>
<li>Models</li>
<li>Kunden</li>
<li>Finanzen</li>
<li>Mitarbeiter</li>
<li>Einstellung</li>
</ul>
<div class="sidebar-footer">
<li><i class="icon-cloud-upload circle-icon"> </i></li>
</div>
</nav>
CSS
.nav ul li:last-child {
//your styling
}
CSS
<style>
.pulse-menu {
background-color: #fafafa;
width: 19.286em;
position: fixed;
z-index: 1050;
top: 0;
bottom: 0;
height: 100%;
text-transform: uppercase;
overflow-y: scroll;
}
.menu-bg {
width: 270px;
height: 230px;
background: url(../img/media/menu_bg.svg) ;
background-size: 270px 221px;
background-repeat: no-repeat;
}
.sidebar-profile {
margin: 0 auto;
width: 100%;
text-align: center;
box-sizing: border-box;
padding: 20px 0;
color: #333;
line-height: 0.6em;
}
.sidebar-profile img {
border-radius: 100%;
height: 60px;
width:60px;
}
.sidebar-profile h5 {
padding-top: 0.50em;
color: #a8a8a8;
font-size: 1.02em;
}
.pulse-menu>nav ul {
padding: 0;
list-style-type: none;
}
.pulse-menu>nav>ul>li>a {
color:#333;
display:block;
font-size:1.02em;
height:40px;
line-height:0px;
padding-bottom:1.5em;
padding-left:2em;
padding-right:2em;
padding-top:1.5em;
text-align:center;
}
.specialelement {
padding-top: 500px;
display:block;
padding-left:6em;
list-style-type: none;
color: #333;
}
</style>
HTML
<div class="pulse-menu">
<div class="menu-bg clearfix">
<div class="sidebar-profile">
<img src="img/users/avatar.jpg" class="sidebar-img" alt="Candice Swanepoel" title="Candice Swanepoel" />
<h5>Candice Swanepoel</h5>
</div>
</div>
<nav>
<ul>
<li>Dashboard</li>
<li>Models</li>
<li>Kunden</li>
<li>Finanzen</li>
<li>Mitarbeiter</li>
<li class="specialelement">
<li>Einstellung</li>
</li>
<div class="sidebar-footer">
<li><i class="icon-cloud-upload circle-icon"> </i></li>
</div>
</nav>
</div>
Result
I made a dropdown menu in css and I can't add space between the elements in the dropdown. They collapse.
There is the code: jsfiddle
There is the CSS part. I tried different things to fix it.
*
{
margin:0px;
}
html,body
{
height:100%;
}
.wrapper
{
height:100%;
min-height:100%;
height:auto !important;
margin:0 auto -50px;
}
.footer,.push
{
height:50px;
}
.footer
{
background-color:lightblue;
}
.footer center
{
vertical-align:middle;
}
.header
{
margin-top:10px;
height:150px;
}
#meniu li
{
padding:5px;
border:1px solid black;
border-radius:10px;
display:inline;
}
#meniu
{
margin-top:5px;
background-color:lightblue;
width:100%;
height:50px;
}
#meniu a
{
text-decoration:none;
}
.dropdown-content {
display: none;
position: absolute;
width:100%;
margin:0px;
}
.dropdown-content ul
{
height:100%;
width:100%;
position:relative;
list-style-type:none;
margin-top:20px;
left:-25%;
}
.dropdown-content li
{
position:relative;
}
.dropdown {
position: relative;
display: inline-block;
}
.dropdown:hover .dropdown-content {
display: block;
}
There is the the HTML:
<body>
<div class="wrapper">
<div class="header">
<div id="meniu">
<ul>
<li>PRIMA PAGINA</li>
<div class="dropdown"><li>FISIERELE MELE<div class="dropdown-content">
<ul>
<li>MENIUL MEU</li>
<li>PLANETE NOI</li>
</ul>
</div>
</div></li>
<li>MENIUL MEU</li>
<li>PLANETE NOI</li>
</ul>
</div>
</div>
<div class="push"></div>
</div>
<div class="footer"><center>Olimpiada Nationala de Tehnologia Informatiei si Comunicarii Buzau 2015</center></div>
I made a dropdown menu in css and I can't add space between the elements in the dropdown. They collapse.
They collapse because you have made them as inline elements. I think you meant inline-block, otherwise padding/margin would not render properly.
The correct code should be:
#meniu li {
⋮
display: inline-block; /* make `li` as inline-blocks */
margin-bottom: 10px; /* add spacing */
}
You also have some HTML syntax errors (extra li), please run it through a validator. My final result is:
* { margin: 0px; }
html, body { height: 100%; }
.wrapper {
height: 100%;
min-height: 100%;
height: auto !important;
margin: 0 auto -50px;
}
.footer, .push { height: 50px; }
.footer { background-color: lightblue; text-align: center; }
.header { margin-top: 10px; height: 150px; }
#meniu li {
padding: 5px;
border: 1px solid black;
border-radius: 10px;
display: inline-block;
margin-bottom: 10px;
}
#meniu {
margin-top: 5px;
background-color: lightblue;
width: 100%;
height: 50px;
}
#meniu a {
text-decoration: none;
}
.dropdown-content {
display: none;
position: absolute;
width: 100%;
margin: 0px;
}
.dropdown-content ul {
height: 100%;
width: 100%;
position: relative;
list-style-type: none;
margin-top: 20px;
left: -25%;
}
.dropdown-content li {
position: relative;
}
.dropdown {
position: relative;
display: inline-block;
}
.dropdown:hover .dropdown-content {
display: block;
}
<div class="wrapper">
<div class="header">
<div id="meniu">
<ul>
<li>PRIMA PAGINA</li>
<div class="dropdown">
<li>FISIERELE MELE
<div class="dropdown-content">
<ul>
<li>MENIUL MEU</li>
<li>PLANETE NOI</li>
</ul>
</div>
</div>
<li>MENIUL MEU</li>
<li>PLANETE NOI</li>
</ul>
</div>
</div>
<div class="push"></div>
</div>
<div class="footer">
Olimpiada Nationala de Tehnologia Informatiei si Comunicarii Buzau 2015
</div>
jsFiddle: https://jsfiddle.net/azizn/snL1gwsm/
Hope i understood your question correctly...
i made some drop-down bar for you.
you can add elements as you wants, take a look on the html file and the css it will help you understand what is going on.
take a look :)
.dropbtn {
background-color: #4CAF50;
color: white;
padding: 16px;
font-size: 16px;
border: none;
cursor: pointer;
}
.dropdown {
position: relative;
display: inline-block;
}
.dropdown-content {
display: none;
position: absolute;
background-color: #f9f9f9;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
}
.dropdown-content a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
}
.dropdown-content a:hover {background-color:lightblue}
.dropdown:hover .dropdown-content {
display: block;
}
.dropdown:hover .dropbtn {
background-color: #3e8e41;
}
<div class="dropdown">
<button class="dropbtn">Dropdown</button>
<div class="dropdown-content">
Link 1
Link 2
Link 3
</div>
</div>
You had an error in your html
<div class="wrapper">
<div class="header">
<div id="meniu">
<ul>
<li>PRIMA PAGINA</li>
<div class="dropdown">
<li>FISIERELE MELE
<div class="dropdown-content">
<ul>
<li>MENIUL MEU</li>
<li>PLANETE NOI</li>
</ul>
</div>
</div>
</li>
<li>MENIUL MEU</li>
<li>PLANETE NOI</li>
</ul>
</div>
</div>
<div class="push"></div>
</div>
<div class="footer"><center>Olimpiada Nationala de Tehnologia Informatiei si Comunicarii Buzau 2015</center></div>
https://jsfiddle.net/ggtpufuw/1/
After fixing the html you have to make your list display as inline-block and margin them as you like.
#meniu li
{
padding:5px;
border:1px solid black;
border-radius:10px;
display:inline-block;
margin-top:10px;
}
hi i just wanted to code a site like BBC just for practice while doing this i got an error in li item of a ul i don't know the problem but when i give it a border-right the border take more height then the original menu, i'm pasting my code here please check it and help me??
in simple words i want list item's border to be equal to the borders of "Signin" and "logo" div
<html>
<head>
<title>BBC</title>
<style>
body{
margin:0;
font-family:Arial,Helvetica,freesans,sans-serif;
}
#top{
width:100%;
height:50px;
}
.keepcenter{
width:1100px;
margin: 0 auto;
}
#logo{
border-right:1px solid #CCCCCC;
float:left;
padding-right:5px;
height:100%;
}
#signin{
font-weight:bold;
font-size:0.9em;
border-right:1px solid #CCCCCC;
width:200px;
height:100%;
float:left;
}
#signin img{
position:relative;
top:5px;
margin-left:15px;
}
#signin p{
display:inline;
position:relative;
top:1px;
padding-left:5px;
}
#menutop{
float:left;
}
#menutop ul{
list-style-type:none;
margin:0;
padding:0;
}
#menutop li{
padding:15px 20px 10px 20px;
display:inline;
font-weight:bold;
font-size:0.9em;
float:left;
border-right:1px solid #CCCCCC;
height:100%;
}
</style>
</head>
<body>
<div id="container">
<div id="top">
<div class="keepcenter">
<div id="logo">
<img src="images/logo.jpg" />
</div>
<div id="signin">
<img src="images/signicon.png" /><p>Sign In</p>
</div>
<div id="menutop">
<ul>
<li>Home</li>
<li>Home</li>
<li>Home</li>
<li>Home</li>
<li>Home</li>
</ul>
</div>
</div>
</div>
</div>
</body>
</html>
Simply remove the top and bottom padding from the list items.
body {
margin: 0;
font-family: Arial, Helvetica, freesans, sans-serif;
}
#top {
width: 100%;
height: 50px;
}
.keepcenter {
width: 1100px;
margin: 0 auto;
}
#logo {
border-right: 1px solid #CCCCCC;
float: left;
padding-right: 5px;
height: 100%;
}
#signin {
font-weight: bold;
font-size: 0.9em;
border-right: 1px solid #CCCCCC;
width: 200px;
height: 100%;
float: left;
}
#signin img {
position: relative;
top: 5px;
margin-left: 15px;
}
#signin p {
display: inline;
position: relative;
top: 1px;
padding-left: 5px;
}
#menutop {
float: left;
}
#menutop ul {
list-style-type: none;
margin: 0;
padding: 0;
}
#menutop li {
padding: 0 20px;
display: inline;
font-weight: bold;
font-size: 0.9em;
float: left;
border-right: 1px solid #CCCCCC;
height: 100%;
}
<div id="container">
<div id="top">
<div class="keepcenter">
<div id="logo">
<img src="http://lorempixel.com/40/40" alt="BBC" />
</div>
<div id="signin">
<img src="http://lorempixel.com/g/10/10" alt="" />
<p>Sign In</p>
</div>
<div id="menutop">
<ul>
<li>Home</li>
<li>Home</li>
<li>Home</li>
<li>Home</li>
<li>Home</li>
</ul>
</div>
</div>
</div>
</div>
The list is floating though, which means that its baseline is not necessarily the same as the #signin div. In my snippet, the img in the div is small enough to not have an effect, but depending on its size, the baseline of the div (and therefore the position of the p) will move down. You may have to compensate for that in the ul.
First of all im a bit confused but i will do my best to explain my problem and what i want.
I have a div and inside that div i have another div, i want that div to move to left and right, nothing more, it has to follow the same path as the image when resizing (see my project).
How do i make that div that is behind the white circle always do the same path as the circle ?
body {
margin: 0;
width:100%;
}
body > div {
height: 200px;
}
.header {
background-color: transperent;
height: 100px;
color: white;
}
.product {
margin-top:0px;
height: 600px;
background-color: blue;
color: white;
float:left;
width:50%;
margin:0;
padding:0;
display: inline-block;
}
.product2 {
height: 600px;
margin-top:0px;
background-color: red;
color: white;
width:50%;
float:left;
margin:0;
padding:0;
position: relative;
display: inline-block;
}
.product2 img{
position: absolute;
right: 0;
bottom: 0;
}
.main{
background-image: url("http://i.imgur.com/Y5hHusa.png");
height:650px;
}
#crew {
height:50px;
clear:both;
background-color: tomato;
color: darkgrey;
}
.stick {
position: fixed;
top: 0;
}
.tour {
background-color: black;
color: darkgrey;
}
.pricing {
background-color: gold;
color: black;
}
.contact {
background-color: black;
color: white;
}
.menu {
float: right;
font-size: 18px;
list-style: outside none none;
margin-top: -5px;
margin-right: 50px;
}
.menu li a {
color: blue;
display: block;
text-decoration: none;
}
.menu li {
display: inline;
float: left;
padding-right: 23px;
}
.menu li a:hover{
background-color:none;
color:red;
}
.div_form {
height:35%;
width:40%;
margin-top:36%;
margin-left:41%;
background-color:blue;
}
.product2 .div_form{
}
.product2 .div_form .form_title{
position:absolute;
z-index:1;
margin-top:270px;
margin-left:1em;
font-size:3em
}
.product2 .div_form .form_circulo{
z-index:1
}
.product2 .div_form .div_email .input_first_email{
margin-top: -70%;
margin-left:50%;
height:3em;
border-radius:5px;
padding:1em;
width:45%;
}
.product2 .div_form .divbtnsubmit{
background-color:red;
margin-left:60%;
width:20em;
height:3em;
border-radius:1em;
text-align:center;
margin-top:1em;
width:45%
}
.product2 .div_form .divbtnsubmit .btnsumnitform
{
font-size:2em;
color:white;
position:absolute;
padding:.3em;
margin-left:-3.5em
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link href="styles.css" rel="stylesheet" type="text/css" >
<title> Layout </title>
</head>
<body>
<div class="main">
<div class="header">
<img src="http://i.imgur.com/48nYArD.png">
<ul class="menu">
<li>Home </li>
<li>Product Tour </li>
<li>Pricing </li>
<li>Try </li>
<li>Vision</li>
</ul>
</div>
<div class="product">
</div>
<div class="product2">
<img src="http://i.imgur.com/3UTs03w.png">
<div class="div_form">
</div>
</div>
</div>
</div>
<div id="crew">
</div>
<div class="tour">
</div>
<div class="pricing">
</div>
<div class="contact">
</body>
</html>
PS: Sorry for argumentation, my english isnt the best, hope you can understand.
Regards,
Duarte Andrade.
The problem is you're trying to position the div_form div vertically by giving it a margin-top of 36%. But a margin with a value in % is always relative to the width of the container, not the height. See the W3C.
The simplest solution is, because you know the height of the container (product2) is 600px, is to set the margin to 36% of 600px, or 216px.
body {
margin: 0;
}
.product {
height: 600px;
background-color: blue;
color: white;
float: left;
width: 50%;
margin: 0;
padding: 0;
display: inline-block;
}
.product2 {
height: 600px;
background-color: red;
color: white;
width: 50%;
float: left;
margin: 0;
padding: 0;
position: relative;
display: inline-block;
}
.product2 img {
position: absolute;
right: 0;
bottom: 0;
}
.div_form {
height: 35%;
width: 40%;
margin-top: 216px; /* This is what I changed */
margin-left: 41%;
background-color: blue;
}
<div class="main">
<div class="header">
<div class="product">
</div>
<div class="product2">
<img src="http://i.imgur.com/3UTs03w.png">
<div class="div_form">
</div>
</div>
</div>
</div>
Or if you really need a percentage of the parent's height, you would remove the margins and give the div position:absolute in the same way as the img. Then you can use left:41%; top:36%; but you will also need to experiment with the z-indexes a bit to get their stacking order right again.
I made this : jsfiddle Demo
I have the line :
<div id="footer">
<h1><a class="link" href="http://www.centerwow.com">mysite</a></h1>
</div>
How can I center the link mysite in the div footer on the center. width and height it Should be under about(menu).
I try to put position absolute and relative and somehow I destroyed something else.
thanks for any help.
my code:
body {
background: #CC3366 url(images/temp.png) center 130px no-repeat ;
overflow:hidden;
font-family: Arial;
font-size: 30px;
line-height: 32px;
}
#container {
width: 1000px;
overflow: hidden;
position: relative;
height: 450px;
margin: 0 auto;
}
#all_pages {
position: absolute;
left: 0;
top: 0;
width: 3000px;
}
.page {
width: 1000px;
height: 400px;
float: left;
text-align: center;
margin-top: 50px;
}
.page img {
margin-top: 50px;
}
#menu {
background: #000;
}
#menu ul {
list-style: none;
width: 457px;
height: 35px;
margin:auto;
}
#menu ul li {
float: left;
color: #888;
width: 150px;
line-height: 35px;
text-align: center;
cursor: pointer;
}
.active {
color: #fff !important;
}
h1 a {
color: #000000;
text-decoration: none;
}
#footer a{
position:absolute;
bottom:80px;
margin: 0 auto;
}
#footer{
position:relative;
background: #CC3366;
width:100%;
height:1000px;
}
<h1><a class="link" style="position:absolute; left:30px; top:30px;" href="http://www.centerwow.com">portfolio</a></h1>
<div id="container">
<div id="all_pages">
<div class="page">
<h1>Home Page</h1>
<img src="images/home.png" width="300">
</div> <!-- page1 -->
<div class="page">
<h1>About Us Page</h1>
<img src="images/about.png" width="300">
</div> <!-- page2 -->
<div class="page">
<h1>Contact Us Page</h1>
<img src="images/contact.png" width="300">
</div> <!-- page2 -->
</div> <!-- #all_pages -->
</div> <!-- #container -->
<div id="menu">
<ul>
<li id="1" class="link CC3366 active">Home</li>
<li id="2" class="link 33FF66">About</li>
<li id="3" class="link FFFF33">Contact Us</li>
</ul>
</div> <!-- #menu -->
<div id="footer">
<h1><a class="link" href="http://www.centerwow.com">mysite</a></h1>
</div>
Is something like this Fiddle what you're looking for?
Try this:
position :relative
top:50% ;
Left:50%;
works or not?