Skip to content
Related Articles
Get the best out of our app
GeeksforGeeks App
Open App

Related Articles

How to prevent line breaks in the list of items using CSS?

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

The display:inline-block property is used to show an element in the inline-level block container. It converts the block of elements into an inline element. Use height and width property to set an inline element. The display property is used to prevent a line break of a list of items.


element {


<!DOCTYPE html>                        
        <title>preventline break in list items</title>
            li {
            h1 {
            h1, h2 {
            body {
        <b>Subjects Of Computer science:</b>
            <li>Computer Network</li>
            <li>Operating System </li>
            <li>Data Structure using C</li>
            <li>Object Oriented Programming Concepts</li>
            <li>Digital Electronics</li>


Supported Browsers: The browser supported by CSS display property are listed below:

  • Apple Safari 3.1
  • Google Chrome 4.0
  • Firefox 3.0
  • Opera 7.6
  • Internet Explorer 8.0

My Personal Notes arrow_drop_up
Last Updated : 10 May, 2019
Like Article
Save Article
Similar Reads
Related Tutorials