I'm trying to let my menu stick to the bottom of my header. I've already tried getting it down, with deleting the float's, adding some, playing with padding/margin (this isn't an option seems to me?
<div id="header">
<div id="logo">
<h1>blah</h1>
<h3>Blah</h3>
</div>
<div id="menu">
<ul>
<li>qsdfqsdfqsdf</li>
<li>qsdfqdsfqsdf!</li>
<li>qdsf</li>
<li>qdsf</li>
</ul>
</div>
</div>
CSS:
/** HEADER */
#header {
height: 125px!important;
background: #000;
position: fixed;
top: 0;
width: 100%;
}
/* Logo */
#logo
{
float: left;
width: 250px;
padding: 20px 0px 0px 50px;
text-transform: uppercase;
}
#logo h3{
color: #fff;
margin-left: 1em;
font-size: 1em;
}
#logo h1
{
padding: 5px 10px 0px 0px;
}
#logo h1 span, #logo h3 span{
color: #000;
}
#logo h1 a
{
text-decoration: none;
font-size: 1.5em;
font-weight: 300;
color: #FFFFFF;
}
#logo p
{
display: block;
margin-top: -10px;
padding: 0px 0px 0px 0px;
letter-spacing: 1px;
font-size: 1.2em;
color: #FFFFFF;
}
#logo p a
{
color: #FFFFFF;
}
/* Menu */
#menu{
float: right;
width: 600px;
margin: 2em 2em 0 0;
}
#menu ul{
float: right;
margin: 0;
padding: 0;
list-style: none;
line-height: normal;
position: relative;
display: inline-table;
}
#menu li
{
float: left;
}
#menu a
{
display: block;
letter-spacing: 1px;
text-decoration: none;
text-transform: uppercase;
font-size: 18px;
font-weight: 300;
color: #FFFFFF;
padding: 1em;
text-decoration: none;
}
#menu a:hover{
color: #000;
text-decoration: none;
background: #fff;
}
#menu ul li {
float: left;
}
#menu ul li:hover {
}
Here an example:
http://jsfiddle.net/2wmSt/
Almost there mate, just position the menu absolute to the bottom of the header.
#menu{
position:absolute;
bottom:0;
right:0;
}
jsfiddle example
Related
I'm having some troubles to align the upper_navdiv with the content div.
I want the upper_nav with links aligned with the right-hand side margin and that grows in the left-hand side direction depending on how many links there are inside and the width of each boxes.
Could you check which is the problem?
upper_nav is child of header that takes the whole width of the page:
div#upper_nav {
position: absolute;
bottom:0;
right:0;
width:80%;
}
So I would that the width would be the 80% of the parent width but I don't understand why the margin is not aligned correctly.
Here the example of my page:
html {
margin: 0;
padding: 0;
background-color: #ffffff;
font-size: 17px;
}
body {
font-family: Tahoma, Geneva, sans-serif;
color: #000;
text-align: justify;
background-image: url('url_immagine');
background-repeat: no-repeat;
background-attachment: fixed;
background-size: cover;
}
div#container {
overflow: hidden;
width: 95%;
margin: 0px auto;
background-color: #ffffff;
}
div#header {
/*background: url('header.png') no-repeat center center;*/
/*background-size: cover;*/
/*height:18vw;*/
position: relative;
}
div#upper_nav {
position: absolute;
bottom: 0;
right: 0;
width: 80%;
/*background-color:#e6e6e6;*/
}
div#navigation_left {
padding: 1% 1%;
float: left;
width: 21%;
background-color: #e6e6e6;
box-shadow: 5px 5px 2px #888888;
padding-bottom: 99999px;
margin-bottom: -99999px;
}
div#content {
overflow: auto;
margin-left: 25%;
background-color: #e6e6e6;
box-shadow: 5px 5px 2px #888888;
padding-left: 1%;
padding-right: 1%;
padding-bottom: 99999px;
margin-bottom: -99999px;
}
div#footer {
clear: both;
/*background: url('footer.png') no-repeat center center;*/
/*background-size: cover;*/
/*height:5vw;*/
width: 100%;
position: relative;
}
div#footer_content {
position: relative;
bottom: -50%;
text-align: center;
z-index: 9999;
background-color: #e6e6e6;
}
P {
color: #000;
font-family: Tahoma;
}
a {
text-decoration: none;
color: #0066FF;
font-size: 17px;
}
a:hover {
color: #0066FF;
text-decoration: underline
}
h1 {
background-color: #737373;
color: #fff;
font-family: verdana;
font-size: 200%;
}
h2,
h3,
h4,
h5,
h6,
h7,
h8 {
background-color: #737373;
color: #fff;
font-family: verdana;
font-size: 150%;
}
ul#menu_header {
list-style: none;
line-height: 150%;
text-align: center;
}
ul#menu_header li {
background-color: #737373;
right: 0;
width: 19.6%;
margin: 0.2%;
float: left;
/* elementi su singola riga */
}
ul#menu_header li a {
color: #fff;
text-decoration: none;
}
ul#menu_header li.active,
ul#menu_header li:hover {
background-color: #b1b1b1;
}
ul#menu_left {
display: block;
list-style: none;
text-align: left;
text-decoration: none;
padding-left: 5%;
}
ul#menu_left li {
margin: 1%;
font-size: 5vw;
}
ul#menu_left li a {
color: #000;
display: block;
line-height: 150%;
text-decoration: none;
}
ul#menu_left li.active,
ul#menu_left li:hover {
background-color: #c9c9c9;
}
.accordion {
background-color: #eee;
color: #444;
cursor: pointer;
padding: 18px;
width: 100%;
border: none;
text-align: left;
outline: none;
font-size: 15px;
transition: 0.4s;
}
.active,
.accordion:hover {
background-color: #ccc;
}
.panel {
padding: 0 18px;
display: none;
background-color: white;
overflow: hidden;
}
.panel a {
color: #000
}
.panel a:hover {
background-color: #b1b1b1
}
<html>
<head>
<title>Title</title>
</head>
<body>
<div id="container">
<div id="header">
<img src="http://placehold.it/1600x900" width="100%" alt="Riunione annuale GTTI SIEm2019" />
<div id="upper_nav">
<ul id="menu_header">
<li class="active">Home</li>
<li>Link11</li>
<li>Link22</li>
<li>Link33</li>
<li>Link44</li>
</ul>
</div>
</div>
<div id="navigation_left">
<ul id="menu_left">links</ul>
</div>
<div id="content">
<p>text</p>
</div>
<div id="footer">
<div id="footer_content"></div>
</div>
</div>
</body>
</html>
You notice the non-alignment resizing the window.
I am trying to display a facebook like box on the sidebar of my website. Yet when I put the code in, nothing appears. I have tried moiving the code to different spots and still nothing appears. I am not sure what I am doing wrong. Thanks in advance. Here is the code.
<!DOCTYPE html>
<!-- Website template by freewebsitetemplates.com -->
<html>
<head>
<meta charset="UTF-8">
<title>Kustum Kostumes</title>
<link rel="stylesheet" href="css/style.css" type="text/css">
</head>
<body>
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_GB/sdk.js#xfbml=1&version=v2.8";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div id="page">
<div id="header">
<div class="background">
<h1 id="logo"> <img src="images/Banner1.jpg" alt="Logo" /> </h1>
<div id="navigation">
<ul>
<li class="selected">
<li>
Home
</li>
<li>
Services
</li>
<li>
Gallery
</li>
</ul>
</div>
</div>
</div>
<div id="contents">
<div id="blog">
<div id="sidebar">
<div class="section">
<div class="fb-page" data-href="https://www.facebook.com/kustumkostumes" data-tabs="timeline" data-small-header="false" data-adapt-container-width="true" data-hide-cover="false" data-show-facepile="true"><blockquote cite="https://www.facebook.com/kustumkostumes" class="fb-xfbml-parse-ignore">Kustum Kostumes</blockquote></div>
<ul class="posts">
<li>
<span class="time">.</a>
</li>
<li>
<span class="time"></a>
</li>
<li>
<span class="time"></a>
</li>
</ul>
</div>
<div class="section">
<h5></h5>
<ul>
</ul>
</div>
</div>
<div id="main">
<h3>Welcome to Kustum Kostumes</h3>
<p> We aim to provide high quality, handmade and crafted kostumes, props, sculptures, and artwork!<br> We put in a lot of time and effort into what we produce to make sure that not only is the client <br>happy but it looks as close as possible to the source material. </p><p>Please check out the services page to see a detailed list of what we have to offer <br>and the approximate prices for each. Please use the Gumtree links on the side <br>for what we currently have for sale. Alternatively, contact us for anything you have in mind.<br> Don't forget to like us on facebook for continual updates.
</p>
<img src="images/bg-header2.jpg" alt="Img" height="325" width="547">
</div>
<div class="footer">
</div>
</div>
</div>
<div id="footer">
<div class="background">
<div class="body">
<form action="contact.php" method="post" id="message" class="section">
<h3>Send a Message</h3>
<ul>
<li>
<label>Full Name:</label>
<input type="text" value="">
</li>
<li>
<label>Email:</label>
<input type="text" value="">
</li>
<li>
<label>Message:</label>
<textarea></textarea>
</li>
<li>
<input type="submit" value="Send">
</li>
</ul>
</form>
<div class="section">
<h3>Contact Us</h3>
<ul>
<li>
<span>Phone</span><strong>:</strong>
<p>
0450101551
</p>
</li>
<li>
<span>Email</span><strong>:</strong>
<p>
kustumkostumes#gmail.com
</p>
</li>
<li>
<span>
</li>
</ul>
</div>
<p id="footnote">
© Copyright 2017. All rights reserved. ABN 78 820 831 193
</p>
</div>
</div>
</div>
</div>
CSS Stylesheet
/* Website template by freewebsitetemplates.com */
#font-face {
font-family: 'DaysOne-Regular';
src: url('../fonts/DaysOne-Regular.eot');
src: local('☺'), url('../fonts/DaysOne-Regular.woff') format('woff'), url('../fonts/DaysOne-Regular.ttf') format('truetype'), url('../fonts/DaysOne- Regular.svg') format('svg');
font-weight: normal;
font-style: normal;
}
body {
background: url(../images/bg-body.jpg) repeat left top;
font-family: Arial, Helvetica, sans-serif;
min-width: 960px;
margin: 0;
}
.background {
background: url(../images/bg-pattern-red.jpg) repeat left top;
}
#page {
width: 960px;
margin: 0 auto;
padding: 156px 0 0;
}
img {
border: 0;
}
/*------------------------------ SPRITES ------------------------------*/
#footer ul li a {
background: url(../images/icons.png) no-repeat;
}
#message input[type='submit'], .more {
background: url(../images/bg-buttons.png) no-repeat;
}
.more {
background-position: 0 -35px;
color: #636974;
display: inline-block;
font-size: 14px;
font-weight: bold;
height: 35px;
line-height: 35px;
width: 170px;
padding: 1px 0;
text-align: center;
text-decoration: none;
text-transform: uppercase;
}
.more:hover {
background-position: 0 -82px;
color: #010000;
}
/*------------------------------ HEADER ------------------------------*/
#header {
width: 100%;
border-bottom: 5px solid #c3c3c3;
position: absolute;
left: 0;
top: 0;
}
#header .background {
height: 150px;
border-bottom: 1px solid #b6051c;
}
/** Logo **/
#logo {
font-family: 'DaysOne-Regular';
font-size: 36px;
font-weight: normal;
line-height: 130px;
width: 960px;
margin: 0 auto;
}
#logo a {
color: #fff;
text-decoration: none;
text-transform: uppercase;
}
/** Navigation **/
#navigation {
background: url(../images/bg-navigation.png) no-repeat;
height: 49px;
width: 960px;
margin: 0 auto;
position: relative;
top: 0;
}
#navigation ul {
display: inline-block;
list-style: none;
margin: 0;
padding: 1px 10px;
}
#navigation li {
float: left;
}
#navigation li a {
color: #636974;
display: block;
font-size: 14px;
font-weight: bold;
line-height: 47px;
width: 154px;
border-color: transparent;
border-style: none solid;
border-width: 1px;
text-align: center;
text-decoration: none;
text-transform: uppercase;
}
#navigation li a:hover, #navigation li.selected a {
background-color: #bebcbc;
color: #2e3a54;
border-color: #afafaf;
}
/*------------------------------ CONTENTS ------------------------------*/
#contents {
background: #fff url(../images/bg-content-bottom.png) no-repeat left bottom;
display: inline-block;
width: 100%;
margin-bottom: 30px;
padding: 23px 0 0;
-webkit-border-bottom-right-radius: 1px;
-webkit-border-bottom-left-radius: 1px;
-moz-border-radius-bottomright: 1px;
-moz-border-radius-bottomleft: 1px;
border-bottom-right-radius: 1px;
border-bottom-left-radius: 1px;
}
#contents h1, #contents h2, #contents h4, #contents h5, #contents h6 {
color: #2e3a54;
font-family: "DaysOne-Regular";
font-size: 36px;
font-weight: normal;
margin: 0 0 18px;
}
#contents h2 {
font-size: 24px;
line-height: 24px;
text-transform: uppercase;
}
#contents h4 {
font-size: 16px;
line-height: 24px;
margin: 0 0 12px;
text-transform: uppercase;
}
#contents h5 {
font-size: 14px;
line-height: 24px;
margin: 0;
text-transform: uppercase;
}
#contents h5 a {
color: #940315;
text-decoration: none;
}
#contents h6 {
font-size: 12px;
line-height: 24px;
text-transform: uppercase;
}
#contents p {
color: #636974;
font-size: 14px;
line-height: 24px;
margin: 0;
padding: 0 0 24px;
}
#contents p a {
color: #636974;
}
#contents p a:hover {
color: #721f29;
}
#contents h5 a:hover {
text-decoration: underline;
}
#contents .footer {
background-color: #f8f8f8;
clear: both;
width: 900px;
margin: 0 0 4px -30px;
padding: 20px 30px 0;
}
#contents .footer h6 {
float: left;
width: 210px;
margin-bottom: 30px;
margin-right: 20px;
text-transform: uppercase;
}
#contents .section {
width: 260px;
padding: 0 0 0 20px;
}
#contents > div:first-child {
padding: 48px 30px 24px;
}
.time {
color: #636974;
display: block;
font-size: 12px;
line-height: 12px;
padding: 6px 0 5px;
}
/** adbox **/
#contents #adbox {
background: url(../images/bg-adbox-bottom.png) no-repeat left bottom;
padding: 0 0 19px;
position: relative;
}
#adbox > div {
background-color: #f0f0f0;
height: 390px;
-webkit-border-bottom-right-radius: 1px;
-webkit-border-bottom-left-radius: 1px;
-moz-border-radius-bottomright: 1px;
-moz-border-radius-bottomleft: 1px;
border-bottom-right-radius: 1px;
border-bottom-left-radius: 1px;
padding-right: 20px;
}
#adbox > div:after {
clear:both;
content:"";
display:block;
height:1%;
line-height:0;
visibility:hidden;
}
#adbox h1 {
padding-top: 18px;
}
#adbox h4 {
font-size: 14px;
}
#adbox img {
float: left;
margin-right: 20px;
}
/** Sidebar **/
#contents .sidebar {
float: left;
min-height: 490px;
width: 279px;
border-right: 1px solid #f2cc3d;
margin: -19px 40px 0 30px;
padding: 20px 0 0;
}
#contents .sidebar ul {
list-style: none;
margin: 0;
padding: 0;
}
#contents .sidebar ul li {
font-size: 14px;
line-height: 24px;
margin: 0 0 24px;
}
#contents .sidebar ul span {
color: #636974;
display: block;
font-size: 12px;
line-height: 12px;
padding: 6px 0 5px;
}
#contents .sidebar ul li a {
color: #636974;
text-decoration: none;
}
#contents .sidebar ul li a:hover {
text-decoration: underline;
}
#sidebar, .highlight {
float: right;
display: inline-block;
border-left: 1px solid #f2cc3d;
margin: 0 0 24px 19px;
}
#sidebar .section {
border-top: 1px solid #f2cc3d;
padding-top: 24px;
}
#sidebar .section:first-child {
border: 0;
padding-top: 0;
}
#sidebar .section ul {
color: #636974;
font-size: x-small;
margin: 0 0 24px;
padding-left: 12px;
}
#sidebar .section ul li {
padding-left: 10px;
}
#sidebar .section ul li > a {
color: #636974;
display: block;
font-size: 14px;
line-height: 24px;
text-decoration: none;
}
#sidebar .section ul li a:hover {
text-decoration: underline;
}
/** list **/
ul.list {
list-style: none;
width: 600px;
margin: 0;
padding: 0;
}
ul.list li h5 + img {
float: left;
margin-right: 20px;
margin-top: 6px;
}
/** Main **/
#main > ul {
display: inline-block;
list-style: none;
width: 580px;
margin: 0;
padding: 0;
}
#main > ul li {
float: left;
width: 290px;
}
#main > ul li p b {
color: #2e3a54;
display: block;
font-family: 'DaysOne-Regular';
font-weight: normal;
text-transform: uppercase;
}
/** About **/
#contents #about {
padding-bottom: 0;
padding-top: 48px;
}
#about #main img {
margin-bottom: 18px;
}
#about .footer p {
font-size: 12px;
}
/** Services **/
#contents #services {
display: inline-block;
width: 900px;
}
#services #sidebar {
min-height: 620px;
}
/*------------------------------ FOOTER ------------------------------*/
#footer {
width: 100%;
border-top: 5px solid #c3c3c3;
position: absolute;
left: 0;
}
#footer .background {
border-top: 1px solid #b6051c;
}
#footer .body {
width: 960px;
margin: 0 auto;
padding: 40px 0 20px;
}
#footer .section {
float: left;
display: inline-block;
width: 460px;
margin: 0 10px 24px;
}
#footer h3 {
color: #fff;
font-family: 'DaysOne-Regular';
font-size: 18px;
font-weight: normal;
line-height: 18px;
margin: 0 0 18px;
text-transform: uppercase;
}
#footer ul {
list-style: none;
margin: 0;
padding: 0;
}
#footer ul li {
color: #b3999c;
display: inline-block;
font-size: 14px;
line-height: 24px;
width: 100%;
border-top: 1px solid #8a0413;
padding: 12px 0 0;
vertical-align:top;
}
#footer ul li:first-child, #footer #message ul li {
border: 0;
padding: 0;
}
#footer ul li span {
float: left;
display: inline-block;
width: 70px;
vertical-align:top;
}
#footer ul li strong {
float: left;
display: inline-block;
margin-right: 6px;
vertical-align: top;
}
#footer ul li p {
float: left;
display: inline-block;
width: 370px;
margin: 0;
padding: 0 0 12px;
}
#footer ul li a {
color: #b3999c;
display: inline-block;
height: 22px;
width: 30px;
margin: 0 10px;
text-decoration: none;
}
#footer ul li a.twitter {
background-position: -40px 0;
}
#footer ul li a.facebook {
background-position: -40px -32px;
}
#footer ul li a.googleplus {
background-position: -40px -64px;
}
#footer ul li a.twitter:hover {
background-position: 0 0;
}
#footer ul li a.facebook:hover {
background-position: 0 -32px;
}
#footer ul li a.googleplus:hover {
background-position: 0 -64px;
}
/** message **/
#message label {
float: left;
color: #b3999c;
display: inline-block;
font-size: 14px;
line-height: 30px;
width: 96px;
margin-right: 10px;
text-align: right;
}
#message input[type='text'] {
color: #636974;
display: inline-block;
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
height: 35px;
line-height: 35px;
width: 342px;
border: 1px solid #d7d7d7;
margin: 0 0 11px;
padding: 0 4px;
}
#message textarea {
color: #636974;
display: inline-block;
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
height: 95px;
line-height: 24px;
width: 342px;
border: 1px solid #d7d7d7;
margin: 0 0 4px;
padding: 0 4px;
overflow: auto;
resize: none;
}
#message input[type='submit'] {
background-position: 0 0;
color: #636974;
cursor: pointer;
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
height: 25px;
line-height: 25px;
width: 52px;
border: 0;
margin-left: 106px;
padding: 0;
}
#message input[type='submit']:hover {
background-position: -62px 0;
color: #2e3a54;
}
#footnote {
clear: both;
color: #b75661;
font-size: 12px;
margin: 0;
text-align: center;
}
I am very inexperienced when it comes to recent html and other languages, I had a little schooling years ago, but that's about it. I had a friend ask for hep designing a simple web page for him. I have all the kinks worked out except for on a gallery page I created in the website. This page seems to work well in firefox, but not on chrome or is. In ie, it seems to ignore the css sheet altogether. In chrome, I cannot get the "Preview" image to load.
HTML of Gallery page:
<!DOCTYPE html>
<html>
<style type="text/css">
body {
background: #222;
margin-top: 20px;
}
h3 {
color: #eee;
font-family: Verdana;
}
.thumbnails img {
height: 80px;
padding: 1px;
margin: 0 10px 10px 0;
}
.thumbnails img:hover {
cursor:pointer;
}
.preview {
padding: 1px;
display: block;
max-width:500px;
max-height:399px;
width: auto;
height: auto;
}
#content, html, body {
height: 98%;
}
#left {
max-height:400px;
float: left;
width: 75%;
background: white;
height: 100%;
overflow: auto;
}
#right {
max-height:400px;
float: left;
width: 25%;
background: white;
height: 100%;
overflow: auto;
}
</style>
<head>
<meta charset="UTF-8">
<title>Gallery - Urban Outdoor Design</title>
<link rel="stylesheet" type="text/css"
href="css/style.css">
</head>
<body height: 1000px>
<div id="page">
<div id="header">
<a href="index.html" id="logo"><img
src="images/logo.png" alt="Logo"></a>
<ul>
<li>
Home
</li>
<li>
About Us
</li>
<li>
Services
</li>
<li class="current">
Gallery
</li>
<li>
<a href="billpay.html">Bill
Pay</a>
</li>
<li>
Contact
</li>
</ul>
</div>
<div id="body">
<div id="content">
<h1>Some Samples of our work:</h1>
<br>Use the scrollbar at the right
to browse images, point to an image to view a
larger version on the left.
</div>
<div class="gallery" align="center">
<div id="content">
<div id="left"><img
id="preview"
class="preview"
></div>
<div id="right">
<div class="thumbnails" align="center">
<img onmouseover="preview.src=this.src"
src="gallery/image1.jpg" alt="Image Not Loaded"/>
<img onmouseover="preview.src=this.src"
src="gallery/image2.jpg" alt="Image Not Loaded"/>
<img onmouseover="preview.src=this.src"
src="gallery/image3.jpg" alt="Image Not Loaded"/>
<img onmouseover="preview.src=this.src"
src="gallery/image4.jpg" alt="Image Not Loaded"/>
<img onmouseover="preview.src=this.src"
src="gallery/image5.jpg" alt="Image Not Loaded"/>
<img onmouseover="preview.src=this.src"
<br>
</div>
</div>
</div>
<div id="footer">
<p>
Urban Outdoor Design, LLC ©
2015 | All Rights Reserved
</p>
</div>
</div>
</body>
</html>
CSS sheet:
body {
background: url(../images/bg-body.jpg) repeat;
color: #A7A238;
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
margin: 0;
min-width: 940px;
padding: 0;
}
a {
outline: none;
}
img {
border: 0;
}
p {
margin: 0;
text-align: justify;
}
p a {
color: #356618;
}
p a:hover {
color: #66a143;
}
#page {
background: #840D22;
margin: 0 auto;
padding: 0 20px;
width: 900px;
}
#header {
background: #ffffff;
height: 151px;
}
#header a#logo {
display: block;
height: 86px;
padding: 15px 0 0 20px;
}
#header a#logo img {
display: block;
margin: 0 auto;
}
#header > ul {
background: #4b4b4b;
height: 49px;
float: left;
list-style: none;
margin: 0;
padding: 0;
width: 900px;
}
#header > ul > li {
float: left;
position: relative;
width: 150px;
}
#header > ul > li > a {
color: #f0f2c9;
display: block;
letter-spacing: 0.1em;
line-height: 49px;
text-align: center;
text-decoration: none;
}
#header > ul > li.current > a,
#header > ul > li.current > a:hover,
#header ul li ul li.current a,
#header ul li ul li.current a:hover {
background: #840d22;
color: #f0f2c9;
}
#header ul li a:hover {
background: #daead0;
color: #1b330c;
}
#header ul li ul {
list-style: none;
left: -99999px;
margin: 0;
overflow: visible;
padding: 11px 0 0;
position: absolute;
top: 49px;
width: 150px;
z-index: 2;
}
#header ul li:hover ul {
left: 0;
top: 49px;
}
#header ul li ul li {
background: #4B4B4B;
}
#header ul li ul li a {
color: #f0f2c9;
display: block;
line-height: 31px;
text-align: center;
text-decoration: none;
}
#body {
background: #ffffff;
}
#body div.header {
height: 410px;
}
#body div.header div {
position: relative;
}
#body div.header div a img,
#body div.header ul li a.figure img,
#body div.body ul li a img {
display: block;
filter: alpha(opacity=100);
/* Needed for IE8 and old versions */
opacity: 1;
}
#body div.header div a img:hover,
#body div.header ul li a.figure img:hover,
#body div.body ul li a img:hover {
filter: alpha(opacity=90);
/* Needed for IE8 and old versions */
opacity: 0.9;
}
#body div.header div div {
background: url(../images/bg-description.png) repeat-x;
height: 75px;
bottom: 0;
position: absolute;
padding: 17px 20px;
left: 0;
width: 860px;
}
#body div.header div div h1 {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 24px;
font-weight: normal;
margin: 0;
text-transform: uppercase;
}
#body div.header div div h1 a {
color: #e3e699;
text-decoration: none;
}
#body div.header div div h1 a:hover {
color: #ffffff;
}
#body div.header div div p {
color: #ffffff;
letter-spacing: 0.028em;
line-height: 24px;
}
#body div.header div div p a.continue {
background: url(../images/interface.png) no-repeat -400px 0;
display: inline-block;
height: 20px;
left: 3px;
position: relative;
top: 5px;
width: 20px;
}
#body div.header div div p a.continue:hover {
background: url(../images/interface.png) no-repeat -400px -20px;
}
#body div.header ul {
background: #356618;
list-style: none;
margin: 0;
overflow: hidden;
padding: 10px 0;
}
#body div.header ul li {
background: url(../images/separator1.png) repeat-y;
float: left;
overflow: hidden;
padding: 9px 20px 7px 0;
width: 280px;
}
#body div.header ul li:first-child {
background: none;
}
#body div#content ul.section li img,
#body div.header ul li a.figure {
display: block;
float: left;
}
#body div.header ul li a.figure img {
display: block;
border: 1px solid #ffffff;
margin: 0 20px 0;
}
#body div.header ul li.current h3 a {
color: #e3e699;
}
#body div.header ul li h3 {
font-size: 16px;
font-weight: normal;
line-height: 13px;
letter-spacing: 0.028em;
margin: 0;
padding: 0 0 10px;
}
#body div.header ul li h3 a {
color: #e3e699;
text-decoration: none;
}
#body div.header ul li h3 a:hover {
color: #ffffff;
}
#body div.header ul li p {
color: #ffffff;
letter-spacing: 0.022em;
line-height: 18px;
text-align: left;
}
#body div.body {
padding: 23px 20px 0;
}
#body div.body h1,
#body div.footer div h1 {
background: #dce9d4;
border-bottom: 2px solid #b3cca4;
color: #836145;
font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif;
font-size: 18px;
font-weight: normal;
height: 37px;
line-height: 37px;
margin: 0;
padding: 0 0 0 20px;
text-transform: uppercase;
text-shadow: 1px 1px 1px #ffffff;
}
#body div.body ul {
list-style: none;
margin: 0;
overflow: hidden;
padding: 21px 0;
}
#body div.body ul li {
float: left;
margin: 0 0 0 20px;
width: 200px;
}
#body div.body ul li:first-child,
#body div#content ul.section li:first-child,
#body div#content div#sidebar div ul li:first-child {
margin: 0;
}
#body div.body ul li h2 {
color: #836145;
font-size: 16px;
font-weight: normal;
margin: 0;
padding: 24px 0 10px;
text-transform: uppercase;
}
#body div.body ul li p {
color: #4b4b4b;
letter-spacing: 0.028em;
line-height: 24px;
text-align: left;
}
#body div.footer {
border-top: 1px solid #d7d6cd;
margin: 0 20px;
overflow: hidden;
padding: 23px 0;
}
#body div.footer img {
display: block;
float: left;
}
#body div.footer div {
float: right;
width: 540px;
}
#body div.footer div ol {
margin: 0;
padding: 20px 0 0 20px;
}
#body div.footer div ol li {
color: #4b4b4b;
font-weight: bold;
margin: 10px 0;
}
#body div.footer div ol li p {
font-weight: normal;
letter-spacing: 0.028em;
line-height: 24px;
}
#body div#content {
border-top: 1px solid #5d8546;
overflow: hidden;
padding: 35px 20px;
}
#body div#content h1 {
color: #818181;
font-size: 20px;
letter-spacing: 0.028em;
margin: 0;
text-transform: uppercase;
}
#body div#content h3 {
color: #836145;
font-size: 16px;
font-weight: normal;
letter-spacing: 0.028em;
line-height: 24px;
margin: 0;
padding: 30px 0 0;
}
#body div#content h3.first {
padding: 12px 0 0;
}
#body div#content p {
letter-spacing: 0.028em;
line-height: 24px;
padding: 25px 0 0;
}
#body div#content ul.section {
list-style: none;
margin: 0;
padding: 29px 0 0;
}
#body div#content ul.section li {
margin: 35px 0 0;
overflow: hidden;
}
#body div#content ul.section li span {
display: block;
float: left;
}
#body div#content ul.section li div {
float: right;
width: 520px;
}
#body div#content ul.section li div h2,
#body div#content div#article h2 {
color: #836145;
font-size: 16px;
letter-spacing: 0.028em;
line-height: 13px;
margin: 0;
}
#body div#content ul.section li div p {
padding: 23px 0 0;
}
#body div#content form {
margin: 0;
padding: 30px 0 0;
}
#body div#content form p {
color: #818181;
padding: 0 0 25px;
}
#body div#content form label {
display: block;
margin: 20px 0;
overflow: hidden;
}
#body div#content form label span:first-child {
background: none;
color: #836145;
float: left;
height: auto;
text-transform: uppercase;
width: 200px;
}
#body div#content form label span {
background: url(../images/interface.png) no-repeat;
display: block;
float: left;
height: 19px;
width: 320px;
}
#body div#content form label span input {
background: none;
border: none;
color: #818181;
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
height: 17px;
letter-spacing: 0.028em;
line-height: 17px;
margin: 1px 0 0 2px;
padding: 0;
width: 316px;
}
#body div#content form label span.message {
background: url(../images/interface.png) no-repeat 0 -25px;
height: 151px;
}
#body div#content form label span.message textarea {
background: none;
border: none;
color: #818181;
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
height: 147px;
letter-spacing: 0.028em;
margin: 2px 0 0 2px;
overflow: auto;
padding: 0;
resize: none;
width: 316px;
}
#body div#content form input#send {
background: url(../images/interface.png) no-repeat -331px -56px;
border: none;
color: #ffffff;
cursor: pointer;
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
height: 25px;
letter-spacing: 0.028em;
line-height: 25px;
margin: 0 0 0 440px;
text-align: center;
text-shadow: 1px 1px 1px #514b61;
text-transform: uppercase;
width: 80px;
}
#body div#content form input#send:hover {
background: url(../images/interface.png) no-repeat -331px -81px;
}
#body div#content div#article {
border-right: 1px solid #96b285;
float: left;
padding: 0 20px 0 0;
width: 580px;
}
#body div#content div#article img {
display: block;
margin: 0 0 35px;
}
#body div#content div#article h1 {
padding: 0 0 17px;
}
#body div#content div#article h2 {
line-height: 24px;
}
#body div#content div#article span {
color: #818181;
display: block;
letter-spacing: 0.028em;
line-height: 24px;
}
#body div#content div#sidebar {
float: right;
width: 242px;
}
#body div#content div#sidebar h3 {
color: #818181;
font-weight: bold;
line-height: normal;
padding: 0 0 15px;
text-transform: uppercase;
}
#body div#content div#sidebar div {
border-top: 1px solid #96b285;
padding: 20px 0;
}
#body div#content div#sidebar div:first-child {
border: none;
padding: 0 0 20px;
}
#body div#content div#sidebar div ul,
#footer div div ul {
list-style: none;
margin: 0;
padding: 0;
}
#body div#content div#sidebar div ul li {
color: #818181;
letter-spacing: 0.028em;
line-height: 24px;
}
#body div#content div#sidebar div ul li a {
color: #818181;
text-decoration: none;
}
#body div#content div#sidebar div ul li a:hover {
color: #4b4b4f;
}
#body div#content div#sidebar div:first-child ul li {
letter-spacing: 0.024em;
line-height: 18px;
margin: 15px 0 0;
}
#body div#content div#sidebar div p {
color: #818181;
padding: 0;
}
#footer {
background: #dce9d4;
border-top: 1px solid #b8d0aa;
}
#footer div {
height: 174px;
overflow: hidden;
}
#footer div div {
border-left: 1px solid #b8d0aa;
float: left;
height: 134px;
padding: 20px 20px;
width: 180px;
}
#footer div div:first-child {
border: none;
}
#footer div div h1 {
color: #8c8c8c;
font-size: 18px;
font-weight: normal;
margin: 0;
padding: 0 0 13px;
text-shadow: 1px 1px 1px #ffffff;
text-transform: uppercase;
}
#footer div div ul li a {
letter-spacing: 0.028em;
line-height: 18px;
}
#footer div div a {
color: #8c8c8c;
display: block;
letter-spacing: 0.05em;
text-decoration: none;
}
#footer div div a:hover {
color: #4b4b4f;
}
#footer div div a#mail {
background: url(../images/icons.png) no-repeat;
height: 14px;
line-height: 14px;
margin: 0 0 10px;
padding: 0 0 0 30px;
}
#footer div div a#facebook {
background: url(../images/icons.png) no-repeat 0 -38px;
height: 20px;
line-height: 20px;
margin: 0 0 10px;
padding: 0 0 0 30px;
}
#footer div div a#twitter {
background: url(../images/icons.png) no-repeat 0 -88px;
height: 18px;
line-height: 18px;
margin: 0 0 10px;
padding: 0 0 0 30px;
}
#footer div div a#googleplus {
background: url(../images/icons.png) no-repeat 0 -134px;
height: 20px;
line-height: 20px;
margin: 0 0 10px;
padding: 0 0 0 30px;
}
#footer div div a#mail:hover {
background: url(../images/icons.png) no-repeat 0 -14px;
}
#footer div div a#facebook:hover {
background: url(../images/icons.png) no-repeat 0 -58px;
}
#footer div div a#twitter:hover {
background: url(../images/icons.png) no-repeat 0 -106px;
}
#footer div div a#googleplus:hover {
background: url(../images/icons.png) no-repeat 0 -154px;
}
#footer p {
background: #840D22;
color: #ffffff;
height: 37px;
line-height: 37px;
text-align: center;
text-shadow: 1px 1px 1px #8da181;
}
Here is a link to a screenshot of what it should look like. It works in Firefox. On mouseover of a thumbnail on right, it opens a large version of the image in the white space in the body.
http://www.image-share.com/ijpg-2876-171.html
Thank you for any help!
you can use this for your mouseover will make it work in firefox and chrome
onmouseover="document.getElementById('preview').src=this.src"
from what I can find it looks like firefox can apply id variables to javascript in this case preview will be automatically given an id, while chrome does not do this.
Edit:
replace your onmouseover
<img onmouseover="preview.src=this.src" src="gallery/image1.jpg" alt="Image Not Loaded"/>
change to
<img onmouseover="document.getElementById('preview').src=this.src" src="gallery/image1.jpg" alt="Image Not Loaded"/>
edit 2:
to get the first image already in the area just add a src="" to the <img /> inside of the left div, see below:
<div id="content">
<div id="left">
<img id="preview" class="preview" src="http://d.ibtimes.co.uk/en/full/1409516/how-update-nexus-5-official-android-5-0-lollipop-build-lrx21o-via-factory-image.jpg">
</div>
would you know why my horizontal menu is to floating to the right despite ?
You can view it live here.
<header>
<nav>
<ul>
<li>Home</li>
<li>Work
<ul>
<li>Résumé</li>
<li>Portfolio</li>
</ul>
</li>
<li>Play
<ul>
<li>Experiments</li>
<li>Utilities</li>
</ul>
</li>
<li>Contact</li>
</ul>
</nav>
<div id="news_box" style="max-width: 400px; float: right; text-align: left;"></div>
</header>
CSS:
body {
background-color: rgb(255, 255, 255);
font-family: Helvetica;
font-size: 16px;
font-weight: 400;
line-height: 1.38;
color: rgb(21, 84, 244);
margin: 0;
margin: 0;
padding: 0;
border: 0;
}
header {
width: 100%;
height: 600px;
min-height: 300px;
margin-right: auto;
margin-left: auto;
background-image: url('http://lorempixel.com/output/nature-q-c-1020-711-1.jpg');
background-size: cover;
background-position: center center;
background-color: rgb(222, 222, 222);
}
h1 {
width: 100%;
margin-top: 39px;
margin-right: auto;
margin-left: auto;
font-size: 37px;
font-weight: 400;
line-height: 1.38;
text-align: center;
color: rgb(0,0,0);
}
.blablatext {
margin-top: 16px;
margin-right: auto;
margin-left: auto;
font-weight: 400;
line-height: 1.38;
text-align: center;
color: rgb(21, 84, 244);
}
nav {margin: 20px auto}
nav ul li {display: inline-block; margin-right: -4px; margin-left: 5px; vertical align: top}
nav a {padding: 7px 10px; text-decoration: none; color: rgba(255,255,255,0.9); background: rgba(0,0,0,0); border-radius: 5px; font-weight: 300; text-transform: uppercase; letter-spacing: 1.5px; font-size: 13px}
nav a:hover {background: rgba(0,0,0,0.25)}
.activeNav {background: rgba(0,0,0,0.25)}
nav ul li ul {position: absolute; display: block; margin-top: 5px; border-radius: 5px; border-top-left-radius: 0; background: none; padding-top: 5px}
nav ul li ul li {display: block; float: none; margin: 0; padding: 0}
nav ul li ul li a {display: block; text-align: left; color: rgba(255,255,255,0.9); text-shadow: 0 1px rgba(0,0,0,0.33); padding: 10px}
nav ul li ul li a:hover {background: rgba(20,150,220,0.5); color: white; text-shadow: 0 1px rgba(0,0,0,0.5)}
.hover a {display: block;}
.hover span { color: rgba(255,255,255,0.9); background: rgba(20,150,220,0.5); border-radius: 5px; position: absolute; display: block; margin: 5px 0 0 -57px; padding: 10px; font-size: 13px; font-weight: 300; letter-spacing: 1.5px; text-transform: uppercase; text-align: center; cursor: default;}
nav{
text-align:right;
position:relative;
}
nav ul li {
border: 1px solid;
display: inline-block;
margin-left: 5px;
margin-right: -4px;
position: relative;
z-index: 1000;
}
Give float right property to your nav in css:
nav {
margin: 20px auto;
float: right;
}
This will keep the news div below and would float right
nav {
float: right;
margin: 20px auto;
width: 100%;
}
nav ul {
float: right;
}
Result
Try adding float:right to either your nav css rule or your nav ul css rule, just did it in the console and it worked fine for me
I'm using Dreamweaver to edit a template that I got for my new business website. I'm having a problem with the footer and I'm not sure if it's an HTML issue, a CSS issue, or an I'm just an idiot issue. No matter what I do the footer extends down too far. Here's a screenshot of what I'm talking about:
http://tinypic.com/r/t9ccbn/4
Also, I would like the links to line up with the column above it like the contact info and the copyright info do. Here is the HTML:
<div id="footer">
<div>
<div id="links">
<div class="showroom">
<p><br>
9501 W. Sahara Ave. #2082
<br> Las Vegas, NV 89117
<br> 702-409-5373<br>
info#briarpatchfurniture.com
</p>
</div>
<ul class="navigation">
<li>Home</li>
<li>About</li>
<li> Gallery</li>
<li>Contact</li>
<p id="footnote">
© Copyright TIBISI, Inc 2013. All Rights Reserved.
</p>
</div>
</div>
And here is the CSS:
/*------------------------------ FOOTER ------------------------------*/
#footer {
background-color: #e2b241;
border-top: 1px solid #fff;
padding: 28px 0 14px;
}
#footer p {
color: #4b3a33;
font-size: 12px;
line-height: 18px;
margin: 0;
}
#footer > div {
width: 940px;
margin: 0 auto;
padding: 0 10px;
}
#footer .posts {
float: left;
height: 300px;
width: 302px;
padding: 0;
}
#footer .posts li {
width: 276px;
margin: 0 0 30px;
padding-left: 10px;
}
#footer .posts p a {
line-height: 24px;
margin: -3px 0 3px;
}
#links {
background: url(../images/separator-dark.png) repeat-x left bottom;
color: #4b3a33;
display: inline-block;
width: 940px;
padding: 0 0 20px;
}
#links h4 {
color: #241b18;
font-family: "Oswald";
font-size: 15px;
font-weight: normal;
line-height: 24px;
margin: 0 0 12px;
padding-left: 10px;
text-transform: uppercase;
}
#links > div {
float: left;
background: url(../images/separator-dark-vertical.png) repeat-y left top;
height: 300px;
padding-left: 20px;
}
#links .showroom {
background: none;
width: 293px;
padding-left: 0;
padding-right: 15px;
}
#links .showroom h4 {
padding-left: 0;
}
#links .showroom img {
margin-bottom: 12px;
}
#links .showroom p {
font-size: 13px;
margin: 0;
}
#links .showroom p em {
color: #fff;
display: block;
font-style: normal;
margin: 0 0 20px;
}
#links .showroom p a {
color: #4b3a33;
display: block;
}
#links .showroom p a:hover {
color: #241b18;
}
#newsletter {
background: url(../images/separator-dark.png) repeat-x left bottom;
width: 284px;
margin: 0 0 16px 6px;
padding: 0 0 20px;
}
#newsletter h4 {
padding-left: 0;
}
#newsletter input {
color: #4b3a33;
height: 26px;
line-height: 26px;
width: 269px;
border: 3px solid #af8112;
margin: 0 0 6px;
padding: 0 4px;
*margin-left: -6px; /** Needed for IE7 **/
}
#newsletter input.btn2 {
color: #fff;
width: 83px;
border: 0;
padding: 0px 0 2px;
}
#connect a {
display: inline-block;
height: 33px;
margin: 0 10px;
}
#connect a.facebook {
background-position: -46px -112px;
width: 33px;
}
#connect a.googleplus {
background-position: -46px -153px;
width: 34px;
}
#connect a.twitter {
background-position: -46px -194px;
width: 40px;
}
#connect a.facebook:hover {
background-position: 0 -112px;
}
#connect a.googleplus:hover {
background-position: 0 -153px;
}
#connect a.twitter:hover {
background-position: 0 -194px;
}
#footer ul.navigation {
float: right;
display: block;
line-height: 24px;
list-style: none;
margin: 0;
padding: 0 12px 0 0;
}
#footer ul.navigation li {
float: left;
margin-left: 15px;
}
#footer ul.navigation li:first-child {
margin-left: 0;
}
#footer ul.navigation li a {
color: #ab7d0f;
font: 11px/24px "Oswald";
text-decoration: none;
text-transform: uppercase;
}
#footer ul.navigation li a:hover {
color: #241b18;
}
#footer #footnote {
color: #ab7d0f;
font: 11px/24px "Oswald";
margin: 0;
text-transform: uppercase;
}
Any help will be appreciated.
http://jsfiddle.net/GCqfE/
Your use of line-height in all of the child elements of the footer is causing the footer to expand downwards vertically, and without a height value given for the parent div they are free to expand. Either change the line-heights to smaller values, or prescribe a height for the parent footer div like so:
#footer {
background-color: #e2b241;
border-top: 1px solid #fff;
padding: 28px 0 14px;
height:100px;
}
I've updated your jsFiddle: http://jsfiddle.net/GCqfE/1/