otuatail Posted October 21, 2014 Share Posted October 21, 2014 Hi I have a temporary web page with a drop down menu. Problem is to get rid of the gap on the drop down menus. Any help please www.des-otoole.co.uk/top_menu Link to comment https://forums.phpfreaks.com/topic/291960-drop-down-menu-ccs-help/ Share on other sites More sharing options...
Psycho Posted October 21, 2014 Share Posted October 21, 2014 Odd. When I download all your content locally (htm, css, js & images) there is no gap. But, I do see the gap on your hosted site. I was able to simulate the gap by inserting a margin into the css code for the UL. So, it may have a default of 1px margin. Try adding an explicit 0px margin #nav li ul /* Default location */ { position: absolute; width: 101px; left: -300px; border-width: 1px; border-left: 0px solid; border-right: 0px solid; padding-left: 0px; margin: 0px; <<== ADD THIS LINE } Link to comment https://forums.phpfreaks.com/topic/291960-drop-down-menu-ccs-help/#findComment-1494345 Share on other sites More sharing options...
otuatail Posted October 22, 2014 Author Share Posted October 22, 2014 Hi I have added the line you suggested but it made no difference. I also have got the line * {margin:0; padding:0} at the top of the CSS file. I have tested this out on IE 11 Firefox 32 Opera 25 Chrome 38 AND Safari 5.1 They all have a gap between the top menu Brahms | Mozart and the sub menus below. Link to comment https://forums.phpfreaks.com/topic/291960-drop-down-menu-ccs-help/#findComment-1494362 Share on other sites More sharing options...
Psycho Posted October 22, 2014 Share Posted October 22, 2014 As I said, when I copied all your files down locally it doesn't happen. I only see the problem when viewing your page at the URL provided. Doesn't make any sense. Maybe I missed something, but I don't think so. I dig into the JavaScript code, but it could possibly be referencing something that is causing it. You could also try using a margin of -1 in the above (it should just need to be margin-top or margin-bottom). But, I would consider that as a kludge solution. Link to comment https://forums.phpfreaks.com/topic/291960-drop-down-menu-ccs-help/#findComment-1494406 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.