Darkmatter5 Posted March 6, 2009 Share Posted March 6, 2009 Here's my CSS #navcontainer ul { margin: 0; padding: 0; list-style-type: none; } #navcontainer ul li { display: inline; } #navcontainer ul li a { text-decoration: none; padding: .2em 1em; color: #fff; background-color: #036; } #navcontainer ul li a:hover { color: #fff; background-color: #369; } Here's the HTML <div id="navcontainer"> <ul id='navlist'> <li><a href='index.php' id='current'>Home</a></li> <li><a href='help.php'>Help</a></li> <li><a href='world.php'>World view</a></li> <li><a href='res_section.php'>Holding view</a></li> <li><a href='res_settlement.php'>Settlement view</a></li> </ul> </div> I'm wanting to put some text in that will be displayed inline with the list code, but be pushed all the way to the right of the window. If I use this: <div id="navcontainer"> <ul id='navlist'> <li><a href='index.php' id='current'>Home</a></li> <li><a href='help.php'>Help</a></li> <li><a href='world.php'>World view</a></li> <li><a href='res_section.php'>Holding view</a></li> <li><a href='res_settlement.php'>Settlement view</a></li> </ul> <span style='position: absolute; right: 0;'>text</span> </div> It displays text below the list and all the way to the right, but not inline. Link to comment https://forums.phpfreaks.com/topic/148255-help-with-text-displayed-not-where-i-need-it/ Share on other sites More sharing options...
dropfaith Posted March 6, 2009 Share Posted March 6, 2009 you want it inline and you want the ul inline why not just nest is inside of a ul? would be the easy way otherwise <div id="navcontainer" style="float:left;"> <ul id='navlist'> <li><a href='index.php' id='current'>Home</a></li> <li><a href='help.php'>Help</a></li> <li><a href='world.php'>World view</a></li> <li><a href='res_section.php'>Holding view</a></li> <li><a href='res_settlement.php'>Settlement view</a></li> </ul> </div> <div style="float:right;">text </div> and set widths to those divs based on your styling Link to comment https://forums.phpfreaks.com/topic/148255-help-with-text-displayed-not-where-i-need-it/#findComment-778343 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.