<p>Given this HTML:</p>

<pre><code>&lt;ul id="topnav"&gt;
    &lt;li id="topnav_galleries"&gt;&lt;a href="#"&gt;Galleries&lt;/a&gt;&lt;/li&gt;
    &lt;li id="topnav_information"&gt;&lt;a href="#"&gt;Information&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</code></pre>

<p>And this CSS:</p>

<pre class="lang-css prettyprint-override"><code>#topnav_galleries a, #topnav_information a {
    background-repeat: no-repeat;
    text-indent: -9000px;
    padding: 0;
    margin: 0 0;
    overflow: hidden;
    height: 46px;
    width: 136px;
    display: block;
}
#topnav { list-style-type: none; }
#topnav_galleries a { background-image: url('image1.jpg'); }
#topnav_information a { background-image: url('image2.jpg'); }
</code></pre>

<p>How would I go about turning the <code>topnav</code> list into an inline list?</p>

[{'answer_id': 45429, 'author': 'Ian Oxley', 'author_id': 1904, 'author_profile': 'https://Stackoverflow.com/users/1904', 'pm_score': 3, 'selected': True, 'text': '<p>Try this:</p>\n\n<pre class="lang-css prettyprint-override"><code>#topnav {\n    overflow:hidden;\n}\n#topnav li {\n    float:left;\n}\n</code></pre>\n\n<p>And for IE you will need to add the following:</p>\n\n<pre class="lang-css prettyprint-override"><code>#topnav {\n    zoom:1;\n}\n</code></pre>\n\n<p>Otherwise your floated &lt; li > tags will spill out of the containing &lt; ul >.</p>\n'}, {'answer_id': 77974, 'author': 'SpoonMeiser', 'author_id': 1577190, 'author_profile': 'https://Stackoverflow.com/users/1577190', 'pm_score': 0, 'selected': False, 'text': '<p>An alternative to floating the elements left, is this:</p>\n\n<pre class="lang-css prettyprint-override"><code>#topnav li {\n    display: inline;\n}\n</code></pre>\n'}, {'answer_id': 34468793, 'author': 'Peyman Mohamadpour', 'author_id': 5104596, 'author_profile': 'https://Stackoverflow.com/users/5104596', 'pm_score': 0, 'selected': False, 'text': '<p>Another approach would be to use <code>display: inline-block</code> for <code>li</code> s:</p>\n\n<pre><code>#topnav li {\n    display: inline-block;\n}\n</code></pre>\n'}]
['https://Stackoverflow.com/questions/45163', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1306/']