Resizing menu's and text - html

I hired a guy to do my website a long time ago, and it never really got properly optimized for resizing windows. I've tried to get him to fix it but nothing has happened the last 5 months (he says he's too busy at the moment). I know the basics of coding on a website so i figured it wouldn't hurt to ask here, since i know you're an awesome community that likes to help each other. The site in question is http://dronebutikken.dk/
Basically there's 2 things right now that's really annoying. The search bar centers itself below the logo, and the shopping cart jumps to a second line when resizing to about half. What i want is for the search bar and shopping cart to stay in the right side in the same line. I realize that the menubar will be too wide then, so is it possible to resize the text when you resize the window? If so how?
Below is the style.css, the one that's actually on the website is minified, and i changed a few things here and there, but i don't recall changing anything in the menu or search bar/logo, so it should be the same, the only thing i changed is the font (changed it to Open Sans). I attached it below so you can ctrl/cmd+f for the relevant code.
I tried to do it myself a couple of times but i haven't managed to do it successfully yet, and it might scare some customers away that the webpage is constantly changing.
Style.css
/*
PALETTE:
navy basic : #434a54;
navy light : #565c65;
navy dark : #363b43;
grey basic : #dbe3e8;
grey light : #edf0f2;edf0f2
grey dark : #a7b7c1;
red basic : #e22a40;
red light : #f14a5e;
red dark : #d5041d;
green basic : #2ecc71;
green light : #6ddb9c;
green dark : #29b765;
*/
/* BASIC */
html {
position: relative;
min-height: 100%;
overflow-x: hidden;
}
/* TYPOGRAPHY */
body {
font-family: 'Open Sans', Arial, Helvetica, sans-serif;
font-size: 16px;
font-weight: 400;
margin-bottom: 200px;
color: #000000;
}
#media(max-width:767px){
body {
margin-bottom: 370px;
margin-top: 55px;
}
body.no-menu {
margin-top: 0;
}
}
#top-nav, body > footer {
font-size: 0.85em;
}
h1 {
font-size: 35px;
}
h2 {
font-size: 24px;
}
h3 {
font-size: 22px;
}
h4 {
font-size: 20px;
}
h5 {
font-size: 18px;
}
/* HEADER */
#top-nav {
min-height: 40px;
}
#top-nav li > a {
padding-top: 10px;
padding-bottom: 10px;
}
#top-nav .navbar-text {
margin-bottom: 10px;
margin-top: 10px;
}
.form-search {
margin-top: 40px;
}
.form-search input {
padding: 10px 20px;
border: 0;
}
.form-search .search-wrap {
border: 3px solid #edf0f2;
border-radius: 2px;
}
.form-search > .input-append {
padding: 0;
}
.search-button {
padding: 2px 15px;
margin-top: -4px;
border-radius: 0 2px 2px 0;
margin-left: 0px;
background: #fff;
}
.search-button:hover {
background: #fff;
}
.search-button i {
font-size: 25px;
color: #dbe3e8;
}
.search-button:hover i {
font-size: 25px;
color: #a7b7c1;
}
#main-nav {
margin-top: 20px;
margin-bottom: 0;
border-radius: 2px;
border: none;
}
#main-nav .home > a {
padding-top: 15px;
padding-bottom: 0;
}
#main-nav .home > a > i {
font-size: 30px;
}
.navbar-nav.navbar-right:last-child {
margin-right: 0;
}
.nav-cart li > a {
font-weight: 300;
}
.nav-cart i {
font-size: 30px;
position: relative;
float: right;
}
.mega-dropdown i {
position: relative;
top: 1px;
font-weight: bold;
}
.mega-dropdown {
position: static !important;
}
.mega-dropdown-menu {
padding: 20px 0px;
width: 100%;
box-shadow: none;
-webkit-box-shadow: none;
border-radius: 2px;
background: #edf0f2;
}
.mega-dropdown-menu:before, .nav-cart-menu:before {
position: absolute;
top: -7px;
display: inline-block;
border-right: 7px solid transparent;
border-bottom: 7px solid #ccc;
border-left: 7px solid transparent;
border-bottom-color: rgba(0, 0, 0, 0.2);
content: '';
}
.mega-dropdown-menu:after, .nav-cart-menu:after {
position: absolute;
top: -6px;
display: inline-block;
border-right: 6px solid transparent;
border-bottom: 6px solid #ffffff;
border-left: 6px solid transparent;
content: '';
}
.mega-dropdown-menu:before {
left: 159px;
}
.mega-dropdown-menu:after {
left: 160px;
}
.nav-cart-menu:before {
right: 23px;
}
.nav-cart-menu:after {
right: 24px;
}
.mega-dropdown-menu div, .mega-dropdown-menu div > li {
margin: 0;
padding: 0;
}
.mega-dropdown-menu div > li {
padding: 0;
}
.mega-dropdown-menu div > li > ul, .nav-cart-menu li > ul {
padding: 0 10px;
}
.mega-dropdown-menu div > li:first-child, .mega-dropdown-menu div > li:last-child {
padding-left: 0;
}
.mega-dropdown-menu div > li:nth-child(2) > ul {
border-right: 1px solid #dfdfdf;
border-left: 1px solid #dfdfdf;
}
.mega-dropdown-menu div > li:last-child > ul {
padding-top: 15px;
border-top: 1px solid #dfdfdf;
}
#preview {
border-left: 1px solid #dfdfdf;
padding: 0 10px;
margin: 0;
}
#preview h3 {
font-size: 16px;
font-weight: bold;
}
#media (min-width: #screen-md-min) {
#preview {
display: none;
}
}
.mega-dropdown-menu div > li > ul > li, .nav-cart-menu li > ul > li {
list-style: none;
}
.mega-dropdown-menu div > li > ul > li > a, .nav-cart-menu li > ul > li > a {
display: block;
padding: 3px 0;
clear: both;
font-size: 16px;
font-weight: normal;
line-height: 1.428571429;
color: #565c65;
white-space: normal;
}
.mega-dropdown-menu div > li ul > li > a:hover, .mega-dropdown-menu div > li ul > li > a:focus {
text-decoration: none;
color: #444;
background-color: #f5f5f5;
}
.mega-dropdown-menu .dropdown-header, .nav-cart-menu .dropdown-header, .xs-search-widget-menu .dropdown-header {
color: #565c65;
font-size: 18px;
font-weight: bold;
padding: 0;
}
.mega-dropdown-menu form {
margin: 3px 20px;
}
.mega-dropdown-menu .form-group {
margin-bottom: 3px;
}
.nav-cart {
position: static !important;
}
.nav-cart-menu {
padding: 20px 0px;
width: 50%;
box-shadow: none;
-webkit-box-shadow: none;
border-radius: 2px;
background: #fafafa;
}
#media(max-width:767px){
body {margin-top: 70px;}
.brand {clear: both;}
.brand a {
text-align: center;
display: block;
margin-bottom: 10px;
}
#main-nav {
position: absolute;
width: 100%;
top: 0;
margin: 0;
left: 0;
z-index: 9999;
border-radius: 0;
}
#main-nav .navbar-nav {
margin-top: 0;
margin-bottom: 0;
}
.xs-cart-widget {
display: inline-block !important;
text-align: right;
float: right;
}
.home, .mega-dropdown, li.contact {
float: left;
}
#main-nav > .navbar-left {
padding: 0;
margin: 0
}
#main-nav > .navbar-left > li, li.contact {
display: inline-block;
}
#main-nav > .navbar-left > li.home, li.contact; {
height: 51px;
}
#main-nav > .navbar-left > li > a {
line-height: 51px;
height: 51px;
padding: 0 15px;
}
.navbar-nav .open .dropdown-menu {
position: static;
overflow: visible;
position: absolute !important;
background: #edf0f2;
width: 100%;
}
#main-nav > .navbar-left > li > a > i {
font-weight: 400;
}
.navbar-nav .open .dropdown-menu > li > a,
.navbar-nav .open .dropdown-menu .dropdown-header {
padding-left: 7px;
}
.mega-dropdown-menu div > li > ul > li > a,
.nav-cart-menu li > ul > li > a {
padding: 5px 7px;
}
.xs-search-widget div > li:last-child > ul {
border: none;
}
.xs-search-widget .dropdown-header {
text-align: center
}
.xs-search {
padding-top: 0;
}
.xs-search > a ,
li.contact > a,
.mega-dropdown > a {
font-size: 30px;
}
.xs-search > a > i ,
li.contact > a > i,
.mega-dropdown > a > i {
font-weight: 400;
}
.xs-search form {
margin: 0;
}
}
/* FEATURED */
#featured {
/*background:#434a54;*/
color:#fff;
min-height:340px;
border-radius:2px;
}
#featured .item {
display:block;
cursor:default;
/*background:#434a54;*/
padding:20px 0px;
min-height:340px;
margin:0;
color:#FFF;
-webkit-border-radius:2px;
-moz-border-radius:2px;
border-radius:2px;
text-align:center;
-webkit-tap-highlight-color:rgba(255, 255, 255, 0);
}
#featured .featured-text {
position:absolute;
margin-top:-150px;
right:20px;
margin-right: 20px;
float:right !important;
text-align: right;
}
.dark-text {
color:#434a54;
}
#media(max-width:767px) {
#featured .item {
min-height:150px;
}
#featured .item > div {
padding-left:0;
padding-right:0;
}
#featured {
border-radius:0;
margin-bottom: 10px;
min-height:150px;
}
#featured .featured-text {
color:#434a54;
position:relative;
margin-top:10px;
margin-right: 0;
float:none !important;
text-align: center !important;
right:auto;
}
.featured-row {
margin-bottom: 40px;
}
}
/* CONTENT */
.section-header h2, .category-header h2, .search-header h2, .page-header h2, .section-header h3 {
text-transform:uppercase;
font-weight:300;
margin-top:10px;
}
.section-header, .category-header, .search-header h2, .page-header h2 {
margin:40px 0;
}
.section-header h3 {
margin:0;
}
.section-header > div > a {
margin-top:10px;
color:#565c65;
font-weight:300
}
.section-header > div > a:hover {
text-decoration:none;
}
.section-header > div > a.btn-default {
color:#fff;
}
.product-grid, .product-images {
margin-top:20px;
margin-bottom:20px;
}
.product-grid .product, .product-images .product-image, #also .product {
border:3px solid #edf0f2;
border-radius:2px;
padding:2px 0 10px;
margin-bottom:20px;
}
.product-grid .product .title, #also .product .title {
font-size:16px;
}
.product-grid .product .price, #also .product .price {
font-size:20px;
font-weight:800;
}
.product-grid .product .price small {
font-weight:400;
}
.product-grid .product .special, .product-images .special, #also .product .special {
color:#fff;
padding:8px 20px;
font-size:14px;
position:absolute;
margin:10px;
}
.product-grid .product .special-new, .product-images .special-new, #also .product .special-new {
background:#565c65;
border-left:3px solid #363b43;
left:5px;
border-radius:0 2px 2px 0;
}
.product-grid .product .special-offer, .product-images .special-offer, #also .product .special-offer {
background:#f14a5e;
border-right:3px solid #d5041d;
right:5px;
border-radius:2px 0 0 2px;
}
.product-grid .product > p:last-child {
margin-bottom:0;
}
#breadcrumbs .breadcrumb {
font-size:14px;
border-radius:2px;
margin-top:10px;
background-color:#fff;
padding:0;
}
#breadcrumbs .breadcrumb .active a {
pointer-events:none;
cursor:default;
color:#777;
}
#single-product .product-image {
padding-bottom:2px;
}
#single-product #secondary-images {
margin:3px 0;
}
#single-product #secondary-images .thumbnail {
border:none;
padding:0;
margin-right:3px;
display:inline-block;
height:75px;
width:75px;
line-height: 75px;
}
.video-thumbnail > img {margin-top:10px; display:block; vertical-align: middle; line-height: 75px;}
.video-thumbnail .play {position: absolute; height:75px; width:75px; top:0; display: block; float:left;}
.video-thumbnail .play > img {opacity: 0.7;}
.video-thumbnail .play > img:hover {opacity: 1;}
#single-product #price-container {
background:#edf0f2;
padding:15px;
margin-top:20px;
margin-bottom:20px;
margin-left: 15px;
border-radius:2px;
}
#single-product #price-container .price {
font-size:24px;
font-weight:bold;
padding:10px 0 15px;
}
#single-product #price-container .in-stock, #single-product #price-container .out-of-stock {
font-size:14px;
border-bottom:1px solid #e8e8e8;
margin:0 -15px 20px;
text-align:center;
padding-bottom:10px;
}
#tabbed-info {
margin:50px 0 20px;
}
#tabbed-info .nav-tabs {
border:none;
margin-bottom:-1px;
}
#tabbed-info .nav-tabs > li > a {
background-color:#edf0f2;
border-radius:2px 2px 0 0;
color:#a7b7c1;
}
#tabbed-info .nav-tabs > li > a:hover {
background-color:#dbe3e8;
border-color:#dbe3e8;
color:#565c65;
}
#tabbed-info .nav-tabs > li.active > a {
border:2px solid #edf0f2;
border-radius:2px 2px 0 0;
border-bottom-color:#fff;
color:#565c65;
background-color:#fff;
}
#tabbed-info .tab-content {
border:2px solid #edf0f2;
padding:20px 15px;
border-radius:0 2px 2px 2px;
}
#related-products {
margin-top:50px;
}
#page-404 .form-search {
margin-top:0
}
#page-404 .search-wrap input {
height:43px;
}
#media(max-width:767px){
.category-header {
margin:30px 0 0;
}
#single-product #price-container {
border-radius:0;
margin-top:0;
}
#product-description {
padding-right:0;
padding-left:0;
}
.product-description-text {
padding-right:15px;
padding-left:15px;
}
.product-images {
margin-bottom:0;
margin-right:0;
margin-left:0;
padding:0;
}
.product-images .product-image {
border:none;
margin-bottom:5px;
}
}
#pager {
height:50px;
line-height:50px;
margin:0 0 30px;
}
#pager a {
background:#434a54;
color:#edf0f2;
}
#pager a:hover {
text-decoration:none;
background:#363b43;
}
#pager a, #pager .next, #pager .current {
padding:8px 15px;
border-radius:2px;
}
#also .category-header {
margin-bottom:10px;
}
/* CHECKOUT FLOW */
#checkout-steps {
margin-top:40px;
margin-bottom:40px;
height:113px;
}
#checkout-steps:after {
clear:both;
}
.stepwizard-step p {
margin-top:10px;
}
.process-row {
display:table-row;
}
.process {
display:table;
position:relative;
}
.process-step button[disabled] {
opacity:1 !important;
filter:alpha(opacity=100) !important;
}
.process-step i {
font-size:40px;
color:#a7b7c1;
}
.process-step .btn-primary:hover i {
color:#565c65;
}
.process-step .btn-default > i, .process-step .btn-success > i {
color:#fff;
}
.process-row:before {
top:35px;
bottom:0;
position:absolute;
content:"";
width:100%;
margin:0 -15px;
height:1px;
background-color:#ccc;
z-order:0;
}
.process-step {
display:table-cell;
text-align:center;
position:relative;
}
.process-step p {
margin-top:10px;
text-align:center;
}
.btn-circle {
width:70px;
height:70px;
text-align:center;
padding:0 0 3px 2px;
font-size:12px;
line-height:1.428571429;
border-radius:2px;
}
#basket #products {
margin-top:50px;
}
#basket #products-table, #approve #products-table {
display:table;
}
#basket #products-table > .product, #approve #products-table > .product {
display:table-row;
}
#basket #products-table > header.product, #approve #products-table > header.product {
color:#a7b7c1;
}
#basket #products-table > header.product > div, #approve #products-table > header.product > div {
border-bottom:none;
padding-bottom:0;
}
#basket #products-table > .product > div, #approve #products-table > .product > div {
display:table-cell;
padding:20px 5px;
vertical-align:middle;
border-bottom:1px solid #edf0f2;
}
.basket-widget #products-table > .product > div {
padding-top:5px !important;
}
.basket-widget {
margin-top:10px;
}
.basket-widget #basket-total {
margin-top:10px;
}
#basket #products-table > .product > div:last-child {
padding-right:0;
}
#basket #products-table > .product > div:first-child {
padding-left:0;
}
.product-qty input {
background-color:#fff;
background-image:none;
border:2px solid #dbe3e8;
border-radius:2px;
box-shadow:0 1px 1px rgba(0, 0, 0, 0.075) inset;
color:#555;
font-size:14px;
line-height:1.42857;
padding:6px 12px;
text-align:center;
transition:border-color 0.15s ease-in-out 0s, box-shadow 0.15s ease-in-out 0s;
}
#coupon, #basket-total {
margin-top:50px;
}
#coupon input {
height:49px;
padding:10px 12px;
}
#coupon button {
margin-top:28px;
}
#basket-total #total {
font-size:20px;
font-weight:bold;
text-transform:uppercase;
border-top:2px solid #edf0f2;
padding:10px 0;
}
#basket-total #tax {
font-size:14px;
color:#a7b7c1;
}
#shipping-form #shipping_module {
padding-top:15px;
clear:both;
}
#approve #order-info dl {
margin-top:20px;
}
#order-info {
background:#edf0f2;
border-radius:2px;
padding-top:10px;
padding-bottom:10px;
}
#order-info h4 {
font-weight:300;
text-transform:uppercase;
}
#approve #order-info dl dd.gls-shop br:first-child{
display: none;
}
#continue {
margin:40px -15px;
}
#continue .prev {
text-decoration:underline;
}
#media(max-width:767px){
.process-step > a {
margin:3px;
}
#checkout-steps {
width:100%;
margin:10px -15px;
padding:0;
}
.product-decription {
font-weight:bold;
}
header > .product-decription, .product-decription > .visible-xs {
font-weight:400;
}
#coupon {
margin-top:10px;
}
.section-header {
margin-bottom:30px;
margin-top:0;
}
#approve #order-info dl {
padding-left:15px;
padding-right:15px;
}
}
/* FOOTER */
body > footer {
position:absolute;
bottom:0;
width:100%;
margin-top:30px;
min-height:200px;
background-color:#434a54;
color:#fff;
padding-top:2em;
}
#footer-nav > li > a {
padding:1px 0;
}
#footer-nav > li > a:hover {
background:none;
color:#fff;
}
/* FORMS */
form {
...
}
input {
...
}
i.form-control-feedback {
font-size:25px;
margin-right:5px;
margin-top:2px;
}
.has-error .form-control-feedback {
font-size:18px;
}
/* GENERAL GUBBINS */
.lg-icon {
font-size:1.7em;
}
.btn > i {
position:relative;
top:2px;
}
.lightbox { display: none; }
#media print {
/* All your print styles go here */
html,body {font-size:10pt;}
.section-header {margin-top:5px; margin-bottom: 5px;}
.section-header h2 {font-size: 11pt;}
.section-header h3 {font-size: 10pt;}
.footer-print {font-size: 9pt; bottom:0; text-align: center; margin-top: 40px;}
.brand {display:inline-block; text-align: right}
}

please check in combined.min.css and also in the html change col-sm-8 to col-sm-6
body {
font-family: 'Open Sans', Helvetica, Arial, sans-serif;
font-size: 14px; //from 16px to 14px
font-weight: 400;
margin-bottom: 200px;
color: #000;
}
#media (min-width: 768px)
.col-sm-6 {
width: 50%;
float: right;// add this line
}
in html
<div class="row"><span class="brand col-md-6"><img src="assets/img/logo.png" alt="Dronebutikken.dk" title="Drone shop Logo" width="300"></span><div class="col-sm-6 hidden-xs"><form id="header-search-form" class="form-search form-horizontal pull-right" action="http://dronebutikken.dk/search"><div class="input-append col-sm-12"><div class="search-wrap"><input type="text" class="search-query" name="search" value="" placeholder="Indtast søgeord"><button type="submit" class="btn btn-primary search-button" value=" "><i class="flaticon-zoom22"></i></button></div></div></form></div></div>

Related

Navigation menu items spacing need to be solved

I have designed a menu.
HTML code is give
<div class="navi">
<ul class="menu">
<li class="current_page_item">Women</li>
<li>Men</li>
<li>Junior</li>
<li>Accessories</li>
<li>Collections
<ul class='children'>
<li>Year</li>
<li>2014
<ul class='children'>
<li>SUMMER</li>
<li>AUTUMN</li>
<li>WINTER</li>
<li>SPRING</li>
</ul>
</li>
<li>2013</li>
</ul>
</li>
<li>Sale</li>
<li class="last"><a href='#'>MY ACCOUNT</a>
</li>
</ul>
<br style="clear:both;" />
</div>
The CSS is give bellow
.navi {
width:1000px;
margin:0 auto;
border-bottom:5px solid #000;
height:50px;
}
.menu {
width:1000px;
margin:0 auto;
}
.menu, .menu ul {
display: block;
list-style-type: none;
margin: 0;
padding: 0;
}
.menu li {
border: 0 none;
display: block;
float: left;
margin: 0;
padding: 0;
position: relative;
z-index: 5;
}
.menu li:hover {
white-space: normal;
z-index: 10000;
}
.menu li li {
float: none;
}
.menu ul {
left: 0;
position: absolute;
top: 0;
visibility: hidden;
z-index: 10;
}
.menu li:hover > ul {
top: 100%;
visibility: visible;
}
.menu li li:hover > ul {
left: 100%;
top: 0;
}
.menu:after, .menu ul:after {
clear: both;
content: ".";
display: block;
height: 0;
overflow: hidden;
visibility: hidden;
}
.menu, .menu ul {
min-height: 0;
}
.menu ul {
margin: -10px 0 0 -30px;
padding: 10px 30px 30px;
}
.menu ul ul {
margin: -30px 0 0 -10px;
padding: 30px 30px 30px 10px;
}
.menu ul li a:hover, .menu li li a:hover {
color: #484848;
text-decoration: none;
}
.menu ul {
min-width: 15em;
width: auto;
}
.menu a.arrow
{
background: url(arrow.gif) no-repeat right center;
}
.menu ul a.arrow
{
background: url(right.gif) no-repeat 97% center;
}
.menu .menuRight
{
float: right;
margin-right: 0px;
}
.menu a {
font-family:Harvest;
color: #314350;
display: block;
height:55px;
line-height:55px;
margin: 0 0px 0 0;
padding: 0 1em;
position: relative;
text-decoration: none;
font-size:18px;
}
.menu a:hover {
background-color: #1c2b36;
color: #ffffff;
box-shadow:#000 0 0 0, inset #3cc0c4 0 -5px 0;
}
.menu .current_page_item a {
background-color:#1c2b36;
color: #ffffff;
box-shadow:#000 0 0 0, inset #3cc0c4 0 -5px 0;
}
.menu li li {
-moz-border-bottom-colors: none;
-moz-border-left-colors: none;
-moz-border-right-colors: none;
-moz-border-top-colors: none;
background: none repeat scroll 0 0 #FFFFFF;
border-color: -moz-use-text-color #B2B2B2 #B2B2B2;
border-image: none;
border-right: 1px solid #B2B2B2;
border-style: none solid solid;
border-width: medium 1px 1px;
color: #444444;
filter: none;
width: auto;
}
.menu li li a {
background-position: 50% 50%;
background-repeat: no-repeat;
border: medium none;
color: #444444;
font-size: 12px;
font-weight: 400;
height: 20px;
line-height: 20px;
padding: 5px 10px;
text-shadow: none;
white-space: nowrap;
}
.menu li li a:hover {
background:#E5E4E4;
border: medium none;
color: #333;
filter: none;
}
.menu ul > li + li {
border-top: 0 none;
}
.menu li li:hover > ul {
left: 100%;
top: 0;
}
.menu > li:first-child > a {
border-left: medium none;
}
.menu > li:first-child > a, .menu li + li + li li:first-child > a {
}
.menu ul.children a, .menu .current_page_ancestor, .menu .current_page_ancestor ul a {
background: none;
filter: none;
}
.menu ul.children a{background:url(images/arrow.png) no-repeat 93% 70%;}
.menu ul.children a:hover{background:url(images/arrow.png) no-repeat 93% 70% #999;}
ul.sub-menu .current_page_item a {
background:none;
}
.footer-box-last {
width:420px;
float:left;
background:#b6c2c9;
height:150px;
}
.footer_outer {
background:url(mail-icon.png) repeat:none;
width:400px;
border-radius:5px;
margin:5px;
background-color:#fff;
}
.footer-box-last h2 {
color:#e8ecee;
font-size:20px;
font-weight:lighter;
margin:15px 15px 15px 7px;
}
.footer-box-last label {
color:#9B9B9A;
font-family:Arial, Helvetica, sans-serif;
font-size:13px;
}
.icon {
width:20px;
height:30px;
float:left;
margin:11px 0 0 5px;
}
.field-2 {
border: medium none;
width:220px;
height:30px;
border-radius:5px;
border:none;
color:#4c565f;
margin:5px;
}
.form_btn {
background-color:#3bc0c3;
color:#ffffff;
float:right;
border-radius:5px;
height:34px;
width:120px;
border:none;
margin:4px;
}
.last {
float:right;
padding-left:60px;
font-style:italic;
}
</style>
I want to move the last li item to the left. then it will look like this n pic
I need a space between SALES and MY ACCOUNT
please help me in this.
Thank you in advance
Try adding this:
.menu li.last {
float:right;
}
You had the right CSS in your code (.last), but you need to give it more authority as it is being overwritten by #menu li code. So on your last declaration change it to ".menu li.last" instead of ".last"
Try This
.menu li.last {
float:right;
}
OR
.menu li:last-child {
float:right;
}
Try this
.menu li:last-child {
float:right;
}
Try this:
.last{
position: relative;
left: -50px;
}

Reponsive styling Issue

I am developing a wordpress them and the homepage consists of a fixed header and footer and a vertical slider in the middle including content and images. I am building the website responsive but what I am noticing is that when the screen is resized the content in the vertical sliders is being cut off(Forget the images - just the boxes with the title and text). How can I make the main cont always start beneath the header and above the footer ?
Here is a js fiddle of what I am talking about: http://jsfiddle.net/tdWb9/
Some css:
#charset "UTF-8";
/* CSS Document */
* {
font-family: 'Oxygen Mono', Tahoma, Arial, sans-serif;
}
/* Style for our header texts
* --------------------------------------- */
h1{
font-size: 4em;
color: #fff;
margin:0;
padding :0;
}
html,body{
margin: 0;
-webkit-tap-highlight-color: rgba(0,0,0,0);
}
.home-button {
-moz-box-shadow:inset 0px 1px 0px 0px #cae3fc;
-webkit-box-shadow:inset 0px 1px 0px 0px #cae3fc;
box-shadow:inset 0px 1px 0px 0px #cae3fc;
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #79bbff), color-stop(1, #00baf2) );
background:-moz-linear-gradient( center top, #79bbff 5%, #00baf2 100% );
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#79bbff', endColorstr='#00baf2');
background-color:#79bbff;
-webkit-border-top-left-radius:10px;
-moz-border-radius-topleft:10px;
border-top-left-radius:10px;
-webkit-border-top-right-radius:10px;
-moz-border-radius-topright:10px;
border-top-right-radius:10px;
-webkit-border-bottom-right-radius:10px;
-moz-border-radius-bottomright:10px;
border-bottom-right-radius:10px;
-webkit-border-bottom-left-radius:10px;
-moz-border-radius-bottomleft:10px;
border-bottom-left-radius:10px;
text-indent:0;
border:1px solid #469df5;
display:inline-block;
color:#ffffff;
font-family:Arial;
font-size:17px;
font-weight:bold;
font-style:normal;
height:38px;
line-height:38px;
width:128px;
text-decoration:none;
text-align:center;
text-shadow:1px 1px 0px #287ace;
}
.home-button:hover {
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #00baf2), color-stop(1, #79bbff) );
background:-moz-linear-gradient( center top, #00baf2 5%, #79bbff 100% );
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00baf2', endColorstr='#79bbff');
background-color:#00baf2;
}.home-button:active {
position:relative;
top:1px;
}
.home-button h3{
text-align:center;
}
.intro{
background-color: rgba(255, 255, 255, 0.8);
width:30%;
border-radius:10px;
padding-bottom:20px;
padding-left:3%;
padding-right:3%;
margin-left:10%;
}
.intro2{
background-color:white;
width:30%;
border-radius:10px;
opacity:0.8;
filter:alpha(opacity=80);
padding-bottom:20px;
margin-right:10%;
float:right;
}
.intro h1, .intro2 h1{
color:black;
padding-top:3%;
}
.intro p, .intro2 p{
color: black;
}
/* Centered texts in each section
* --------------------------------------- */
.section{
text-align:left;
}
/* Backgrounds will cover all the section
* --------------------------------------- */
#section0,
#section1,
#section2,
#section3{
background-size: cover;
}
/* Defining each sectino background and styles
* --------------------------------------- */
#section0{
background-image: url(images/image1.jpg);
}
#section2{
background-image: url(images/image2.jpg);
}
#section3{
background-image: url(images/image3.jpg);
}
/* Overwriting styles for control arrows for slides
* --------------------------------------- */
.controlArrow.prev {
left: 50px;
}
.controlArrow.next{
right: 50px;
}
/* Fixed header and footer.
* --------------------------------------- */
#header, #footer{
display:block;
width: 100%;
background: #05556d;
text-align:center;
color: #f2f2f2;
}
#footer{
padding:10px 0px;
font-size:12px;
}
.home #header, .home #footer{
position:fixed;
z-index:9;
}
.home #header{
top:0px;
}
.home #footer{
bottom:0px;
}
#footer a{
color:#00baf2;
}
#footer-other{
z-index:9999;
width: 100%;
background: #05556d;
text-align:center;
color: #f2f2f2;
}
#footer-other{
padding:10px 0px;
font-size:12px;
}
#footer-other a{
color:#00baf2;
}
/* Bottom menu
* --------------------------------------- */
#infoMenu {
bottom: 80px;
}
#infoMenu li a {
color: #fff;
z-index: 999;
}
*Main Menu CSS*/
#import url(http://fonts.googleapis.com/css?family=Oxygen+Mono);
#cssmenu {padding: 0; margin: 0; border: 0;}
#cssmenu ul, #cssmenu li {list-style: none; margin: 0; padding: 0;}
#cssmenu ul {position: relative; z-index: 597; }
#cssmenu ul li { float: left; min-height: 1px; vertical-align: middle;}
#cssmenu ul li.hover,
#cssmenu ul li:hover {position: relative; z-index: 599; cursor: default;}
#cssmenu ul ul {visibility: hidden; position: absolute; top: 100%; left: 0; z-index: 598;}
#cssmenu ul ul li {float: none;}
#cssmenu ul ul ul {top: 0; left: auto; right: -99.5%; }
#cssmenu ul li:hover > ul { visibility: visible;}
#cssmenu ul ul {bottom: 0; left: 0;}
#cssmenu ul ul {margin-top: 0; }
#cssmenu ul ul li {font-weight: normal;}
#cssmenu a { display: block; line-height: 1em; text-decoration: none; }
#cssmenu {
background: #05556d;
border-bottom: 4px solid #00baf2;
font-family: 'Oxygen Mono', Tahoma, Arial, sans-serif;
font-size: 16px;
}
#cssmenu > ul { *display: inline-block; }
#cssmenu:after, #cssmenu ul:after {
content: '';
display: block;
clear: both;
}
#cssmenu a {
background: #05556d;
color: #CBCBCB;
padding: 0 20px;
}
#cssmenu ul { text-transform: uppercase; }
#cssmenu ul ul {
border-top: 4px solid #1b9bff;
text-transform: none;
min-width: 190px;
}
#cssmenu ul ul a {
background: #1b9bff;
color: #FFF;
border: 1px solid #0082e7;
border-top: 0 none;
line-height: 150%;
padding: 16px 20px;
}
#cssmenu ul ul ul { border-top: 0 none; }
#cssmenu ul ul li { position: relative }
#cssmenu > ul > li > a { line-height: 80px; }
#cssmenu ul ul li:first-child > a { border-top: 1px solid #0082e7; }
#cssmenu ul ul li:hover > a { background: #00baf2; }
#cssmenu ul ul li:last-child > a {
border-radius: 0 0 3px 3px;
box-shadow: 0 1px 0 #1b9bff;
}
#cssmenu ul ul li:last-child:hover > a { border-radius: 0 0 0 3px; }
#cssmenu ul ul li.has-sub > a:after {
content: '+';
position: absolute;
top: 50%;
right: 15px;
margin-top: -8px;
}
#cssmenu ul li:hover > a, #cssmenu ul li.current-menu-item > a {
background: #00baf2;
color: #FFF;
}
#cssmenu ul li.has-sub > a:after {
content: '+';
margin-left: 5px;
}
#down{display:none}
#cssmenu ul li.last ul {
left: auto;
right: 0;
}
#cssmenu ul li.last ul ul {
left: auto;
right: 99.5%;
}
.logo{
margin-top:5px;
float:left;
margin-left:20%;
padding-right:10px;
position:relative;
z-index:10000;
}
#Media screen and (max-width:480px) {
.intro{
width:70%;
margin-top:20%;
}
.intro h1, .intro2 h1{
color:black;
padding-top:3%;
}
.intro p, .intro2 p{
color: black;
}
.main-container{
width:85% !important;
}
#sbs{position: absolute;
width: 20px;
padding: 8px;
cursor:pointer;
height: 20px;
border: 0px solid white;
border-radius: 5px;
top: 5px;
left: 10px;}
.sb{width: 100%;
height: 4px;
display: inline-block;
border-bottom: 2px solid white;
float: left;
clear: both;}
#down{cursor:pointer;display:table;width:350px; margin:0 auto; margin-bottom:10px; text-align:center;padding: 15px 0px; background: #00baf2; color: white;margin-top: 10px;position:relative;}
#cssmenu *:not{ float :left !important; width: 100%;padding-left: 0px !important; padding-right: 0px !important;}
#cssmenu {
width: 87%;
display: table;
margin: 0 auto;
}
#down + #cssmenu { display: none;}
#down.open + #cssmenu { display: block;}
.logo{margin:0;padding:0;width: 100%;text-align: center;margin-bottom:10px;}
#cssmenu .logo > a{margin:0;padding:0}
#cssmenu ul li { display: block ; width: 100% ; text-align:center; }
#cssmenu > ul > li > a { line-height: 50px; }
#cssmenu ul ul {
border-top: 4px solid #1b9bff;
text-transform: none;
width: 100%;
/* float: left; */
}
#cssmenu ul ul ul {display:none;}
#cssmenu .has-sub:hover > ul {
border-top: 0 none;
visibility:visible;
display: block;
float: left;
clear: both;
position:relative;
right: 0;
}
#cssmenu ul li.hover, #cssmenu ul li:hover{
display:inline-block;
}
.content1{font-size:100%;}
}
}
#Media screen and (max-width:768px) {
.logo{ margin-left:10%;}
}
.login{
background-color:#00baf2;
width:5%;
margin-right:10%;
margin-top:-60px;;
float:right;
padding:10px 10px 10px 10px;
}
.main-container{
width:60%;
height:100%;
margin-left:auto;
margin-right:auto;
padding-top:3%;
}
.imgsection{
float:left;
padding-right:5%;
}
.main-container img{
max-width:100% !important;
height:auto;
display:block;
}
It's hard to tell because the text wont feet all in the page because it's a slider, so when you pull down to see more text it will change to the next slider,
The best way that I find better and simpliest to do it is by adding this css code:
p {font-size:82%}
Or if you want to keep the font-size to 100% you can do it by adding this css code which makes the div scroll:
.section{
height:55%;
overflow-y: scroll;
overflow-x: hidden;
}
.intro{
height:55%;
overflow-y: scroll;
overflow-x: hidden;
}
I think the scroll will work fine as you drag the mobile mouse into the text area without conflict with changing to the next slide, but I can't tell for sure because I'm not testing it on a mobile, but you can do the test.
Or... in a last resort, you could create a smaller logo and put it on the left side of the menu and compact the header size.
Regards

I cant center my header

Here is the link: http://jessiskiptoncampbell.com/jessi-wp/
At the moment its aligned right, but i want it to be aligned in the center.
#header {
padding: 15px 0 45px 0;
margin-left: auto;
margin-right: auto;
}
{
margin-left: auto;
margin-right: auto;
}
#logobar1, #logobar2 {
display:block;
width:100%;
position:absolute;
center:0px;
z-index:1;
}
#logobar1 {
border-top:2px solid #231f20;
border-bottom:2px solid #231f20;
background-color:#f49cb1;
height:102px;
margin-top:197px;
}
#logobar2 {
background-color:rgba(255, 255, 255, 0.7);
height:80px;
margin-top:208px;
}
#logodiv, #logodiv a, #logo {
display:block;
margin:0 auto;
position:relative;
z-index:2;
}
.nav {
text-align: center;
width: auto;
margin: -45px auto 15px auto;
z-index:3;
position:relative;
font-family:'Montserrat Alternates', sans-serif;
}
.nav ul {
list-style-type: none;
margin: 0;
padding: 0;
display: inline-block;
list-style:none;
}
.nav ul li {
float: left;
margin-left: 8px;
font-size: 14px;
position: relative;
}
.nav ul li a {
display: block;
padding: 2px 20px;
color: #000;
text-decoration: none;
}
.nav ul li a:hover, .nav li.current_page_item a, .nav ul li.current-menu-item a {
color: #931b20;
}
just Give width:100%; for the .jr_logo class
Set up your header image width to this width: 1240px; and it should be centered
your maincontainer has a margin and its is setting everything off...
take your header out of your maincontainer...
its simple.just give your image an id or class..likeke
#myimg
{
float:left;
margin-left:-116px;
}
now it will perfectly become in center.

Trying to get Media Queries to work on Portrait OR Landscape

here it is, this is the css, and the media queries is down below, just search #media and it will find it.
Thanks so much for your help, idk why it is not working, the media query has no effect on the ipad emulator, in portrait mode, i changed the background just to see if it would work and it still did not, so not sure whats going on.
body {background-image:url('../images/space1.jpg');
background-repeat:no-repeat;
background-size:200%;
}
body {
color:white;
}
a, a:visited {
color:#3399FF; text-decoration:none;
}
div.header{
text-align:right;
font-size:200%;
}
div.header1 {
text-align:right;
font-size:125%;
}
div.logo{
margin-top:-40px;
}
#nav{
width:85%;
height:3%;
font-size: 26px;
font-weight: bold;
background-color: ;
border-radius: 8px;
text-align: center;
margin: 0 auto;
position:absolute;
top:100px;
left:120px;
}
#nav ul {
height: auto;
padding: 0px 0px;
margin: 0px;
background-color: #f2f2f2;
border-bottom: 1px solid #ccc;
display: inline-block;
}
#nav li {
display: inline-block;
padding: 20px;
margin-left: auto;
margin-right: auto;
}
#nav a {
text-decoration: none;
color: :#3399FF;
padding: 8px 8px 8px 8px;
}
#nav a:hover {
color: #000000;
background-color: #FFF;
li:hover ul {
display: block;
}
}
nav ul ul {
display: none;
}
nav ul li:hover > ul {
display: block;
}
div.qui {
text-align:center;
font-size:200%;
text-decoration:underline;
}
div.specs {
text-align:center;
font-size:175%;
}
ul.qui {
text-align:center;
font-size:150%;
list-style-type: none;
}
.images {
overflow: hidden;
}
.images img {
float: left;
margin: 0px;
}
div.1 {
text-align: center;
}
.left {
float: left;
margin-left:20%;
padding:10px;
border:3px solid #585858 ;
}
.right {
float: right;
margin-right:20%;
padding:10px;
border:3px solid #585858 ;
}
p.v {
text-align:center;
}
#media only screen
and (min-device-width : 768px)
and (max-device-width : 1024px)
and (orientation : portrait) {
div.header{
text-align:right;
font-size:120%;
}
div.header1 {
text-align:right;
font-size:85%;
}
div.logo{
margin-top:-40px;
}
div.logo {
img
height:150px;
width:320px;
}
#nav{
width:85%;
height:3%;
font-size: 30%;
font-weight: bold;
background-color: ;
border-radius: 8px;
text-align: center;
margin: 0 auto;
position:absolute;
top:100px;
left:120px;
}
#nav ul {
height: auto;
padding: 0px 0px;
margin: 0px;
background-color: #f2f2f2;
border-bottom: 1px solid #ccc;
display: inline-block;
}
#nav li {
display: inline-block;
padding: 5px;
margin-left: auto;
margin-right: auto;
}
#nav a {
text-decoration: none;
color: :#3399FF;
padding: 8px 8px 8px 8px;
}
#nav a:hover {
color: #000000;
background-color: #FFF;
li:hover ul {
display: block;
}
}
nav ul ul {
display: none;
}
nav ul li:hover > ul {
display: block;
}
div.qui {
text-align:center;
font-size:200%;
text-decoration:underline;
}
div.specs {
text-align:center;
font-size:175%;
}
ul.qui {
text-align:center;
font-size:150%;
list-style-type: none;
}
.images {
overflow: hidden;
}
.images img {
float: left;
margin: 0px;
}
div.1 {
text-align: center;
}
.left {
float: left;
margin-left:0%;
padding:0px;
border:3px solid #585858 ;
}
.right {
float: right;
margin-right:0%;
padding:0px;
border:3px solid #585858 ;
}
p.v {
text-align:center;
}
}
So, the problem is primarily twofold:
1) You have several errors in your css. Using the validator, I found 13 errors.
- There's declarations that are unclosed (missing a closing curly-brace - }), such as your declaration for #nav a:hover
- There's extra / stray closing curly-braces in other locations.
- There's invalid background color and color properties
- You have div.1, which implies a class of "1". That's not a valid class according to the validator.
2) The media query contains far too many rules. You should only put rules in the media query that replace / override previous rules, or are new rules. You've got many rules that are simply repeats of your other common css rules.
Clean up the errors. Try running them through the W3C CSS validator - you can copy-and-paste your css directly, to see if / where there are errors.
Then, simplify your media query css to only include the necessary changed rules (and only the specific properties that need to be changed).
Note: I was able to get it to validate by cleaning up the errors. For your reference, the valid / clean CSS is below.
You still need to simplify, and the code below is not necessarily guaranteed to work. I'd encourage you to over-simplify - put one rule in your media query for a border, background color, or something, just to see if the media query is getting picked up. Then you can work on adding in the different styles you need.
body {background-image:url('../images/space1.jpg');
background-repeat:no-repeat;
background-size:200%;
}
body {
color:white;
}
a, a:visited {
color:#3399FF;
text-decoration:none;
}
div.header{
text-align:right;
font-size:200%;
}
div.header1 {
text-align:right;
font-size:125%;
}
div.logo{
margin-top:-40px;
}
#nav{
width:85%;
height:3%;
font-size: 26px;
font-weight: bold;
border-radius: 8px;
text-align: center;
margin: 0 auto;
position:absolute;
top:100px;
left:120px;
}
#nav ul {
height: auto;
padding: 0px 0px;
margin: 0px;
background-color: #f2f2f2;
border-bottom: 1px solid #ccc;
display: inline-block;
}
#nav li {
display: inline-block;
padding: 20px;
margin-left: auto;
margin-right: auto;
}
#nav a {
text-decoration: none;
color:#3399FF;
padding: 8px 8px 8px 8px;
}
#nav a:hover {
color: #000000;
background-color: #FFF;
}
li:hover ul {
display: block;
}
nav ul ul {
display: none;
}
nav ul li:hover > ul {
display: block;
}
div.qui {
text-align:center;
font-size:200%;
text-decoration:underline;
}
div.specs {
text-align:center;
font-size:175%;
}
ul.qui {
text-align:center;
font-size:150%;
list-style-type: none;
}
.images {
overflow: hidden;
}
.images img {
float: left;
margin: 0px;
}
div.one {
text-align: center;
}
.left {
float: left;
margin-left:20%;
padding:10px;
border:3px solid #585858 ;
}
.right {
float: right;
margin-right:20%;
padding:10px;
border:3px solid #585858 ;
}
p.v {
text-align:center;
}
#media only screen
and (min-device-width : 768px)
and (max-device-width : 1024px)
and (orientation : portrait) {
div.header{
text-align:right;
font-size:120%;
}
div.header1 {
text-align:right;
font-size:85%;
}
div.logo{
margin-top:-40px;
}
div.logo {
height:150px;
width:320px;
}
#nav{
width:85%;
height:3%;
font-size: 30%;
font-weight: bold;
border-radius: 8px;
text-align: center;
margin: 0 auto;
position:absolute;
top:100px;
left:120px;
}
#nav ul {
height: auto;
padding: 0px 0px;
margin: 0px;
background-color: #f2f2f2;
border-bottom: 1px solid #ccc;
display: inline-block;
}
#nav li {
display: inline-block;
padding: 5px;
margin-left: auto;
margin-right: auto;
}
#nav a {
text-decoration: none;
color:#3399FF;
padding: 8px 8px 8px 8px;
}
#nav a:hover {
color: #000000;
background-color: #FFF;
}
li:hover ul {
display: block;
}
nav ul ul {
display: none;
}
nav ul li:hover > ul {
display: block;
}
div.qui {
text-align:center;
font-size:200%;
text-decoration:underline;
}
div.specs {
text-align:center;
font-size:175%;
}
ul.qui {
text-align:center;
font-size:150%;
list-style-type: none;
}
.images {
overflow: hidden;
}
.images img {
float: left;
margin: 0px;
}
div.one {
text-align: center;
}
.left {
float: left;
margin-left:0%;
padding:0px;
border:3px solid #585858 ;
}
.right {
float: right;
margin-right:0%;
padding:0px;
border:3px solid #585858 ;
}
p.v {
text-align:center;
}
}

How do I center my navigation bar links using CSS while keeping the sides grey?

How do I center my navigation bar links using CSS while keeping the sides grey?
Blogs and History have a drop a down menu. Here is a screenshot:
(source: gyazo.com)
CSS:
.navbar ul {
list-style: none;
margin: 0;
padding: 0;
}
.navbar li {
float: left;
width: 100px;
background-color: #444444;
text-align: center;
border-right: 1px solid white;
position: relative;
height: 30px;
line-height: 30px;
}
.navbar li ul li {
float: none;
width: 150px;
text-align: left;
padding-left: 5px;
border-top: 1px solid white;
}
.navbar a {
text-decoration: none;
color: white;
}
.navbar li ul {
position: absolute;
top: 30px;
left: 0;
visibility: hidden;
}
.navbar li:hover ul {
visibility: visible;
}
.navbar li:hover {
background-color: maroon;
}
Edited my answer.. I've made your Container div clear the float, and set a defined width to navbar.
http://jsfiddle.net/jFdhM/
#container {
border-radius: 10px;
box-shadow: 3px 3px 4px;
padding: 8px;
background-color: #FFFFFF;
width: 748px;
margin: 0 auto;
}
#top {
width: 748px;
}
.navbar {
width: 505px;
margin:0 auto;
}
.navbar ul {list-style:none; padding:0; margin: 0 auto;text-align: center;}
.navbar li {float:left; width:100px; background-color:#444444; text-align:center;
border-right:1px solid white; position:relative;
height:30px; line-height:30px;}
.navbar li ul li {float:none; width:150px; text-align:left; padding-left:5px;
border-top:1px solid white;}
.navbar a {text-decoration:none; color:white;}
.navbar li ul {position:absolute; top:30px; left:0; visibility:hidden;}
.navbar li:hover ul {visibility:visible;}
.navbar li:hover {background-color:maroon;}
#maincontent {
clear: both;
padding: 10px;
font-family: "Microsoft Sans Serif";
font-size: medium;
}