Log in

View Full Version : spacing under menu bar?



mlegg
05-16-2014, 01:12 AM
On a site (http://hamptonsunrise.com/) I have my banner image with a menu bar under it then the white space container for the text/content of the page. How can I get rid of that space?

http://i57.tinypic.com/2ufxeyt.jpg

here is the css for the menu bar


ul#css3menu0,ul#css3menu0 ul{
margin:0;list-style:none;padding:0;background-color:#dedede;border-width:1px;border-style:solid;border-color:#5f5f5f;-moz-border-radius:0px;-webkit-border-radius:0px;border-radius:0px;}
ul#css3menu0 ul{
display:none;position:absolute;left:0;top:100%;-moz-box-shadow:3.5px 3.5px 5px #000000;-webkit-box-shadow:3.5px 3.5px 5px #000000;box-shadow:3.5px 3.5px 5px #000000;background-color:#f8ac00;border-radius:0px;-moz-border-radius:0px;-webkit-border-radius:0px;border-color:#d4d4d4;padding:0 10px 10px;}
ul#css3menu0 li:hover>*{
display:block;}
ul#css3menu0 li{
position:relative;display:block;white-space:nowrap;font-size:0;float:left;}
ul#css3menu0 li:hover{
z-index:1;}
ul#css3menu0{
font-size:0;width:100%;z-index:999;position:relative;display:inline-block;zoom:1;padding:0 0%;margin:0 0%;
*display:inline;*padding-right:1.2%;}
* html ul#css3menu0 li a{
display:inline-block;}
ul#css3menu0>li{
margin:0;width:20%;}
body:first-of-type ul#css3menu0{
display:inline-table;border-spacing:0px 0;}
body:first-of-type ul#css3menu0>li{
display:table-cell;float:none;}
ul#css3menu0 a:active, ul#css3menu0 a:focus{
outline-style:none;}
ul#css3menu0 a{
display:block;vertical-align:middle;text-align:center;text-decoration:none;font:bold 14px Georgia,serif;color:#000000;text-shadow:#FFF 0 0 1px;cursor:pointer;padding:10px;background-color:#F5DEB3;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAADICAYAAAAp8ov1AAAAAXNSR0IArs4c6QAAAAZiS0dEAAAAAAAA+UO7fwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9oJGA41KpTYroIAAACASURBV CjP7ZE7DsJADESfJiL37znNXoJLUNARa7Ni6Bw5AtFEqXAx8vj/wfZNwBBAakPAWukQEJUu1RGVLt9su4yo9eJ3t0FrDWyTg58HezlujFPE9lXAQ8BdQM93R9LtM2ve/vnB22tcF/DaTpItJwHKVWcBk4BLwlw1/nAUvAGm30u0udPq+QAAAABJRU5ErkJggg==");background-repeat:repeat;background-position:0 0;border-width:0 0 0 1px;border-style:solid;border-color:#C0C0C0;}
ul#css3menu0 ul li{
float:none;margin:10px 0 0;}
ul#css3menu0 ul a{
text-align:center;padding:4px;background-color:#f8ac00;background-image:none;border-width:0;border-radius:0px;-moz-border-radius:0px;-webkit-border-radius:0px;-moz-transition:all 0.5s;-webkit-transition:all 0.5s;-o-transition:all 0.5s;font:14px Georgia,serif;color:#000;text-decoration:none;}
ul#css3menu0 li:hover>a,ul#css3menu0 li a.pressed{
background-color:#f8ac00;border-color:#C0C0C0;border-style:solid;color:#000000;text-shadow:#FFF 0 0 1px;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAADICAYAAAAp8ov1AAAAAXNSR0IArs4c6QAAAAZiS0dEAAAAAAAA+UO7fwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9oJGA41KpTYroIAAACASURBV CjP7ZE7DsJADESfJiL37znNXoJLUNARa7Ni6Bw5AtFEqXAx8vj/wfZNwBBAakPAWukQEJUu1RGVLt9su4yo9eJ3t0FrDWyTg58HezlujFPE9lXAQ8BdQM93R9LtM2ve/vnB22tcF/DaTpItJwHKVWcBk4BLwlw1/nAUvAGm30u0udPq+QAAAABJRU5ErkJggg==");background-position:0 100px;text-decoration:none;}
ul#css3menu0 img{
border:none;vertical-align:middle;margin-right:10px;}
ul#css3menu0 span{
display:block;overflow:visible;background-position:right center;background-repeat:no-repeat;padding-right:0px;}
ul#css3menu0 > label.switch{
display:none;cursor:pointer;width:25px;height:20px;padding:10px;}
ul#css3menu0 > label.switch:before{
content:"";position:absolute;display:block;height:4px;width:25px;border-radius:4px;background:#000000;-moz-box-shadow:0 8px #000000, 0 16px #000000;-webkit-box-shadow:0 8px #000000, 0 16px #000000;box-shadow:0 8px #000000, 0 16px #000000;}
ul#css3menu0 > label.switch:hover:before{
background:#000000;-moz-box-shadow:0 8px #000000, 0 16px #000000;-webkit-box-shadow:0 8px #000000, 0 16px #000000;box-shadow:0 8px #000000, 0 16px #000000;}
ul#css3menu0 > .switchbox{
display:none;}
ul#css3menu0 ul li:hover>a,ul#css3menu0 ul li a.pressed{
background-color:#F5DEB3;background-image:none;color:#868686;text-decoration:none;}
ul#css3menu0 li.topfirst>a{
border-radius:0px 0 0 0px;-moz-border-radius:0px 0 0 0px;-webkit-border-radius:0px;-webkit-border-top-right-radius:0;-webkit-border-bottom-right-radius:0;-moz-transition:all 0.5s;-webkit-transition:all 0.5s;-o-transition:all 0.5s;}
ul#css3menu0 li.topmenu>a{
-moz-transition:all 0.5s;-webkit-transition:all 0.5s;-o-transition:all 0.5s;}
ul#css3menu0 li.toplast>a{
border-radius:0 0px 0px 0;-moz-border-radius:0 0px 0px 0;-webkit-border-radius:0;-webkit-border-top-right-radius:0px;-webkit-border-bottom-right-radius:0px;-moz-transition:all 0.5s;-webkit-transition:all 0.5s;-o-transition:all 0.5s;}
ul#css3menu0>li:nth-of-type(1){width:18%}ul#css3menu0>li:nth-of-type(2){width:17%}ul#css3menu0>li:nth-of-type(3){width:17%}ul#css3menu0>li:nth-of-type(4){width:26%}ul#css3menu0>li:nth-of-type(5){width:22%}
@-moz-document url-prefix(){body:first-of-type ul#css3menu0{display:inline-block} body:first-of-type ul#css3menu0>li{display:block;float:left !important;}}
@media only screen and (max-width:418px),only screen and (max-device-width:418px){
ul#css3menu0>li:nth-of-type(1){width:35%}ul#css3menu0>li:nth-of-type(2){width:32%}ul#css3menu0>li:nth-of-type(3){width:33%}ul#css3menu0>li:nth-of-type(4){width:55%}ul#css3menu0>li:nth-of-type(5){width:45%}body:first-of-type ul#css3menu0{display:inline-block} body:first-of-type ul#css3menu0>li{display:block;float:left !important;}}
@media screen and (max-width: 768px) {
ul#css3menu0 > li {
position: initial;}
ul#css3menu0 ul .submenu,ul#css3menu0 li > ul {
left: 0; right:auto; top: 100%;}
ul#css3menu0 .submenu,ul#css3menu0 ul,ul#css3menu0 .column {
-webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box;padding-right: 0;width: 100% !important;}
}
@media screen and (max-width: 219px) {
ul#css3menu0 {
width: 100%;}
ul#css3menu0 > li {
display: none !important; position: relative; width: 100% !important;}
ul#css3menu0 > label.switch,ul#css3menu0 .switchbox:checked ~ li {
display: block !important;}
}

mlegg
05-16-2014, 03:39 PM
I changed the css a bit but I still see that space :confused:

Beverleyh
05-19-2014, 12:25 PM
So the space only appears in Firefox right?

There's some Gecko-specific CSS that looks to be causing it;
@-moz-document url-prefix(){
body:first-of-type ul#css3menu1{display:inline-block}
body:first-of-type ul#css3menu1>li{display:block;float:left !important;}
}

Take that out of style.css and that should sort it.

mlegg
05-19-2014, 04:27 PM
thanks, that looks like it worked

mlegg
05-19-2014, 05:05 PM
Bev now when you mouse over the navigation bar on the words UNITS, the sub menu appears under the HOME button. :confused:

Beverleyh
05-19-2014, 06:31 PM
Ah, I see - I didn't spot your nest li's amongst the data URIs.

OK - change of plan. Put that that Gecko CSS back in and try setting an explicit height on your #css3menu1 ul


#css3menu1 { height:38px }

mlegg
05-19-2014, 11:28 PM
THANKS that works great.