开发者

How can I display all of them in a single line using css?

开发者 https://www.devze.com 2023-03-06 16:11 出处:网络
How can I display all of them in a single line using csss. <div id=\"paperbusiness\"> <span id=\"paper\">paper</span>

How can I display all of them in a single line using csss.

        <div id="paperbusiness">
            <span id="paper">paper</span>
            <span id="business"> business</span>
        </div>

        <nav id="nav">
            <ul>
                <li><a href="yahoo.com">PORTFOLIO</a></li>
                <li><a href="googlr.com">SERVICES</a><开发者_C百科/li>
                <li><a href="gmail.com">ABOUT</a></li>
                <li><a href="testing.php">TESTING</a></li>
                <li><a href="Req.pph">REQUIREMENTS</a></li>
            </ul>
        </nav>

I need something like

paper business PORTFOLIO SERVICES ABOUT TESTING REQUIREMENTS


li {
  display: inline;
}

And then apply any other styling you wish.


display: inline;

is all you need


First make div and nav inline-block, then li as inline:

div, nav {
    display: inline-block;
}

li {
    display: inline;
}


Actually display: inline-block; is much better or am I missing something?

0

精彩评论

暂无评论...
验证码 换一张
取 消