I have a dropdown menu on the top of a page like so:
CSS:
div#navwrapper {
position: relative;
clear: both;
width: 100%;
height: 35px;
line-height: 35px;
letter-spacing: 1px;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
background: rgb(255,255,255); /* Old browsers */
background: -moz-linear-gradient(top, rgba(255,255,255,1) 0%, rgba(241,241,241,1) 50%, rgba(225,225,225,1) 51%, rgba(246,246,246,1) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,255,255,1)), color-stop(50%,rgba(241,241,241,1)), color-stop(51%,rgba(225,225,225,1)), color-stop(100%,rgba(246,246,246,1))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, rgba(255,255,255,1) 0%,rgba(241,241,241,1) 50%,rgba(225,225,225,1) 51%,rgba(246,246,246,1) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, rgba(255,255,255,1) 0%,rgba(241,241,241,1) 50%,rgba(225,225,225,1) 51%,rgba(246,246,246,1) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, rgba(255,255,255,1) 0%,rgba(241,241,241,1) 50%,rgba(225,225,225,1) 51%,rgba(246,246,246,1) 100%); /* IE10+ */
background: linear-gradient(to bottom, rgba(255,255,255,1) 0%,rgba(241,241,241,1) 50%,rgba(225,225,225,1) 51%,rgba(246,246,246,1) 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#f6f6f6',GradientType=0 ); /* IE6-9 */
}
div#coachnavigation {
width: 990px;
margin: 0 auto;
font-weight: bold;
}
#coachnavigation .firstli {
background-image: url('../coach/images/logo_tsa.png');
background-repeat: no-repeat;
text-align: right !important;
padding-left: 35px;
}
#coachnavigation .down {
background-image: url('../images/button_down.png');
background-repeat: no-repeat;
background-position: 95% 50%;
padding-right: 26px;
}
div#searchbar {
clear: both;
float: left;
width: 975px;
height: 28px;
line-height: 28px;
background-color: #164a98;
padding-left: 15px;
color: #fff;
}
#searchbar a {
color: #fff;
}
#box
{
line-height: 32px;
}
#box .field
{
background: -webkit-gradient(
linear,
left bottom,
left top,
color-stop(0%, #FEFFFE),
color-stop(100%, #BDBDBD)
);
height: 20px;
margin: 0px;
-webkit-border-radius: 25px;
}
#box .field input[type=text]
{
padding: 2px 2px 2px 25px;
border: 0;
-webkit-border-top-left-radius: 25px;
-webkit-border-bottom-left-radius: 25px;
margin: 0;
outline: 0;
width: 144px;
height: 20px;
float: left;
background: url('images/magnifier.png') 7px 5px no-repeat;
border: 1px solid #333333;
color: #333333;
}
#box .field input[type=submit]
{
float: left;
background: -webkit-gradient(
linear,
left bottom,
left top,
color-stop(100%, #C6C6C6),
color-stop(0%, #8F8F8F)
);
border: 1px solid #606060;
width: 60px;
height: 26px;
padding: 2px 0 2px 0;
-webkit-border-top-right-radius: 25px;
-webkit-border-bottom-right-radius: 25px;
margin: 0 0 0 -1px;
opacity: 0.9;
cursor: pointer;
text-shadow: 1px 1px 0 #DBDBDB;
}
.coachnavmenu>li>ul>li>ul>li { width: 400px; }
.coachnavmenu,
.coachnavmenu ul,
.coachnavmenu li
{
padding: 0px;
margin: 0px;
z-index: 2;
text-align: right;
}
.coachnavmenu > li
{
float: left;
}
.coachnavmenu li
{
list-style-type: none;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
line-height: 30px;
letter-spacing: 0px;
color: #333333;
border-right: 1px inset #f6f6f6;
padding: 5px 12px 0px 12px;
}
.coachnavmenu > li li
{
list-style-type: none;
text-align: left;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
border: 1px solid #f6f6f6;
color: #333333;
background-color: #f6f6f6;
padding: 0 20px 0 4px;
}
.coachnavmenu ul
{
display: none;
position: absolute;
margin-left: -15px;
margin-top: -1px;
}
.coachnavmenu li:hover > ul
{
display: block;
}
.coachnavmenu ul.parent_hover
{
display: block;
}
.coachnavmenu a
{
color: #333333;
line-height: 100%;
width: 100%;
text-decoration: none;
}
.coachnavmenu li.greenhover:hover
{
color: #333333;
background-color: #7dc242;
}
.coachnavmenu li.hover,
.coachnavmenu a:hover
{
color: #333333;
background-color: #7dc242;
text-decoration: underline;
}
.coachnavmenu ul ul
{
margin-top: -30px;
left: 99%;
}
.coachnavmenu span
{
display: block;
}
.coachnavmenu
{
float: left;
width: 100%;
color: #000;
}
.endmenu
{
clear: left;
}
Live html can be found here, but I think the problem is the CSS.
http://www.buffalolacrosse.com/test.cfm
I am having issues getting this menu to display correctly. It works in chrome or firefox, just not in IE. The menus are collapsed (the li padding doesnt work) and the alignment is all out of whack on vertical alignment. Your help is appreciated.
I think you need to specify the line height of the a elements in your menu.
I tried by setting the
#coachnavigation a
{
line-height:30px;
}
and it appears fine to me.
also add z-index to your menu, so the dropdown wont appear behind some elements.
div#navwrapper {
z-index:999;
}
Related
I'm trying to style the jquery UI date picker.
Everything works fine with one exception.
I need to make everything centered but I can't seem to achieve that.
Here what i have so far:
$('#calendar').datepicker({
inline: true,
firstDay: 1,
showOtherMonths: true,
dayNamesMin: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']
});
.ui-datepicker,
.ui-datepicker table,
.ui-datepicker tr,
.ui-datepicker td,
.ui-datepicker th {
margin: 0;
padding: 0;
border: none;
border-spacing: 0;
}
.ui-datepicker {
display: none;
width: 100%;
padding: 35px;
cursor: default;
text-transform: uppercase;
font-family: Tahoma;
font-size: 24px;
background: #fff;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
border:solid 1px #e91e62;
}
.ui-datepicker-header {
position: relative;
padding-bottom: 10px;
border-bottom: 1px solid #d6d6d6;
}
.ui-datepicker-title { text-align: center; }
.ui-datepicker-month {
position: relative;
padding-right: 15px;
color: #e91e62;
}
.ui-datepicker-year {
padding-left: 8px;
color: #e91e62;
}
.ui-datepicker-month:before {
display: block;
position: absolute;
top: 5px;
right: 0;
width: 5px;
height: 5px;
content: '';
background: #a5cd4e;
background: -moz-linear-gradient(top, #a5cd4e 0%, #6b8f1a 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#a5cd4e), color-stop(100%,#6b8f1a));
background: -webkit-linear-gradient(top, #a5cd4e 0%,#6b8f1a 100%);
background: -o-linear-gradient(top, #a5cd4e 0%,#6b8f1a 100%);
background: -ms-linear-gradient(top, #a5cd4e 0%,#6b8f1a 100%);
background: linear-gradient(top, #a5cd4e 0%,#6b8f1a 100%);
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}
.ui-datepicker-prev,
.ui-datepicker-next {
position: absolute;
top: -2px;
padding: 5px;
cursor: pointer;
}
.ui-datepicker-prev {
left: 0;
padding-left: 0;
}
.ui-datepicker-next {
right: 0;
padding-right: 0;
}
.ui-datepicker-prev span,
.ui-datepicker-next span{
display: block;
width: 5px;
height: 10px;
text-indent: -9999px;
background-image: url(../img/arrows.png);
}
.ui-datepicker-prev span { background-position: 0px 0px; }
.ui-datepicker-next span { background-position: -5px 0px; }
.ui-datepicker-prev-hover span { background-position: 0px -10px; }
.ui-datepicker-next-hover span { background-position: -5px -10px; }
.ui-datepicker-calendar th {
padding-top: 15px;
padding-bottom: 10px;
text-align: center;
font-weight: normal;
color: #a8a8a8;
width:100%;
}
.ui-datepicker-calendar td {
padding: 0 7px;
text-align: center;
line-height: 26px;
}
.ui-datepicker-calendar .ui-state-default {
display: block;
width: 26px;
outline: none;
text-decoration: none;
color: #000;
border: 1px solid transparent;
}
.ui-datepicker-calendar .ui-state-active {
color: #e91e62;
border: 1px solid #e91e62;
}
.ui-datepicker-other-month .ui-state-default { color: #ccc; }
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<div id="calendar">
</div>
If you look at the example above, you will see a gap which is not wanted and the content of the calendar is not really centered!
Could someone please advice on this issue?
Here is a fiddle as well if needed: https://jsfiddle.net/u7cocxdy/2/
any help would be appreciated.
You had a width:100% in there (.ui-datepicker-calendar th), which i deleted. This got rid of the gap. I then used margin: 0 auto to center the table.
$('#calendar').datepicker({
inline: true,
firstDay: 1,
showOtherMonths: true,
dayNamesMin: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']
});
.ui-datepicker,
.ui-datepicker table,
.ui-datepicker tr,
.ui-datepicker td,
.ui-datepicker th {
margin: 0;
padding: 0;
border: none;
border-spacing: 0;
}
.ui-datepicker {
display: none;
width: 100%;
padding: 35px;
cursor: default;
text-transform: uppercase;
font-family: Tahoma;
font-size: 24px;
background: #fff;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
border: solid 1px #e91e62;
}
.ui-datepicker-header {
position: relative;
padding-bottom: 10px;
border-bottom: 1px solid #d6d6d6;
}
.ui-datepicker-title {
text-align: center;
}
.ui-datepicker-month {
position: relative;
padding-right: 15px;
color: #e91e62;
}
.ui-datepicker-year {
padding-left: 8px;
color: #e91e62;
}
.ui-datepicker-month:before {
display: block;
position: absolute;
top: 5px;
right: 0;
width: 5px;
height: 5px;
content: '';
background: #a5cd4e;
background: -moz-linear-gradient(top, #a5cd4e 0%, #6b8f1a 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #a5cd4e), color-stop(100%, #6b8f1a));
background: -webkit-linear-gradient(top, #a5cd4e 0%, #6b8f1a 100%);
background: -o-linear-gradient(top, #a5cd4e 0%, #6b8f1a 100%);
background: -ms-linear-gradient(top, #a5cd4e 0%, #6b8f1a 100%);
background: linear-gradient(top, #a5cd4e 0%, #6b8f1a 100%);
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}
.ui-datepicker-prev,
.ui-datepicker-next {
position: absolute;
top: -2px;
padding: 5px;
cursor: pointer;
}
.ui-datepicker-prev {
left: 0;
padding-left: 0;
}
.ui-datepicker-next {
right: 0;
padding-right: 0;
}
.ui-datepicker-prev span,
.ui-datepicker-next span {
display: block;
width: 5px;
height: 10px;
text-indent: -9999px;
background-image: url(../img/arrows.png);
}
.ui-datepicker-prev span {
background-position: 0px 0px;
}
.ui-datepicker-next span {
background-position: -5px 0px;
}
.ui-datepicker-prev-hover span {
background-position: 0px -10px;
}
.ui-datepicker-next-hover span {
background-position: -5px -10px;
}
.ui-datepicker-calendar th {
padding-top: 15px;
padding-bottom: 10px;
text-align: center;
font-weight: normal;
color: #a8a8a8;
}
.ui-datepicker-calendar td {
padding: 0 7px;
text-align: center;
line-height: 26px;
}
.ui-datepicker-calendar .ui-state-default {
display: block;
width: 26px;
outline: none;
text-decoration: none;
color: #000;
border: 1px solid transparent;
}
.ui-datepicker-calendar .ui-state-active {
color: #e91e62;
border: 1px solid #e91e62;
}
.ui-datepicker-other-month .ui-state-default {
color: #ccc;
}
.ui-datepicker table {
margin: 0 auto;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<div id="calendar">
</div>
I am wanting to align a image div inside of another div. Pretty much have the image sit in the middle with white space above and below.
Here is my code: http://jsfiddle.net/f098xnrk/
<h1><img src="http://i.imgur.com/akaZnwC.png"></h1>
<div id="content">
<div class="Division">
<div class="picture">
<img src="http://i.imgur.com/LXbVyBU.jpg">
</div>
<div class="info">
<h3>brand new bbs wheels</h3>
<h4>brand new pair for sale, comes with no tires or...</h4>
<div class="alignleft">
<div class="price">$1200</div>
</div>
<div class="alignright"><a class="btn" href="part_listing.php?id=39">More Info</a></div>
<div style="clear: both;"></div>
</div>
</div>
</div>
and
.Division {
background: none repeat scroll 0 0 white;
border: 1px solid #ddd;
border-radius: 4px;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055);
display: inline-block;
margin: 5px;
padding: 4px;
width: 280px;
}
.picture {
height: 280px;
width: 280px;
}
.picture img {
width:280px;
}
h1 {
padding-left: 10px;
}
.alignleft {
float: left;
margin: 0;
}
.alignright {
float: right;
margin: 0;
}
.info h3 {
font-size: 20px;
margin: 9px 0;
padding: 0;
}
.info h4 {
font-size: 11px;
margin: 5px 0;
padding: 0;
}
body {
margin: 0 auto;
width: 1245px;
background: none repeat scroll 0 0 #ecf0f1;
font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
font-size: 14px;
}
#content {
margin:0px auto;
text-align: center;
padding:15px;
background:none repeat scroll 0 0 #fff
}
.info {
text-align: left;
}
.btn {
background: #3498db;
background-image: -webkit-linear-gradient(top, #3498db, #2980b9);
background-image: -moz-linear-gradient(top, #3498db, #2980b9);
background-image: -ms-linear-gradient(top, #3498db, #2980b9);
background-image: -o-linear-gradient(top, #3498db, #2980b9);
background-image: linear-gradient(to bottom, #3498db, #2980b9);
-webkit-border-radius: 5;
-moz-border-radius: 5;
border-radius: 5px;
font-family: Arial;
color: #ffffff;
font-size: 14px;
padding: 10px 20px 10px 20px;
text-decoration: none;
display: inline-block;
width:75px;
text-align:center;
}
.btn:hover {
background: #3cb0fd;
background-image: -webkit-linear-gradient(top, #3cb0fd, #3498db);
background-image: -moz-linear-gradient(top, #3cb0fd, #3498db);
background-image: -ms-linear-gradient(top, #3cb0fd, #3498db);
background-image: -o-linear-gradient(top, #3cb0fd, #3498db);
background-image: linear-gradient(to bottom, #3cb0fd, #3498db);
text-decoration: none;
}
.price {
border: 1px solid #3498db;
-webkit-border-radius: 5;
-moz-border-radius: 5;
border-radius: 5px;
font-family: Arial;
font-size: 14px;
padding: 9px 20px;
text-decoration: none;
display: inline-block;
width:75px;
text-align:center;
}
Thank you for the upcoming help.
Use vertical-align:middle
.Division {
background: none repeat scroll 0 0 white;
border: 1px solid #ddd;
border-radius: 4px;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055);
display: inline-block;
margin: 5px;
padding: 4px;
width: 280px;
}
.picture {
height: 280px;
width: 280px;
display:table-cell; /*.. vertical-align property can be apply for table-cell ...*/
vertical-align:middle; /*... to set image vertically center ...*/
}
.picture img {
width: 280px;
}
h1 {
padding-left: 10px;
}
.alignleft {
float: left;
margin: 0;
}
.alignright {
float: right;
margin: 0;
}
.info h3 {
font-size: 20px;
margin: 9px 0;
padding: 0;
}
.info h4 {
font-size: 11px;
margin: 5px 0;
padding: 0;
}
body {
margin: 0 auto;
width: 1245px;
background: none repeat scroll 0 0 #ecf0f1;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 14px;
}
#content {
margin: 0px auto;
text-align: center;
padding: 15px;
background: none repeat scroll 0 0 #fff
}
.info {
text-align: left;
}
.btn {
background: #3498db;
background-image: -webkit-linear-gradient(top, #3498db, #2980b9);
background-image: -moz-linear-gradient(top, #3498db, #2980b9);
background-image: -ms-linear-gradient(top, #3498db, #2980b9);
background-image: -o-linear-gradient(top, #3498db, #2980b9);
background-image: linear-gradient(to bottom, #3498db, #2980b9);
-webkit-border-radius: 5;
-moz-border-radius: 5;
border-radius: 5px;
font-family: Arial;
color: #ffffff;
font-size: 14px;
padding: 10px 20px 10px 20px;
text-decoration: none;
display: inline-block;
width: 75px;
text-align: center;
}
.btn:hover {
background: #3cb0fd;
background-image: -webkit-linear-gradient(top, #3cb0fd, #3498db);
background-image: -moz-linear-gradient(top, #3cb0fd, #3498db);
background-image: -ms-linear-gradient(top, #3cb0fd, #3498db);
background-image: -o-linear-gradient(top, #3cb0fd, #3498db);
background-image: linear-gradient(to bottom, #3cb0fd, #3498db);
text-decoration: none;
}
.price {
border: 1px solid #3498db;
-webkit-border-radius: 5;
-moz-border-radius: 5;
border-radius: 5px;
font-family: Arial;
font-size: 14px;
padding: 9px 20px;
text-decoration: none;
display: inline-block;
width: 75px;
text-align: center;
}
<body>
<h1><img src="http://i.imgur.com/akaZnwC.png"></h1>
<div id="content">
<div class="Division">
<div class="picture">
<img src="http://i.imgur.com/LXbVyBU.jpg">
</div>
<div class="info">
<h3>brand new bbs wheels</h3>
<h4>brand new pair for sale, comes with no tires or...</h4>
<div class="alignleft">
<div class="price">$1200</div>
</div>
<div class="alignright"><a class="btn" href="part_listing.php?id=39">More Info</a>
</div>
<div style="clear: both;"></div>
</div>
</div>
</div>
I am using "lightview" to show images in my website, the problem is that the image to much low, so I can see less than 50% of the photo
I that when I set Height to object in css, the image is lower
Here is my CSS code:
/****HTML Tags****/
body {
margin: 0;
padding: 0;
text-align: right;
direction: rtl;
font-family: Arial, Arial Hebrew, Helvetica, sans-serif;
}
::selection {
background: #BFBFBF;
}
header {
background-image: url('../g.png');
position: relative;
width: 100%;
background-repeat: no-repeat;
}
h1 {
font-family: Tahoma, Geneva, sans-serif;
text-decoration: underline;
color: #3852A4;
padding-bottom: 20px;
font-size: x-large;
}
/****General****/
.content {
width: 900px;
position: relative;
padding: 0px;
margin: 0 auto;
}
.main {
padding-right: 15px;
/* IE9 SVG, needs conditional override of 'filter' to 'none' */
background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2U1ZTVlNSIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNmZmZmZmYiIHN0b3Atb3BhY2l0eT0iMCIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+);
background: -moz-linear-gradient(top, rgba(229,229,229,1) 0%, rgba(255,255,255,0) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(229,229,229,1)), color-stop(100%,rgba(255,255,255,0))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, rgba(229,229,229,1) 0%,rgba(255,255,255,0) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, rgba(229,229,229,1) 0%,rgba(255,255,255,0) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, rgba(229,229,229,1) 0%,rgba(255,255,255,0) 100%); /* IE10+ */
background: linear-gradient(to bottom, rgba(229,229,229,1) 0%,rgba(255,255,255,0) 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#e5e5e5', endColorstr='#00ffffff',GradientType=0 ); /* IE6-8 */
background-size: Auto 200px;
background-repeat: repeat-x;
}
.details {
padding-bottom: 15px;
}
.details div {
margin-top: 10px;
}
#author {
font-weight: bold;
font-size: 16px;
}
#date {
font-size: 14px;
font-weight: bold;
}
/**Track Properties***/
#area {
font-size: 14px;
}
.track {
position: relative;
padding: 0px;
margin: 0 auto;
width: 980px;
width: 100%;
}
.trackdetails {
position: relative;
top: -51px;
line-height: 25px;
border-right: 2px solid #9e9e9e;
padding-right: 25px;
padding-bottom: 15px;
font-size: 14px;
margin: 0;
left: 50px;
width: 250px;
float: left;
}
.title {
color: #3852A4;
font-size: large;
text-decoration: underline;
font-family: Tahoma, Geneva, sans-serif;
margin-bottom: 20px;
}
.trackdetails #content {
z-index: 1111;
}
#map-image {
display: inline-block;
padding-top:-50px;
}
#trackdescription {
text-align: justify;
max-width: 650px;
width: 500px;
float: right;
padding-bottom:100px;
}
How can I fix this?
Qish for help.. thanks!
Here is live example: http://lawb.co.il/test.html
Try top: 10% !important; or margin-top: -n; n = image box height / 2 :P n isn't a css property :)
For some reason the Menu div is floating too high when the menu is up but when it closes it's perfect. I'm not really sure what to do to bring that Menu div down to touch the right side div under it
footer {
width: 100%;
position: absolute;
bottom: 0;
left: 0;
}
#footer-content {
display: none;
}
#footer-left {
width: 20%;
height: 145px;
float: left;
background-color: #52291c;/*#805f4c;*/
opacity: 0.8;
} #footer-left h3 {
width: 95%;
font-size: 20px;
font-weight: lighter;
margin-top: 95px;
opacity: 1;
text-align: right;
} #footer-left h3 a {
color: #fff;
text-shadow: 1px 1px #000;
text-transform: lowercase;
}
#footer-right {
width: 80%;
height: 145px;
float: right;
background-color: #B29F63; /*#B29F63*/
opacity: 0.3;
} #footer-right ul {
margin: 30px 15px;
font-size: 24px;
} #footer-right ul li a {
color: #52291c;
}
.doing-tricks {
width: 150px;
position: relative;
left: 21%;
top: 132px;
font-size: 24px;
z-index: 100;
} .doing-tricks a {
color: #52291c;
}
.toggle-footer {
width: 100px;
margin: 0px auto;
padding: 10px;
cursor: pointer;
color: #52291c;
text-align: center;
text-shadow: 1px 1px #fff;
background: #B29F63;
background: -moz-linear-gradient(top, rgba(254,255,255,1) 0%, rgba(178,159,99,1) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(254,255,255,1)), color-stop(100%,rgba(178,159,99,1))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, rgba(254,255,255,1) 0%,rgba(178,159,99,1) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, rgba(254,255,255,1) 0%,rgba(178,159,99,1) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, rgba(254,255,255,1) 0%,rgba(178,159,99,1) 100%); /* IE10+ */
background: linear-gradient(to bottom, rgba(254,255,255,1) 0%,rgba(178,159,99,1) 100%); /* W3C */
opacity: 0.8;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
}
jFiddle: http://jsfiddle.net/rFdwr/1/
Make the .doing-tricks's position absoluteinstead of relative
.doing-tricks {
...
position: absolute;
...
}
Then you'll need to adjust the top positions of your texts inside the footer.
Hello,
Can someone help me, how can i stretch the background of the menu (to be full width, from left to right)?
I'm a beginner.
Thanks.
#menu, #menu ul {
margin: 0;
padding: 0;
list-style: none;
}
#menu {
width:100%;
margin: 0px;
background-color: #3d56ac;
background-image: linear-gradient(#444, #111);
}
#menu:before,
#menu:after {
content: "";
display: table;
}
#menu:after {
clear: both;
}
#menu {
zoom:1;
}
#menu li {
float: left;
border-right: 1px solid #222;
box-shadow: 1px 0 0 #444;
position: relative;
}
#menu a {
float: left;
padding: 12px 30px;
color: #FFF;
text-transform: uppercase;
font: bold 12px Arial, Helvetica;
text-decoration: none;
text-shadow: 0 1px 0 #111;
}
#menu li:hover > a {
color: #fafafa;
}
*html #menu li a:hover { /* IE6 only */
color: #fafafa;
}
#menu ul {
margin: 20px 0 0 0;
_margin: 0; /*IE6 only*/
opacity: 0;
visibility: hidden;
position: absolute;
top: 38px;
left: 0;
z-index: 1;
background: #444;
background: linear-gradient(#444, #111);
box-shadow: 0 -1px 0 rgba(255,255,255,.3);
border-radius: 3px;
transition: all .2s ease-in-out;
}
#menu li:hover > ul {
opacity: 1;
visibility: visible;
margin: 0;
}
#menu ul ul {
top: 0;
left: 150px;
margin: 0 0 0 20px;
_margin: 0; /*IE6 only*/
box-shadow: -1px 0 0 rgba(255,255,255,.3);
}
#menu ul li {
float: none;
display: block;
border: 0;
_line-height: 0; /*IE6 only*/
box-shadow: 0 1px 0 #111, 0 2px 0 #666;
}
#menu ul li:last-child {
box-shadow: none;
}
#menu ul a {
padding: 10px;
width: 130px;
_height: 10px; /*IE6 only*/
display: block;
white-space: nowrap;
float: none;
text-transform: none;
}
#menu ul a:hover {
background-color: #0186ba;
background-image: linear-gradient(#04acec, #0186ba);
}
#menu ul li:first-child > a {
border-radius: 3px 3px 0 0;
}
#menu ul li:first-child > a:after {
content: '';
position: absolute;
left: 40px;
top: -6px;
border-left: 6px solid transparent;
border-right: 6px solid transparent;
border-bottom: 6px solid #444;
}
#menu ul ul li:first-child a:after {
left: -6px;
top: 50%;
margin-top: -6px;
border-left: 0;
border-bottom: 6px solid transparent;
border-top: 6px solid transparent;
border-right: 6px solid #3b3b3b;
}
#menu ul li:first-child a:hover:after {
border-bottom-color: #04acec;
}
#menu ul ul li:first-child a:hover:after {
border-right-color: #0299d3;
border-bottom-color: transparent;
}
#menu ul li:last-child > a {
border-radius: 0 0 3px 3px;
}
This should work:
#menu {
background-size: 100%;
}
You need to fix the width of the image... if your want to Stretch the background image...
**CSS**
background-image: url("menu.png");
background-size: 875px 125px;
background-repeat: no-repeat;
Hope this will helps you...
or you can try...
/css
body{margin: 0 auto;}
.menu100percent {
background: #3584b4; /* Old browsers */
background: -moz-linear-gradient(top, #3584b4 0%, #25567f 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#3584b4), color-stop(100%,#25567f)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #3584b4 0%,#25567f 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #3584b4 0%,#25567f 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #3584b4 0%,#25567f 100%); /* IE10+ */
background: linear-gradient(to bottom, #3584b4 0%,#25567f 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#3584b4', endColorstr='#25567f',GradientType=0 ); /* IE6-9 */
color: white;
font-size: 16px;
height: 37px;
width:100%;
}
.menu{width:1000px; margin: 0 auto; }
.menu a{color:#fff; font-size:12px; line-height:37px; font-family:Arial; text-decoration:none;}
/html
<div class="menu100percent">
<div class="menu">
Shop
</div>
</div>
DEMO HERE