How to Hide Overflowing Content Using CSS

104 8
    • 1). Right-click the HTML file that contains the content you want to edit. Click "Open With" and then click your HTML editor in the program list.

    • 2). Scroll down to the content you want to truncate. If you do not already have a div container around your content, you can add one. Embed your content within the following HTML tag:

      <div> </div>

    • 3). Add the "overflow" style to the div tag. The following CSS is added to the div tag and shows you how to hide content that overflows in the div tag:

      style="overflow: hidden;"

    • 4). Save the CSS changes and open the file in your Web browser. Notice the content that passes the end of the div is hidden from view.

Source...
Subscribe to our newsletter
Sign up here to get the latest news, updates and special offers delivered directly to your inbox.
You can unsubscribe at any time

Leave A Reply

Your email address will not be published.