Creating an angled CSS3 divider - 100% / Auto height - css

I have checked these two posts: Adjacent divs with angled borders? [duplicate] and Shape with a slanted side (responsive) but those solutions posted do not adjust to 100% height of the container and I need this. I cannot find a solution to fit my scenario.
I'm trying to replicate this behaviour the difference is the text inside this container can be of any height so I need the angle and container to adapt to fit any height (not a fixed height container):
Here's the code I'm using with a jSFiddle: https://jsfiddle.net/qzma0r6k/1/
CSS
section {
position: relative;
color: #fff;
}
.diagonal:before {
position: absolute;
content:'';
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
-webkit-transform-origin: 0 100%;
transform-origin: 0 100%;
top: 0;
right:0;
height:100%;
z-index: 0;
width: 50%;
background:pink;
}
HTML
<section class="c-1">
<div class="c-2 diagonal">
<h1>Work with us</h1>
<p>Scelerisque et parturient dis a erat cubilia congue sociosqu vel porta sem posuere a malesuada suspendisse id commodo. Dui consequat consectetur luctus odio nibh a vel sapien hendrerit ad a consectetur cursus a nisl posuere.</p>
</div>
<div class="bg-image"></div>
</section>

Something like this?
* {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
.c-1 {
background: #333;
overflow: hidden;
position: relative;
}
.c-2 {
float: left;
width: 50%;
position: relative;
color: #fff;
padding: 50px;
}
.bg-image {
position: absolute;
width: 50%;
top: 0;
right: 0;
bottom: 0;
padding: 0;
background-image: url(http://placehold.it/350x150);
background-repeat: no-repeat;
background-position: center center;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
z-index: 0;
}
section {
position: relative;
color: #fff;
}
.diagonal {
position: relative;
z-index:1;
}
.diagonal:after {
right: 0;
left: 100px;
position: absolute;
-webkit-transform: skewX(-15deg) rotate(180deg);
-ms-transform: skewX(-15deg) rotate(180deg);
transform: skewX(-15deg) rotate(180deg);
content: "";
top: 0;
width: 100%;
height: 100%;
background: #333;
z-index:-1;
}
<section class="c-1">
<div class="c-2 diagonal">
<h1>
Work with us
</h1>
<p>
Scelerisque et parturient dis a erat cubilia congue sociosqu vel porta sem posuere a malesuada suspendisse id commodo. Dui consequat consectetur luctus odio nibh a vel sapien hendrerit ad a consectetur cursus a nisl posuere. A cubilia varius dapibus non
scelerisque aliquam imperdiet nec montes suspendisse orci potenti dignissim vestibulum venenatis sociosqu ullamcorper vestibulum scelerisque magna sem ultricies convallis cras. Ante sed elit tristique interdum hendrerit nascetur a cras suspendisse
mi fermentum vestibulum auctor a taciti euismod ac non adipiscing a. Maecenas parturient a dui sodales vestibulum nisl nisi consequat cum lacus lobortis senectus metus at adipiscing cursus parturient a.
</p>
</div>
<div class="bg-image"></div>
</section>

Related

Pause hover-triggered finished animation

I have an animation that is triggered by hovering on a sibling element (an image that renders above the animated element with the z-index property), and wish to get it paused once it's finished, since when the mouse leaves said sibling element, the animation reverts to its origin state. However I can't figure out how to do that.
Here's a snippet:
#keyframes boot {
0% {
background-color: black;
color: black;
}
100% {
background-color: #001900;
color: white;
}
}
div.tablet {
background-color: #666;
border-radius: 10px;
padding: 15px;
position: relative;
}
div.tablet img {
position: absolute;
z-index: 1;
top: 15px;
left: 0;
height: 100%;
}
div.tablet br {
display: none;
}
div.screen {
background-color: black;
color: black;
border-radius: 10px;
padding: 10px;
font-family: Monospace;
font-size: 12px;
z-index: 0;
}
div.screen br {
display: inline;
}
img:hover + div.screen {
animation: boot 7s;
background-color: #001900;
color: white;
}
<div class="tablet">
<img src="http://insurrection-du-chaos-sandbox.wdfiles.com/local--files/s-ou-o/broken.png" />
<div class="screen">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec feugiat fringilla dolor, vel rutrum arcu porttitor in. Suspendisse et ornare orci. Duis dictum lacinia condimentum. Cras sed mattis justo, eu convallis elit. Sed efficitur lectus vitae nisi blandit scelerisque. Nulla efficitur condimentum quam. Ut et faucibus metus. Quisque ornare tempor sapien, ac venenatis urna. Donec eget suscipit turpis. Nulla venenatis ultricies purus, et facilisis felis sollicitudin et. In aliquet auctor aliquet. Donec sit amet diam iaculis, ultricies nisi eget, eleifend nulla.
</div>
</div>
The better solution will be to use transition and transition-delay.
.tablet {
background-color: #666;
border-radius: 10px;
padding: 15px;
position: relative;
}
.tablet img {
position: absolute;
z-index: 1;
top: 15px;
left: 0;
height: 100%;
}
.tablet br {
display: none;
}
.screen {
background-color: black;
color: black;
border-radius: 10px;
padding: 10px;
font-family: Monospace;
font-size: 12px;
z-index: 0;
transition: .4s ease-out;
transition-delay: 2s;
/* or only transition: .4s ease-out 2s;*/
}
.screen br {
display: inline;
}
img:hover+.screen {
transition: .4s ease-out;
background-color: #001900;
color: white;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<div class="tablet">
<img src="http://insurrection-du-chaos-sandbox.wdfiles.com/local--files/s-ou-o/broken.png" />
<div class="screen">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec feugiat fringilla dolor, vel rutrum arcu porttitor
in. Suspendisse et ornare orci. Duis dictum lacinia condimentum. Cras sed mattis justo, eu convallis elit. Sed
efficitur lectus vitae nisi blandit scelerisque. Nulla efficitur condimentum quam. Ut et faucibus metus. Quisque
ornare tempor sapien, ac venenatis urna. Donec eget suscipit turpis. Nulla venenatis ultricies purus, et facilisis
felis sollicitudin et. In aliquet auctor aliquet. Donec sit amet diam iaculis, ultricies nisi eget, eleifend
nulla.
</div>
</div>
</body>
</html>

Section heading overlap on div - CSS Styling

Can anyone help me out on how to achieve the following shown below in red?
From what I understand it is a div overlap but I can't seem to figure out how to get it like this.
Add the below mentioned style to .about-lower
position: relative;
padding-top: 15px;
Remove margin-top: 20px and add the following style to .lower-title-container
position: absolute;
top: -26px;
left: 73px;
Updated JSFiddle link is here.
One method using position: absolute
I've adding padding to the container below to ensure it doesn't overlap with the button
body {
font-family: "Helvetica", sans-serif;
margin: 0px 0px 0px 0px;
}
.header-img-container {
background-image: url(../Images/about-header-img.jpg);
background-repeat: no-repeat;
background-position: top;
background-size: cover;
height: 330px;
width: 100%;
}
.header-img {
object-fit: cover;
width: 100%;
height: 100%;
}
.about-middle {
text-align: left;
margin: auto;
width: 80%;
}
.about-middle-text {
line-height: 1.3;
margin-bottom: 50px;
margin-top: 40px;
}
.about-middle-text h2 {
margin-top: 60px;
margin-bottom: 40px;
}
.about-middle-text p {
margin-bottom: 14px;
font-size: 14px;
}
.about-lower {
background-color: #FAF8F8;
text-align: left;
padding-bottom: 30px;
}
.lower-title-container {
width: 80%;
text-align: center;
vertical-align: middle;
margin: auto;
margin-top: 20px;
z-index: 10;
position: relative;
}
.lower-title {
width: 150px;
height: 50px;
background-color: #b2b0c5;
color: white;
border-radius: 22px;
display: flex;
align-items: center;
justify-content: center;
position: absolute;
top: -25px;
}
.lower-title p {
font-weight: 100;
font-size: 20px;
vertical-align: middle;
}
.about-eagles-container {
margin-top: 40px;
}
.about-eagles {
border-bottom: 1px solid lightgray;
padding-bottom: 20px;
display: flex;
width: 80%;
align-items: center;
margin: auto;
margin-top: 20px;
margin-bottom: 20px;
padding-top: 50px;
}
.eagle-img-container {
margin-right: 30px;
height: 150px;
width: 150px;
}
.eagle-img {
height: 100%;
width: 100%;
object-fit: cover;
border-radius: 2px;
}
.eagle-img-container:hover {
background-color: rgba(225, 231, 242, 0.8);
}
.eagle-name {
margin-bottom: 30px;
font-weight: bold;
}
<div class="about-middle">
<div class="about-middle-text">
<h3>Rising Eagles</h3>
<p>Lorem ipsum dolor sit amet, populo vocent perfecto has in, phaedrum aliquando omittantur mei in, evertitur intellegebat eum ut. Vel ea nulla mentitum. Id aeterno minimum sea, at est albucius scaevola consequat. Duo facer platonem expetendis eu, eu
quando aliquip constituam sed. Ne invenire suavitate vulputate mei. Vestibulum mi sapien ac nunc vel. Pellentesque nec elit sit ac orci. Ut lectus venenatis eros diam, pellentesque natoque amet lectus felis, cursus laoreet blandit ut nulla vel libero.
Venenatis tristique cras, ut vitae, lectus ornare enim, sapien luctus lacinia, aliquam nibh libero tincidunt ut. Commodo risus amet vivamus, molestie mattis at. Mauris massa, vitae dolor etiam sed. Sit mi dignissim elementum, sit nulla nec arcu
in arcu, reprehenderit sem donec magna, nisl urna non, venenatis turpis risus duis ultrices. </p>
<p> Vitae consul quodsi ea sea, ex graeci accusam copiosae sit. Ei error accumsan mel. Quo id populo melius ceteros. Ex per magna aliquam, eos scripta integre ex. Praesent in eu tincidunt. Commodo magni porta nonummy aliquam enim neque, dapibus phasellus
sed volutpat, dui quam, parturient molestie ante massa bibendum. Pharetra in ut, aliquam pretium rutrum pretium luctus phasellus. Enim sem cras interdum, at dolor in.</p>
</div>
</div>
<div class="about-lower">
<div class="lower-title-container">
<div class="lower-title">
<p>The Eagles</p>
</div>
</div>
<!-- Iterate over accounts and build div for each -->
<div class="about-eagles-container">
<div class="about-eagles">
<div class="eagle-img-container">
<!-- Change url to link to their personal page -->
<img src="../Images/profile-img1.jpg" class="eagle-img">
</div>
<div class="eagle-text">
<p class="eagle-name">Charlie</p>
<p>Lorem ipsum dolor sit amet, nec no errem euismod ponderum. Pro no populo putant audire.</p>
</div>
</div>
<div class="about-eagles">
<div class="eagle-img-container">
<img src="../Images/profile-img2.jpg" class="eagle-img">
</div>
</div>
</div>
</div>
html:
<!-- i put the button above the first div -->
<input id="btn" type="button" value="the button"/>
<div class="about-middle">
css:
add
body {
position: relative;
}
#btn {
left: 75px;
margin: -25px 0 0 20px;
position: absolute;
top: 15px;
}
.about-middle{
border: solid 1px black; /* so it's visible. */
}

Add space at left side

How I can add empty space at the left side of the text?
https://jsfiddle.net/ydL4emkd/
.camera_caption {
display: inline-block;
position: relative;
width: 717px;
padding: 10px 20% 10px 10px;
color: white;
text-decoration: none;
overflow: hidden;
}
.camera_caption:before,
.camera_caption:after {
position: absolute;
content: '';
height: 50%;
width: 100%;
left: -15%;
z-index: -1;
background: red;
}
.camera_caption:before {
top: 0px;
transform: skew(45deg);
}
.camera_caption:after {
bottom: 0px;
transform: skew(-45deg);
}
I need to get this visual result:
Add more padding to the left
.camera_caption {
....
padding-left: 100px;
}
Add padding-left
.camera_caption {
display: inline-block;
position: relative;
width: 717px;
padding: 10px 20% 10px 70px;
color: white;
text-decoration: none;
overflow: hidden;
}
.camera_caption:before,
.camera_caption:after {
position: absolute;
content: '';
height: 50%;
width: 100%;
left: -15%;
z-index: -1;
background: red;
}
.camera_caption:before {
top: 0px;
transform: skew(45deg);
}
.camera_caption:after {
bottom: 0px;
transform: skew(-45deg);
}
<div class="camera_caption">Some text</div>
<div class="camera_caption">Some text
<br>spanning across
<br>multiple line</div>
<div class="camera_caption">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas varius eros id consequat tempor. Nunc non libero nisi. Curabitur ultricies, magna eget hendrerit viverra, nibh leo faucibus est, eget efficitur mauris purus ut libero. Ut in arcu in leo
ornare tristique. Quisque rutrum lectus a lorem sollicitudin porta. Etiam placerat felis metus, non luctus felis placerat et. Nam lacinia libero enim, ut placerat mi accumsan eget. Ut viverra ipsum sit amet leo gravida, ac consequat ligula consequat.
Etiam consequat ex a augue rutrum, sed convallis est volutpat. Aliquam erat volutpat. Morbi pretium sem nec ipsum sollicitudin facilisis. Maecenas accumsan eleifend neque sit amet ornare. Curabitur condimentum arcu at tellus ullamcorper pretium. Mauris
lorem nisl, pulvinar eu lectus tincidunt, luctus fringilla diam.</div>

Vertically centered div go out of the background

I centered a div vertically with CSS and it works great. But I have a background and when I resize browser the text go out the background.
.wrapper{
height: 100%;
width: 100%;
background: rgba(51,51,51,.5);
}
.outer {
display: table;
position: absolute;
height: 100%;
width: 100%;
}
.middle {
display: table-cell;
vertical-align: middle;
}
.inner {
margin-left: auto;
margin-right: auto;
width: 50%;
}
jsfiddle
.wrapper is div, so it already has width: 100% (because div has display: block, and we know that all blocks are full width elements). .wrapper { height: 100%; } means that it will inherit the full height of its parent (in this case it is body, body inherit height of its parent - html - so you get the viewport height); So we can remove all .wrapper styles. And simply add background: rgba(51,51,51,.5); to .outer
html,
body {
width: 100%;
height: 100%;
padding: 0;
margin: 0;
}
.wrapper {
}
.outer {
display: table;
position: absolute;
height: 100%;
width: 100%;
background: rgba(51,51,51,.5);
}
.middle {
display: table-cell;
vertical-align: middle;
}
.inner {
margin: 0 auto;
width: 50%;
}
<div class="wrapper">
<div class="outer">
<div class="middle">
<div class="inner">
<h1>The Content</h1>
<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus</p>
</div>
</div>
</div>
</div>
Jsfiddle Here
No need to use position:absolute in .outer and specifying height in .wrapper.
.wrapper{
/* height:100%; remove this-**/
width: 100%;
background: rgba(51,51,51,.5);
}
.outer {
display: table;
/* position: absolute; remove this-**/
min-height: 100%;
width: 100%;
}
try this https://jsfiddle.net/serGlazkov/5t9asdc1/3/
you should use min-height and delete here position: absolute;
.outer {
display: table;
/*position: absolute;*/
height: 100%;
width: 100%;
}

HTML/CSS Center DIV inside DIV, absolute/relative problems

I've been searching for hours now, but can't seem to figure it out.
I want to center the Menu at the bottom of the Header Div, but it seems like it will either center it but keep it at the top or keep it at the bottom but not center it.
It has something to do with the position:relative/absolute, I believe.
This is the HTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
<title>Transport2000</title>
<meta http-equiv="Content-Language" content="en-us" />
<meta http-equiv="imagetoolbar" content="no" />
<meta name="MSSmartTagsPreventParsing" content="true" />
<meta name="description" content="Transport, mobilier, moloz etc." />
<meta name="keywords" content="transport, chican, marfa, duba, bucuresti, romania, transport bucuresti, " />
<meta name="author" content="Iulian" />
<style type="text/css" media="all">#import "css/master3.css";</style>
<style type="text/css" media="all">#import "css/master3.css";</style>
<link rel="shortcut icon" href="favicon.ico" />
</head>
<body>
<div id="header">
<!--<h1><img src="images/header/banner.png" alt="Transport2000" /></h1>-->
<div id="menu">
<dt id="acasa">
Acasa</dt>
<dt id="galerie">
Galerie</dt>
<dt id="contact">
Contact</dt>
</div>
</div>
<div id="container">
<!--<div id="menu">
<ul>
<li>Acasa</li>
<li>Galerie</li>
<li>Contact</li><br>
</ul>
</div>-->
<div id="content">
<div class="padding">
<p>Lorem ipsum dolor sit amet, consectetur
adipiscing elit. Curabitur ultricies
scelerisque erat eu mattis. Duis lacinia,
ante non adipiscing euismod, dui lorem
adipiscing turpis, et convallis leo orci
ac ligula. Proin porta risus id tortor aliquet
sollicitudin. Sed suscipit blandit nisi, ac
laoreet nulla ultrices sed. Curabitur velit
enim, eleifend nec faucibus vitae, imperdiet
eget lectus. Suspendisse quis ligula urna.
Cum sociis natoque penatibus et magnis dis
parturient montes, nascetur ridiculus mus.
Quisque hendrerit nisl eu nibh facilisis in
rutrum elit tempor. Praesent vel nisi quis
justo sodales elementum.</p>
<p>Fusce felis dui, pharetra vel condimentum
sed, elementum non nisl. Maecenas condimentum
pretium augue, non rhoncus magna hendrerit at.
Vestibulum ante ipsum primis in faucibus orci
luctus et ultrices posuere cubilia Curae; Etiam
euismod laoreet sollicitudin. Lorem ipsum dolor
sit amet, consectetur adipiscing elit. Donec tempor
adipiscing nibh, a dignissim nunc rutrum in. Donec
ut nulla neque. Aenean mi sapien, pulvinar a
interdum in, fringilla pharetra turpis. Aliquam
aliquet volutpat imperdiet. Integer eu magna purus,
id mattis tortor. Suspendisse porttitor ligula
vitae erat pellentesque auctor. Vivamus non
interdum urna. Duis fermentum venenatis turpis,
at vestibulum mauris ultricies vel. Aliquam in
arcu in orci rutrum condimentum vel at ipsum.
Pellentesque scelerisque eleifend ipsum, at
scelerisque eros condimentum eu. Phasellus
ante metus, fermentum id lobortis id, rutrum
id magna.</p>
<p>Lorem ipsum dolor sit amet, consectetur
adipiscing elit. Curabitur ultricies
scelerisque erat eu mattis. Duis lacinia,
ante non adipiscing euismod, dui lorem
adipiscing turpis, et convallis leo orci
ac ligula. Proin porta risus id tortor aliquet
sollicitudin. Sed suscipit blandit nisi, ac
laoreet nulla ultrices sed. Curabitur velit
enim, eleifend nec faucibus vitae, imperdiet
eget lectus. Suspendisse quis ligula urna.
Cum sociis natoque penatibus et magnis dis
parturient montes, nascetur ridiculus mus.
Quisque hendrerit nisl eu nibh facilisis in
rutrum elit tempor. Praesent vel nisi quis
justo sodales elementum.</p>
</div>
</div>
</div>
<div id="footer">
<div id="copyright">
Copyright © 2013 Blahzx Designs<br />
</div>
</div>
</body>
</html>
And this is the CSS:
html, body {
margin: 0px;
padding: 0px;
}
body {
font-family: Tahoma, Arial, Helvetica, Sans-serif;
font-size: 15px;
color: #ffffff;
text-align: center;
background-image:url('bg.png');
background-color:#FFFFFF;
background-repeat: repeat;
}
h1 {
margin: 0;
padding: 0;
text-align: center;
}
#content h2 {
margin: 0;
padding: 0;
padding-bottom: 15px;
}
#content p {
margin: 0;
padding: 0;
padding-bottom: 15px;
}
#container {
width: 960px;
margin: auto;
text-align: left;
}
#header {
width: 100%;
height:141px;
position: relative;
background-image:url('top.png');
background-repeat: repeat-x;
}
#header-content { position: absolute; bottom: 0; }
/* Menu */
#menu { height: 30px;
width: 639px;
margin-left: auto !important;
margin-right: auto !important;
text-align: center;
position: absolute;
bottom: 0; }
#menu dl { margin: 0; padding: 0; }
/* IE5 Mac Hack \*/
#menu { padding-left: 0; }
/*/
#menu { padding-left: 100px; overflow: visible; }
/* End Hack */
#menu dt { float: left; }
#menu dt a {
display: block;
height: 0px !important;
height /**/:44px; /* IE 5/Win hack */
padding: 30px 0 0 0;
overflow: hidden;
text-align: center;
background-repeat: no-repeat;
}
#menu dt a:hover {
}
#menu dt#acasa,
#menu dt#acasa a {width: 182px; background-image: url(../images/menu/acasa.png); }
#menu dt#acasa a:hover {width: 182px; background-image: url(../images/menu/acasa_on.png); }
#menu dt#galerie,
#menu dt#galerie a { width: 221px; background-image: url(../images/menu/galerie.png); }
#menu dt#galerie a:hover {width: 221px; background-image: url(../images/menu/galerie_on.png); }
#menu dt#contact,
#menu dt#contact a { width: 236px; background-image: url(../images/menu/contact.png); }
#menu dt#contact a:hover {width: 236px; background-image: url(../images/menu/contact_on.png); }
#content {
width:960px;
margin-right:280px;
line-height:18px;
}
#content a {
color: #FFFFFF;
text-decoration: none;
}
#content a:hover {
color: #CC00FF;
text-decoration: none;
}
#content .padding {
padding: 25px;
}
#footer {
width:auto;
height:137px;
clear: both;
font-family: Tahoma, Arial, Helvetica, Sans-serif;
font-size: 10px;
color: #c9c9c9;
text-align: center;
background-image:url('bot.png');
background-repeat: repeat-x;
}
#footer a {
color: #c9c9c9;
text-decoration: none;
}
#footer a:hover {
color: #ffd800;
}
#footer #altnav {
clear: both;
width: 350px;
float: right;
text-align: right;
padding-top: 13px;
}
#footer #copyright {
padding-top: 110px;
}
Thank you!
EDIT: I have added the WHOLE code.
#menu {
height: 30px;
width: 639px;
text-align: center;
position: absolute;
bottom: 0;
left:50%;
margin:0 0 0 -320px; /* left 50% PLUS margin top 0 right 0 bottom 0 left (halfwidth) makes sure it fits different screen*/
}
Try set margins left and right both to be "auto" to center it, rather than margin: 0 auto; <- which sets it to the left hand side.
Since you may have it somewhere else conflicts with those ones, to contains an "!important" declaration, it will override the corresponding declaration in the prior or later style sheet.
You should have to declare the position you just need to set the width of the menu div and set its margins to auto i.e.:
#menu
{
width:80%;
margin-left:auto !important;
margin-right:auto !important;
}
i think this is what you want :
http://jsfiddle.net/CMVbX/
HTML:
<div id="header">
<!--<h1><img src="images/header/banner.png" alt="Transport2000" /></h1>-->
<div id="menu">
<dt id="acasa">
Acasa</dt>
<dt id="galerie">
Galerie</dt>
<dt id="contact">
Contact</dt>
</div>
</div>
Css:
#header {
width:100%;
position: relative;
height:141px;
background-color:blue;
background-repeat: repeat-x;
}
/*#header-content { position: absolute; bottom: 0; }*/
/* Menu */
#menu { background-color:red; width:100%; height: 30px; margin: 0 auto; text-align: center; position: absolute; bottom: 0;}
#menu dl { margin: 0; padding: 0; }
/* IE5 Mac Hack \*/
#menu { padding-left: 0; }
/*/
#menu { padding-left: 100px; overflow: visible; }
/* End Hack */
#menu dt { float: left; }
#menu dt a {
display: block;
height: 0px !important;
height /**/:44px; /* IE 5/Win hack */
padding: 30px 0 0 0;
overflow: hidden;
text-align: center;
background-repeat: no-repeat;
}
#menu dt a:hover {
}
#menu dt#acasa,
#menu dt#acasa a {width: 182px; background-image: url(../images/menu/acasa.png); }
#menu dt#acasa a:hover {width: 182px; background-image: url(../images/menu/acasa_on.png); }
#menu dt#galerie,
#menu dt#galerie a { width: 221px; background-image: url(../images/menu/galerie.png); }
#menu dt#galerie a:hover {width: 221px; background-image: url(../images/menu/galerie_on.png); }
#menu dt#contact,
#menu dt#contact a { width: 236px; background-image: url(../images/menu/contact.png); }
#menu dt#contact a:hover {width: 236px; background-image: url(../images/menu/contact_on.png); }

Resources