Results 1 to 7 of 7

Thread: spacing under menu bar?

  1. #1
    Join Date
    Jan 2009
    Location
    NH
    Posts
    675
    Thanks
    98
    Thanked 26 Times in 26 Posts

    Question spacing under menu bar?

    On a site 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?



    here is the css for the menu bar

    Code:
    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+UO7fwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9oJGA41KpTYroIAAACASURBVCjP7ZE7DsJADESfJiL37znNXoJLUNARa7Ni6Bw5AtFEqXAx8vj/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+UO7fwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9oJGA41KpTYroIAAACASURBVCjP7ZE7DsJADESfJiL37znNXoJLUNARa7Ni6Bw5AtFEqXAx8vj/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;}
    }
    Last edited by mlegg; 05-16-2014 at 03:37 PM. Reason: revised css

  2. #2
    Join Date
    Jan 2009
    Location
    NH
    Posts
    675
    Thanks
    98
    Thanked 26 Times in 26 Posts

    Default

    I changed the css a bit but I still see that space

  3. #3
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    3,033
    Thanks
    25
    Thanked 599 Times in 575 Posts
    Blog Entries
    40

    Default

    So the space only appears in Firefox right?

    There's some Gecko-specific CSS that looks to be causing it;
    Code:
    @-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.
    Focus on Function Web Design
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps

  4. The Following User Says Thank You to Beverleyh For This Useful Post:

    mlegg (05-19-2014)

  5. #4
    Join Date
    Jan 2009
    Location
    NH
    Posts
    675
    Thanks
    98
    Thanked 26 Times in 26 Posts

    Default

    thanks, that looks like it worked

  6. #5
    Join Date
    Jan 2009
    Location
    NH
    Posts
    675
    Thanks
    98
    Thanked 26 Times in 26 Posts

    Default

    Bev now when you mouse over the navigation bar on the words UNITS, the sub menu appears under the HOME button.

  7. #6
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    3,033
    Thanks
    25
    Thanked 599 Times in 575 Posts
    Blog Entries
    40

    Default

    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
    Code:
    #css3menu1 { height:38px }
    Focus on Function Web Design
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps

  8. The Following User Says Thank You to Beverleyh For This Useful Post:

    mlegg (05-19-2014)

  9. #7
    Join Date
    Jan 2009
    Location
    NH
    Posts
    675
    Thanks
    98
    Thanked 26 Times in 26 Posts

    Default

    THANKS that works great.

Similar Threads

  1. Replies: 0
    Last Post: 01-14-2014, 10:31 PM
  2. Sub-menu spacing
    By wispsofsmoke in forum CSS
    Replies: 0
    Last Post: 12-07-2010, 03:23 AM
  3. DD Tab Menu Spacing
    By Genie in forum Dynamic Drive scripts help
    Replies: 6
    Last Post: 07-11-2008, 04:51 PM
  4. Menu Spacing
    By shawnmichaels in forum Dynamic Drive scripts help
    Replies: 2
    Last Post: 05-18-2006, 07:30 AM
  5. Menu Spacing
    By shawnmichaels in forum CSS
    Replies: 1
    Last Post: 05-17-2006, 07:38 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •