lional Posted June 30, 2012 Share Posted June 30, 2012 Hi I am trying to make my pop-up menu go up and not down with CSS. I have images using css for my rollovers. I will attach my code HTML File snippet <div id="navcontainer"> <ul id="navlist"> <li id="active"> <a href="#" id="current">Item one</a> <ul id="subnavlist"> <li><a href="#">link 1</a></li> <li><a href="#">link 2</a></li> <li><a href="#">link 3</a></li> <li><a href="#">link 4</a></li> </ul> </li> <li><a href="#">Item two</a></li> <li><a href="#">Item three</a></li> </ul> </div> <div id="content"> <img alt="" src="images/image.png" style="width: 862px; height: 324px" /> </div> CSS ul#subnavlist { display: none; } ul#subnavlist li { float: none; } ul#subnavlist li a { padding: 0px; margin: 0px; } #navcontainer { height:30px; background-color: #C7C8CA; padding-left:10%; } ul#navlist { font-family: Arial; } ul#navlist a { text-decoration: none; } ul#navlist { margin: 0px; padding: 5px 0px 0px 0px; list-style-type: none; } ul#navlist ul { margin: 0px; padding: 0px; list-style-type: none; } ul#navlist li { margin: 0px; padding: 0px; list-style-type: none; float: left; } ul#navlist li a { color: #ffffff; background-color: #003366; padding: 3px; border: 1px #ffffff outset; } ul#navlist li a:hover { color: #ffff00; background-color: #003366; } ul#navlist li a:active { color: #cccccc; background-color: #003366; border: 1px #ffffff inset; } ul#subnavlist { display: none;margin-bottom:50px } ul#subnavlist li { float: none; } ul#subnavlist li a { padding: 0px; } ul#navlist li:hover ul#subnavlist { display: block; position: absolute; font-size: 8pt; padding-top: 5px; } ul#navlist li:hover ul#subnavlist li a { display: block; width: 10em; border: none; padding: 2px; } Is this possible Thanks Quote Link to comment Share on other sites More sharing options...
BuildMyWeb Posted June 30, 2012 Share Posted June 30, 2012 hmmm... always seen that done with js. have you tried position:absolute; ? wont be very flexible but if its for a specific application, maybe would work? Quote Link to comment Share on other sites More sharing options...
lional Posted June 30, 2012 Author Share Posted June 30, 2012 How would I do it with js, is there a link that I could see an example Quote Link to comment Share on other sites More sharing options...
haku Posted July 1, 2012 Share Posted July 1, 2012 If you do this, make sure you check what happens when the user is near the edge of the page. I've seen implementations like this before, and they become unusable in certain positions. In situations like this, it's usually best not to screw with the default browser behavior. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.