I am attempting to create a CSS3 hover menu that transitions out and shows sub menus below it. The problem I am having is that I can't position the submenus below each other. Currently, I have this effect - http://jsfiddle.net/7pz3g/1/
Here is the HTML markup -
<nav id="navbar">
<ul class="iconContainer">
<li>
<i class="fa fa-home fa-lg"></i>
<ul id="wrapperFirst" class="extMenu">
<li><h3>Testing</h3></li>
<li>SubMenu
<ul id="wrapperSecond" class="subMenu">
<li><h3>ORGANIZATIONS</h3></li>
<li>Reddit</li>
</ul>
</li>
</ul>
</li>
</ul>
</nav>
CSS MarkUp -
li {
list-style: none;
}
#navbar {
background-color: #333333;
position: fixed;
text-align: center;
left: 0;
top: 0;
height: 100%;
z-index: 100;
width: 60px;
display: table;
}
#navbar .iconContainer li {
color: white;
padding: 0 2%;
border-bottom: 1px solid rgba(255, 255, 255, .2);
cursor: pointer;
height: 60px;
}
#navbar .iconContainer li:first-child {
border-top: 1px solid rgba(255, 255, 255, .2);
}
#navbar i {
text-decoration: none;
color: white;
line-height: 60px;
font-size: 1.5em;
text-shadow: 1px 1px 1px #000;
width: 60px;
opacity: .5;
}
#navbar .iconContainer {
padding: 0;
margin: 0;
display: table-cell;
vertical-align: middle;
z-index: 510;
}
#navbar li:hover i {
background-color: #222222;
opacity: 1;
}
#navbar li:hover #wrapperFirst.extMenu {
left: 60px;
}
#wrapperFirst.extMenu {
background-color: #222;
height: 100%;
left: -1000px;
position: fixed;
top: 0;
bottom: 0;
width: 250px;
padding: 0px;
-webkit-transition: all 1s ease;
-moz-transition: all 1s ease;
-ms-transition: all 1s ease;
-o-transition: all 1s ease;
transition: all 1s ease;
}
#wrapperFirst.extMenu .raq {
text-align: right;
float: right;
color: #75A4C7;
}
#wrapperFirst.extMenu li:hover #wrapperSecond.subMenu {
left: 311px;
}
#wrapperFirst.extMenu li {
padding: 10px 20px;
text-align: left;
height: auto;
text-decoration: none;
line-height: 40px;
font-size: 1em;
text-shadow: 1px 1px 1px #000;
color: white;
opacity: 1;
border-bottom: 1px solid rgba(255, 255, 255, .2);
cursor: pointer;
}
#wrapperFirst.extMenu li:first-child {
border-top: 1px solid rgba(255, 255, 255, .2);
}
#wrapperSecond.subMenu {
display:table-cell;
background-color: #222;
height: 100%;
left: -1000px;
position: fixed;
top: 0;
bottom: 0;
width: 600px;
-webkit-transition: all 1s ease;
-moz-transition: all 1s ease;
-ms-transition: all 1s ease;
-o-transition: all 1s ease;
transition: all 1s ease;
}
#wrapperSecond.subMenu h3 {
text-align: center;
}
#wrapperSecond.subMenu .subtitle {
font-family: 'SourceSansProRegular';
font-size: .6em;
}
#wrapperSecond.subMenu li a {
text-decoration: none;
color: #75A4C7;
line-height: 40px;
font-size: 1em;
text-shadow: 1px 1px 1px #000;
}
#wrapperSecond.subMenu li {
padding: 10px 20px;
text-align: left;
height: auto;
text-decoration: none;
line-height: 40px;
font-size: 1em;
text-shadow: 1px 1px 1px #000;
color: white;
opacity: 1;
border-bottom: 1px solid rgba(255, 255, 255, .2);
cursor: pointer;
}
#wrapperSecond.subMenu li {
opacity: 1;
}
#wrapperSecond.subMenu {
width: 600px;
opacity: 1;
}
#wrapperSecond.subMenu h3 {
text-align: center;
}
#wrapperSecond.subMenu .subtitle {
font-family: 'SourceSansProRegular';
font-size: .6em;
}
#wrapperSecond.subMenu li a {
text-decoration: none;
color: #75A4C7;
line-height: 40px;
font-size: 1em;
text-shadow: 1px 1px 1px #000;
}
I would like to have each submenu transition below their root menus, but yet still stay on top of the other elements on the page. Any ideas? Thanks!!!
http://jsfiddle.net/ypzcG/
#wrapperSecond.subMenu li {
opacity: 1;
position: relative;
margin-top: 70px;
}
Related
I'm having issues getting this button to stay in the button holder which floats above my site content. How would I add a drop down menu and this keep it in the same button holder.
.btn-holder {
background: rgba(255, 255, 255, 0.5);
position: static;
z-index: 10;
bottom: 0;
right: 0;
left: 0;
top: 0;
}
.button {
transform: translate(-50%, -50%);
background-color: #a137a7;
border: none;
color: white;
padding: 8px 13px;
text-align: center;
text-decoration: none;
font-size: 16px;
position: absolute;
cursor: pointer;
right: -1%;
bottom: -1%;
font-family:'Source Sans Pro', sans-serif;
opacity: .8; }
.button:hover {
background-color: #732878; /* Green */
color: white;
}
<div class="btn-holder">
<div class="button"><a href="/"><img class="img-responsive2"
src="http://static.tumblr.com/e2rgcy1/e6Yod1iwo/pop-out-icon.png"></a></div>
</div>
<!-- begin snippet: js hide: false console: true babel: false -->
Here's a quick example that should help get you started in the right direction! A few improvements could be made (such as delaying the display:none so that you can actually click links in the menu), but you should be able to figure that out. If not just let me know in the comments and I'll improve it.
#btn-holder {
background: rgba(255, 255, 255, 0.5);
position: static;
z-index: 10;
bottom: 0;
right: 0;
left: 0;
top: 0;
}
#btn-holder > .button {
transform: translate(-50%, -50%);
background-color: #a137a7;
border: none;
color: white;
padding: 8px 13px;
text-align: center;
text-decoration: none;
font-size: 16px;
position: absolute;
cursor: pointer;
right: -1%;
bottom: -1%;
font-family: 'Source Sans Pro', sans-serif;
opacity: .8;
border-radius: 3px;
}
#btn-holder > .button:hover {
background-color: #732878;
color: white;
}
#btn-holder > .menu {
opacity: 0;
transition: opacity .5s;
width: 100px;
transform: translate(-50%, -50%);
background-color: #333;
border: none;
color: white;
padding: 8px;
text-align: left;
text-decoration: none;
font-size: 16px;
position: absolute;
right: 0%;
bottom: 25px;
box-shadow:0 2px 7px rgba(0,0,0,.4);
}
.menu a {
text-decoration: none;
color: #eee;
transition: color .3s;
}
.menu a:hover {
color: #2196f3;
}
.menu > ul {
list-style: none;
margin: 2px;
padding: 0 0 0 15px;
}
.menu > ul > li:first-child {
margin-left: -15px;
}
.menu p {
opacity: 1;
margin: 0;
}
.menu p:after {
content:"";
display: block;
height: 1px;
vertical-align: bottom;
width: 100%;
border-top: 1px solid #eee;
opacity: .4;
}
#btn-holder > .button:hover + .menu {
opacity: 1;
transistion-delay: 1s;
}
#btn-holder .menu:hover {
opacity: 1;
}
<div id="btn-holder">
<div class="button">
<img class="img-responsive2" src="https://static.tumblr.com/e2rgcy1/e6Yod1iwo/pop-out-icon.png">
</div>
<div class="menu">
<p>Home</p>
<ul>
<li>Blog</li>
<li>Post 1</li>
<li>Post 2</li>
</ul>
<p>Products</p>
<p>About</p>
</div>
</div>
Here's a codepen of it that you can use to try your own changes on: http://codepen.io/XanderLuciano/pen/YGPoqE
I used the CSS + selector to select the div class="menu" that occurs right after the div class="button" and changed it's display from none to block when .button:hover is active. The code looks like this:
#btn-holder > .button:hover + .menu {
display: block;
}
Let me know if you have any questions! :)
#btn-holder {
background: rgba(255, 255, 255, 0.5);
position: static;
z-index: 10;
bottom: 0;
right: 0;
left: 0;
top: 0;
}
#btn-holder > .button {
transform: translate(-50%, -50%);
background-color: #a137a7;
border: none;
color: white;
padding: 8px 13px;
text-align: center;
text-decoration: none;
font-size: 16px;
position: absolute;
cursor: pointer;
right: -1%;
bottom: -1%;
font-family: 'Source Sans Pro', sans-serif;
opacity: .8;
border-radius: 3px;
}
#btn-holder > .button:hover {
background-color: #732878;
color: white;
}
#btn-holder > .menu {
opacity: 0;
transition: opacity .5s;
width: 100px;
transform: translate(-50%, -50%);
background-color: #333;
border: none;
color: white;
padding: 8px;
text-align: left;
text-decoration: none;
font-size: 16px;
position: absolute;
right: 0%;
bottom: 25px;
box-shadow:0 2px 7px rgba(0,0,0,.4);
}
.menu a {
text-decoration: none;
color: #eee;
transition: color .3s;
}
.menu a:hover {
color: #2196f3;
}
.menu > ul {
list-style: none;
margin: 2px;
padding: 0 0 0 15px;
}
.menu > ul > li:first-child {
margin-left: -15px;
}
.menu p {
opacity: 1;
margin: 0;
}
.menu p:after {
content:"";
display: block;
height: 1px;
vertical-align: bottom;
width: 100%;
border-top: 1px solid #eee;
opacity: .4;
}
#btn-holder > .button:hover + .menu {
opacity: 1;
transistion-delay: 1s;
}
#btn-holder .menu:hover {
opacity: 1;
}
<div id="btn-holder">
<div class="button">
<img class="img-responsive2" src="https://static.tumblr.com/e2rgcy1/e6Yod1iwo/pop-out-icon.png">
</div>
<div class="menu">
<p>Home</p>
<ul>
<li>Blog</li>
<li>Post 1</li>
<li>Post 2</li>
</ul>
<p>Products</p>
<p>About</p>
</div>
</div>
I'm trying to replicate the navigation buttons here, that's a wix website so it's so hard to inspect elements.
What I have tried is here
https://jsfiddle.net/1vngy4uo/1/
I'm trying many variations, never getting the css 100% correct.
.navButton {
width:15%;
display:inline-block;
position:relative;
background-color:#03314b;
border-radius: 30%;
box-shadow: 2px 2px 2px #888888;
}
.navButton:hover {
background-color:#98b7c8;
}
.navButton span {
width:100%;
display:inline-block;
position:absolute;
border-radius: 30%;
box-shadow: 2px 2px 2px #888888;
}
.navButton .bg {
height:50%;
top:0;
background-color:#3a6076 ;
border-radius: 30%;
box-shadow: 2px 2px 2px #888888;
}
.navButton:hover .bg{
background-color:#afcad9;
}
.navButton .text {
position:relative;
text-align:center;
color:#fff;
vertical-align: middle;
align-items: center;
}
.navButton .text:hover {
color:#000000;
}
and html
<a href="contact.html" class="navButton">
<span class="bg"></span>
<span class="text">Contact</span>
A very similar one, using linear-gradient and less HTML markup
jsFiddle
.navButton {
color: white;
text-decoration: none;
font-family: Helvetica, Arial, sans-serif;
font-size: 14px;
text-align: center;
padding: 0 30px;
line-height: 30px;
display: inline-block;
position: relative;
border-radius: 20px;
background-image: linear-gradient(#335b71 45%, #03324c 55%);
box-shadow: 0 2px 2px #888888;
transition: color 0.3s, background-image 0.5s, ease-in-out;
}
.navButton:hover {
background-image: linear-gradient(#b1ccda 49%, #96b4c5 51%);
color: #03324c;
}
Contact
I just used a div element to implement the same button that you referred. Is this what you want?
https://jsfiddle.net/9L60y8c6/
<div class="test">
</div>
.test {
cursor: pointer;
background: rgba(4, 53, 81, 1) url(//static.parastorage.com/services/skins/2.1212.0/images/wysiwyg/core/themes/base/shiny1button_bg.png) center center repeat-x;
border-radius: 10px;
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
transition: background-color 0.4s ease 0s;
position: absolute;
top: 0;
bottom: 0;
left: 5px;
right: 5px;
height: 30px;
width: 115px;
}
Would this be a start? You might want to adjust the colors a little.
Note: One can use linear-gradient, though it won't work on IE9, so I use a pseudo instead
.navButton {
width: 15%;
display: inline-block;
position: relative;
background-color: #03314b;
border-radius: 8px;
box-shadow: 2px 2px 2px #888888;
text-align: center;
text-decoration: none;
color: #fff;
padding: 5px;
transition: all 0.3s;
overflow: hidden;
}
.navButton:before {
content: '';
position: absolute;
top: 0;
left: 0;
height: 50%;
width: 100%;
background-color: #335b71;
transition: all 0.3s;
}
.navButton span {
position: relative;
}
.navButton:hover {
transition: all 0.3s;
background-color: #96b4c5;
color: black;
}
.navButton:hover:before {
transition: all 0.3s;
background-color: #b1ccda;
}
<a href="contact.html" class="navButton">
<span>Contact</span>
</a>
I have a DIV with an "arrow" at the bottom, not unlike a speech bubble from a comic book, which appears on the hover state:
The arrow is created with the :after and :before pseudo elements.
I have a transition for the hover for the border color and the box shadow.
My problem is that the "arrow" just "appears". No fade like the other items, but I can't figure out how to target the "arrow". "All" does not look right either.
Ideally, I'd love to have a delay on the arrow and a simple fade or wipe.
Here's the CSS:
.item-selector-button {
position: relative;
text-align: center;
cursor: pointer;
border: 1px solid #cecece;
padding: 15px;
border-radius: 0;
color: #000;
width: 160px;
height: 120px;
transition: all ease-in-out 0.1s, box-shadow ease-in-out 0.1s;
}
.item-selector-button .title {
color: #3e53a4;
font-size: 12px;
margin: 0;
padding-top: -3px;
font-family: "PrecisionSans_W_Md", "Helvetica Neue", Arial, sans-serif;
}
.item-selector-button .divider {
height: 1px;
width: 20px;
background-color: #cecece;
margin: 4px auto 10px;
}
.item-selector-button .image {
background: #fff url("../images/box.png") center center no-repeat;
width: 64px;
height: 57px;
margin: 4px auto;
}
.item-selector-button:hover, .item-selector-button.hover {
padding: 14px;
}
.item-selector-button:hover:after, .item-selector-button.hover:after {
content: "";
position: absolute;
bottom: -12px;
left: 68px;
border-width: 12px 12px 0;
border-style: solid;
border-color: #fff transparent;
transition-delay: 0.3s;
}
.item-selector-button:hover:before, .item-selector-button.hover:before {
content: "";
position: absolute;
bottom: -15px;
left: 65px;
border-width: 15px 15px 0;
border-style: solid;
border-color: #3e53a4 transparent;
transition-delay: 0.3s;
}
.item-selector-button:active, .item-selector-button.active {
border-width: 2px;
border-color: #3e53a4;
background-color: #3e53a4;
}
.item-selector-button:active:before, .item-selector-button.active:before {
content: "";
position: absolute;
bottom: -15px;
left: 65px;
border-width: 15px 15px 0;
border-style: solid;
border-color: #3e53a4 transparent;
transition-delay: 0.3s;
}
.item-selector-button:active .title, .item-selector-button.active .title {
color: #fff;
}
.item-selector-button:active .divider, .item-selector-button.active .divider {
background-color: #fff;
}
.item-selector-button:active .image, .item-selector-button.active .image {
background-color: #3e53a4;
}
.item-selector-button:active:hover, .item-selector-button.active:hover {
padding: 15px;
box-shadow: none;
}
.item-selector-button:active:hover:after, .item-selector-button.active:hover:after {
content: "";
position: absolute;
bottom: -12px;
left: 68px;
border-width: 12px 12px 0;
border-style: solid;
border-color: #3e53a4 transparent;
transition-delay: 0.3s;
}
.item-selector-button.disabled {
pointer-events: none;
cursor: not-allowed;
}
.item-selector-button.disabled .title {
color: #c3c3c3;
}
.item-selector-button.disabled .image {
background-image: url("../images/box-disabled.png");
}
.item-selector-button.disabled:hover {
padding: 15px;
border: 1px solid #cecece;
box-shadow: none;
}
You only have pseudoelements on the hovered element, so there is nothing to transition from/to. You need to add the pseudo elements on the non-hover state element.
Example transitioning visibility:
.item-selector-button:before {
.arrow-inside(...);
transition:all 5s ease;
transition-delay: 0.3s;
visibility:hidden;
}
.item-selector-button:after {
.arrow-outside(...);
transition:all 5s ease;
transition-delay: 0.3s;
visibility:hidden;
}
.item-selector-button:hover:before {
visibility:visible;
}
.item-selector-button:hover:after {
visibility:visible;
}
This is the actual output
How to remove the highlighted section in red, in the actual output?
This is my expected output
JSFiddle Demo link
Example,
.wizard ul
{
list-style: none outside none;
padding: 0;
margin: 0;
width: 4000px;
}
.wizard ul li
{
float: left;
margin: 0;
padding: 0 20px 0 30px;
line-height: 35px;
position: relative;
background: #f5f5f5;
color: #d0d0d0;
font-size: 12px;
cursor: default;
-webkit-transition: all .218s ease;
-moz-transition: all .218s ease;
-o-transition: all .218s ease;
transition: all .218s ease;
}
.wizard ul li .chevron
{
border: 24px solid transparent;
border-left: 14px solid #d4d4d4;
border-right: 0;
border-width: 18px 0 17px 14px;
display: block;
position: absolute;
right: -14px;
top: 0;
z-index: 1;
}
.wizard ul li .chevron:before
{
border: 24px solid transparent;
border-left: 14px solid #f5f5f5;
border-right: 0;
content: "";
display: block;
position: absolute;
right: 1px;
top: -24px;
-webkit-transition: all .218s ease;
-moz-transition: all .218s ease;
-o-transition: all .218s ease;
transition: all .218s ease;
}
.wizard ul li.complete
{
background: #f5f5f5;
color: #444;
}
.wizard ul li.complete:before
{
display: block;
content: "";
position: absolute;
bottom: 0;
left: 0;
right: -1px;
height: 2px;
max-height: 2px;
overflow: hidden;
z-index: 10000;
}
.wizard ul li.complete:hover
{
background: #eee;
cursor: pointer;
}
.wizard ul li.complete:hover .chevron:before
{
border-left: 20px solid #eee;
}
.wizard ul li.complete .chevron:before
{
border-left: 20px solid #f5f5f5;
}
.wizard ul li.active
{
background: #428bca;
color: #262626;
}
.wizard ul li.active:before
{
display: block;
content: "";
position: absolute;
bottom: 0;
left: 0;
right: -1px;
height: 2px;
max-height: 2px;
overflow: hidden;
z-index: 10000;
}
.wizard ul li.active .chevron:before
{
border-left: 14px solid #428bca;
}
.wizard ul li .badge
{
margin-right: 8px;
}
.wizard ul li:first-child
{
-webkit-border-radius: 2px 0 0 0;
-webkit-background-clip: padding-box;
-moz-border-radius: 2px 0 0 0;
-moz-background-clip: padding;
border-radius: 2px 0 0 0;
background-clip: padding-box;
padding-left: 20px;
}
/**/
</style>
<div data-target="#simplewizardinwidget-steps" class="wizard" id="simplewizardinwidget">
<ul class="steps">
<li class="complete" data-target="#simplewizardinwidgetstep1">Personal Information<span class="chevron"></span></li>
<li data-target="#simplewizardinwidgetstep2" class="complete">Qualification<span class="chevron"></span></li>
<li data-target="#simplewizardinwidgetstep3" class="active">Profile<span class="chevron"></span></li>
<li data-target="#simplewizardinwidgetstep2" class="complete">Qualification1<span class="chevron"></span></li>
<li data-target="#simplewizardinwidgetstep2" class="complete">Qualification2<span class="chevron"></span></li>
</ul>
</div>
kindly assist me to achieve this..
Html Part
add overflow: hidden; to .wizard ul
.wizard ul
{ overflow: hidden;
list-style: none outside none;
padding: 0;
margin: 0;
width: 4000px;
}
.wizard ul li
{
float: left;
margin: 0;
padding: 0 20px 0 30px;
line-height: 35px;
position: relative;
background: #f5f5f5;
color: #d0d0d0;
font-size: 12px;
cursor: default;
-webkit-transition: all .218s ease;
-moz-transition: all .218s ease;
-o-transition: all .218s ease;
transition: all .218s ease;
}
.wizard ul li .chevron
{
border: 24px solid transparent;
border-left: 14px solid #d4d4d4;
border-right: 0;
border-width: 18px 0 17px 14px;
display: block;
position: absolute;
right: -14px;
top: 0;
z-index: 1;
}
.wizard ul li .chevron:before
{
border: 24px solid transparent;
border-left: 14px solid #f5f5f5;
border-right: 0;
content: "";
display: block;
position: absolute;
right: 1px;
top: -24px;
-webkit-transition: all .218s ease;
-moz-transition: all .218s ease;
-o-transition: all .218s ease;
transition: all .218s ease;
}
.wizard ul li.complete
{
background: #f5f5f5;
color: #444;
}
.wizard ul li.complete:before
{
display: block;
content: "";
position: absolute;
bottom: 0;
left: 0;
right: -1px;
height: 2px;
max-height: 2px;
overflow: hidden;
z-index: 10000;
}
.wizard ul li.complete:hover
{
background: #eee;
cursor: pointer;
}
.wizard ul li.complete:hover .chevron:before
{
border-left: 20px solid #eee;
}
.wizard ul li.complete .chevron:before
{
border-left: 20px solid #f5f5f5;
}
.wizard ul li.active
{
background: #428bca;
color: #262626;
}
.wizard ul li.active:before
{
display: block;
content: "";
position: absolute;
bottom: 0;
left: 0;
right: -1px;
height: 2px;
max-height: 2px;
overflow: hidden;
z-index: 10000;
}
.wizard ul li.active .chevron:before
{
border-left: 14px solid #428bca;
}
.wizard ul li .badge
{
margin-right: 8px;
}
.wizard ul li:first-child
{
-webkit-border-radius: 2px 0 0 0;
-webkit-background-clip: padding-box;
-moz-border-radius: 2px 0 0 0;
-moz-background-clip: padding;
border-radius: 2px 0 0 0;
background-clip: padding-box;
padding-left: 20px;
}
<br/>
<br/>
<div data-target="#simplewizardinwidget-steps" class="wizard" id="simplewizardinwidget">
<ul class="steps">
<li class="complete" data-target="#simplewizardinwidgetstep1">Personal Information<span class="chevron"></span></li>
<li data-target="#simplewizardinwidgetstep2" class="complete">Qualification<span class="chevron"></span></li>
<li data-target="#simplewizardinwidgetstep3" class="active">Profile<span class="chevron"></span></li>
<li data-target="#simplewizardinwidgetstep2" class="complete">Qualification1<span class="chevron"></span></li>
<li data-target="#simplewizardinwidgetstep2" class="complete">Qualification2<span class="chevron"></span></li>
</ul>
</div>
Ive been trying to put in this image but the issue i'm getting here is that the image keeps on passing the footer and I cant seem to solve it. Please help me out. The image size for the "batmanshop" is width=890 and height=2000.
Here is the CSS code and below is the HTML code
body {
font: 100%/1.4 Verdana, Arial, Helvetica, sans-serif;
background-image: url(images/background.png);
margin: 0;
padding: 0;
color: #000;
}
IMG.titleImage {
margin-left: 300px;
}
ul, ol, dl {
padding: 0;
margin: 0;
}
h1, h2, h3, h4, h5, h6, p {
margin-top: 0;
padding-right: 15px;
padding-left: 15px;
word-wrap: break-word;
}
a img {
border: none;
}
a:link {
color: black;
}
a:visited {
color: #6E6C64;
}
a:hover, a:active, a:focus {
text-decoration: none;
}
.container {
width: 960px;
height:100%;
background-color: #FFF;
margin: 0 auto;
}
.header {
background-image:url(images/headerbg.png);
height:140px;
}
.content {
width:100%;
height:100%;
background-color: white;
}
.footer {
padding: 10px 0;
background-color: #F1F8E0;
}
.fltrt {
float: right;
margin-left: 8px;
}
.fltlft {
float: left;
margin-right: 8px;
}
.clearfloat {
clear:both;
height:0;
font-size: 1px;
line-height: 0px;
}
//Navigation Bar
.nav, .nav ul {
margin: 0;
padding: 0;
list-style: none;
line-height: 1;
}
.nav {
/* Layout & positioning */
position: relative;
margin: auto; /* Centering the menu */
height: 46px;
width: 960px;
text-align: center;
/* Background & effects */
box-shadow: 0 1px 2px rgba(0, 0, 0, .3);
background: #65c0bb;
background-image:url(images/navImage.png);
}
.nav>li {
margin: 0;
line-height: 1;
padding: 0;
display: inline;
position: relative;
margin: 0 12px;
}
.nav::after, .nav::before {
content: "";
display: block;
position: absolute;
top: 6px;
height: 0px;
width: 0px;
border: 23px solid #65c0bb;
z-index: -1;
}
/* The left ribbon */
.nav::before {
border-left-color: transparent;
left: -30px;
}
/* The right ribbon */
.nav::after {
border-right-color: transparent;
right: -30px;
}
.nav>li>a {
display: inline-block;
padding: 15px 20px;
position: relative;
font-family: 'Oswald', sans-serif;
font-size: 16px;
text-transform: uppercase;
text-decoration: none;
color: #fff;
-webkit-transition: color .3s linear;
-moz-transition: color .3s linear;
-o-transition: color .3s linear;
-ms-transition: color .3s linear;
transition: color .3s linear;
}
.nav>li>a:hover, .nav>li:hover>a {
color: #eae8a5;
}
.nav>li>a::after {
content: "";
height: 15px;
width: 15px;
position: absolute;
right: -20px;
top: 16px;
display: block;
}
.nav>li:last-child>a::after {
display: none;
}
.nav ul {
position: absolute;
left: -9999px;
padding-top: 10px;
border-bottom: 1px solid #ccc;
opacity: 0;
-webkit-transition: opacity .3s linear;
-moz-transition: opacity .3s linear;
-o-transition: opacity .3s linear;
-ms-transition: opacity .3s linear;
}
.nav>li:hover>ul {
left: 0;
opacity: 1;
top: 30px;
}
.nav ul li:hover>ul {
left: 150px;
opacity: 1;
top: -11px;
padding-left: 12px;
border-bottom: 0;
box-shadow: none;
}
.nav ul li {
display: block;
position: relative;
border-top: 1px solid #ccc;
border-left: 1px solid #ccc;
border-right: 1px solid #ccc;
width: 150px;
text-align: justify;
z-index: 9;
background: #eee;
box-shadow: 3px 4px 0 rgba(0, 0, 0, .1);
-webkit-transition: background .3s linear;
-moz-transition: background .3s linear;
-ms-transition: background .3s linear;
-o-transition: background .3s linear;
}
.nav ul li a {
font-family: "Oswald", sans-serif;
font-size: 14px;
text-decoration: none;
display: block;
padding: 7px 12px 7px 20px;
color: #65c0bb;
-webkit-transition: color .3s linear;
-moz-transition: color .3s linear;
-ms-transition: color .3s linear;
-o-transition: color .3s linear;
}
.nav ul li:hover>a, .nav ul li a:hover {
color: #4db6b0;
}
.nav ul li:hover {
background: #f7f7f7;
}
.nav ul ul li:last-child {
border-bottom: 1px solid #ccc;
}
.nav ul ul li {
box-shadow: 3px 3px 0 rgba(0, 0, 0, .1);
}
.nav ul::after, .nav ul::before {
content: "";
display: block;
z-index: 1;
position: absolute;
height: 9px;
width: 9px;
}
.nav>li>ul::after {
border: 1px solid #ccc;
background: #eee;
border-right: 0;
border-bottom: 0;
top: 5px;
left: 25px;
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
-o-transform: rotate(45deg);
-ms-transform: rotate(45deg);
}
.nav>li>ul::before {
height: 1px;
width: 12px;
background: #eee;
border-right: 0;
border-bottom: 0;
top: 10px;
left: 24px;
z-index: 99;
}
.nav ul ul::after {
border: 1px solid #ccc;
background: #eee;
border-right: 0;
border-bottom: 0;
top: 20px;
left: 8px;
position: absolute;
-webkit-transform: rotate(-45deg);
-moz-transform: rotate(-45deg);
-o-transform: rotate(-45deg);
-ms-transform: rotate(-45deg);
}
.nav ul ul::before {
height: 10px;
width: 1px;
background: #eee;
z-index: 99;
top: 20px;
left: 12px;
}
.titleImage2 {
margin-left: 250px;
}
.birthdayDream {
padding-right: 15px;
padding-left: 15px;
float: right;
}
p1 {
display: block;
margin-top: 30px;
padding-right: 15px;
padding-left: 15px;
}
form {
margin-left: auto;
margin-right: auto;s
display:inline-block;
width:600px;
}
input {
float:right;
margin-right: 50px;
clear:both;
}
input2 {
float:left;
}
.row {
margin-left: 200px;
}
.batmanImage {
margin-left: 180px;
}
.batmanshop {
height:auto;
margin: 0 auto;
}
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="style.css">
<title>Birthday Planner - Home</title>
</head>
<body>
<div class="container">
<div class="header">
</div>
<ul class="nav">
<li>
Home
</li>
<li>
Themes
<ul>
<li>Boys Party Theme</li>
<li>Girls Party Theme</li>
</ul>
</li>
<li>About</li>
<li>Contact</li>
<li>Login</li>
<li>Sign Up</li>
</ul>
<div class="content">
<br/>
<IMG class="batmanImage">
<img src="images/batmantitle.jpg" name="Title" width="600" height="206">
</IMG>
<p>All you need to do is select the desired theme and provide us the necessary details. We will do the rest. The items listed below are what will be provided when you order this theme. Don't need to worry about anything else. Just a click of a button and we will get our team to handle the rest for you.
</p>
<IMG class="batmanshop">
<img src="images/batmanshop.jpg" name="Title">
</IMG>
</div>
<div class="footer">
<div class="navigationbar">
<ul class="nav">
<li>
Home
</li>
<li>
About
</li>
<li>
Contact
</li>
<li>
Terms and Conditions
</li>
</ul>
</div>
</div>
</div>
</body>
</html>
Whatever you want to achieve, you can not do that :
<IMG class="batmanshop">
<img src="images/batmanshop.jpg" name="Title">
</IMG>
I replaced that by: <img class="batmanshop" src="images/batmanshop.jpg" name="Title" />
Anyway, even with your code, I do not see the image passing over the footer.
body {
font: 100%/1.4 Verdana, Arial, Helvetica, sans-serif;
background-image: url(images/background.png);
margin: 0;
padding: 0;
color: #000;
}
IMG.titleImage {
margin-left: 300px;
}
ul, ol, dl {
padding: 0;
margin: 0;
}
h1, h2, h3, h4, h5, h6, p {
margin-top: 0;
padding-right: 15px;
padding-left: 15px;
word-wrap: break-word;
}
a img {
border: none;
}
a:link {
color: black;
}
a:visited {
color: #6E6C64;
}
a:hover, a:active, a:focus {
text-decoration: none;
}
.container {
width: 960px;
height:100%;
background-color: #FFF;
margin: 0 auto;
}
.header {
background-image:url(images/headerbg.png);
height:140px;
}
.content {
width:100%;
height:100%;
background-color: white;
}
.footer {
padding: 10px 0;
background-color: #F1F8E0;
}
.fltrt {
float: right;
margin-left: 8px;
}
.fltlft {
float: left;
margin-right: 8px;
}
.clearfloat {
clear:both;
height:0;
font-size: 1px;
line-height: 0px;
}
//Navigation Bar
.nav, .nav ul {
margin: 0;
padding: 0;
list-style: none;
line-height: 1;
}
.nav {
/* Layout & positioning */
position: relative;
margin: auto; /* Centering the menu */
height: 46px;
width: 960px;
text-align: center;
/* Background & effects */
box-shadow: 0 1px 2px rgba(0, 0, 0, .3);
background: #65c0bb;
background-image:url(images/navImage.png);
}
.nav>li {
margin: 0;
line-height: 1;
padding: 0;
display: inline;
position: relative;
margin: 0 12px;
}
.nav::after, .nav::before {
content: "";
display: block;
position: absolute;
top: 6px;
height: 0px;
width: 0px;
border: 23px solid #65c0bb;
z-index: -1;
}
/* The left ribbon */
.nav::before {
border-left-color: transparent;
left: -30px;
}
/* The right ribbon */
.nav::after {
border-right-color: transparent;
right: -30px;
}
.nav>li>a {
display: inline-block;
padding: 15px 20px;
position: relative;
font-family: 'Oswald', sans-serif;
font-size: 16px;
text-transform: uppercase;
text-decoration: none;
color: #fff;
-webkit-transition: color .3s linear;
-moz-transition: color .3s linear;
-o-transition: color .3s linear;
-ms-transition: color .3s linear;
transition: color .3s linear;
}
.nav>li>a:hover, .nav>li:hover>a {
color: #eae8a5;
}
.nav>li>a::after {
content: "";
height: 15px;
width: 15px;
position: absolute;
right: -20px;
top: 16px;
display: block;
}
.nav>li:last-child>a::after {
display: none;
}
.nav ul {
position: absolute;
left: -9999px;
padding-top: 10px;
border-bottom: 1px solid #ccc;
opacity: 0;
-webkit-transition: opacity .3s linear;
-moz-transition: opacity .3s linear;
-o-transition: opacity .3s linear;
-ms-transition: opacity .3s linear;
}
.nav>li:hover>ul {
left: 0;
opacity: 1;
top: 30px;
}
.nav ul li:hover>ul {
left: 150px;
opacity: 1;
top: -11px;
padding-left: 12px;
border-bottom: 0;
box-shadow: none;
}
.nav ul li {
display: block;
position: relative;
border-top: 1px solid #ccc;
border-left: 1px solid #ccc;
border-right: 1px solid #ccc;
width: 150px;
text-align: justify;
z-index: 9;
background: #eee;
box-shadow: 3px 4px 0 rgba(0, 0, 0, .1);
-webkit-transition: background .3s linear;
-moz-transition: background .3s linear;
-ms-transition: background .3s linear;
-o-transition: background .3s linear;
}
.nav ul li a {
font-family: "Oswald", sans-serif;
font-size: 14px;
text-decoration: none;
display: block;
padding: 7px 12px 7px 20px;
color: #65c0bb;
-webkit-transition: color .3s linear;
-moz-transition: color .3s linear;
-ms-transition: color .3s linear;
-o-transition: color .3s linear;
}
.nav ul li:hover>a, .nav ul li a:hover {
color: #4db6b0;
}
.nav ul li:hover {
background: #f7f7f7;
}
.nav ul ul li:last-child {
border-bottom: 1px solid #ccc;
}
.nav ul ul li {
box-shadow: 3px 3px 0 rgba(0, 0, 0, .1);
}
.nav ul::after, .nav ul::before {
content: "";
display: block;
z-index: 1;
position: absolute;
height: 9px;
width: 9px;
}
.nav>li>ul::after {
border: 1px solid #ccc;
background: #eee;
border-right: 0;
border-bottom: 0;
top: 5px;
left: 25px;
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
-o-transform: rotate(45deg);
-ms-transform: rotate(45deg);
}
.nav>li>ul::before {
height: 1px;
width: 12px;
background: #eee;
border-right: 0;
border-bottom: 0;
top: 10px;
left: 24px;
z-index: 99;
}
.nav ul ul::after {
border: 1px solid #ccc;
background: #eee;
border-right: 0;
border-bottom: 0;
top: 20px;
left: 8px;
position: absolute;
-webkit-transform: rotate(-45deg);
-moz-transform: rotate(-45deg);
-o-transform: rotate(-45deg);
-ms-transform: rotate(-45deg);
}
.nav ul ul::before {
height: 10px;
width: 1px;
background: #eee;
z-index: 99;
top: 20px;
left: 12px;
}
.titleImage2 {
margin-left: 250px;
}
.birthdayDream {
padding-right: 15px;
padding-left: 15px;
float: right;
}
p1 {
display: block;
margin-top: 30px;
padding-right: 15px;
padding-left: 15px;
}
form {
margin-left: auto;
margin-right: auto;s
display:inline-block;
width:600px;
}
input {
float:right;
margin-right: 50px;
clear:both;
}
input2 {
float:left;
}
.row {
margin-left: 200px;
}
.batmanImage {
margin-left: 180px;
}
.batmanshop {
height:auto;
margin: 0 auto;
}
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="style.css">
<title>Birthday Planner - Home</title>
</head>
<body>
<div class="container">
<div class="header">
</div>
<ul class="nav">
<li>
Home
</li>
<li>
Themes
<ul>
<li>Boys Party Theme</li>
<li>Girls Party Theme</li>
</ul>
</li>
<li>About</li>
<li>Contact</li>
<li>Login</li>
<li>Sign Up</li>
</ul>
<div class="content">
<br/>
<IMG class="batmanImage">
<img src="images/batmantitle.jpg" name="Title" width="600" height="206">
</IMG>
<p>All you need to do is select the desired theme and provide us the necessary details. We will do the rest. The items listed below are what will be provided when you order this theme. Don't need to worry about anything else. Just a click of a button and we will get our team to handle the rest for you.
</p>
<img class="batmanshop" src="http://placehold.it/890x2000&text=Batmanshop" name="Title" />
</div>
<div class="footer">
<div class="navigationbar">
<ul class="nav">
<li>
Home
</li>
<li>
About
</li>
<li>
Contact
</li>
<li>
Terms and Conditions
</li>
</ul>
</div>
</div>
</div>
</body>
</html>