"Div" tag elements provide HTML developers with containers, so you can format text and layouts in your web pages. The default setting for a div lets the text overlap over other div elements on your pages. You can override this default by setting the "overflow" property to scroll or clip the overlapping text. This means that a scroll bar is shown or the text is cut off if it extends the width or height of the div element.
Right-click the HTML file that contains the div element you want to edit. Click "Open With" in the popup menu. Double-click the HTML editor you want to use to edit the div tag properties.
Scroll down the HTML page to the div you want to edit. You can also do a quick find for the element by pressing "Ctrl" and "F." This key combination opens the "Find" text box. Type the div tag's name in the text box, and press "Enter."
Type the following CSS code in the div tag to add a scroll bar to the element if text overflows:
If you want to clip the text and leave out the scroll bar, use the following CSS code instead:
Press the "Ctrl" and "S" combination to save the changes. If you want to view the changes before publishing to your website, double-click the HTML file on your hard drive to view it in your browser.
Overlapping Text on Web Pages
While standard text spaces out text so that letters do not overlap, overlapping text displays words partially on top of one other....
How to Prevent Left Floats From Wrapping
Unlike its counterpart HTML, CSS is a language used by designers to create the visual look of a webpage. Float is a...
How to Make DIV Scroll With a Page Using CSS
When designing your website, you may have a specific DIV container that you want to remain visible to your visitors at all...
How to Align Divs Horizontally in CSS
Using the HTML div tag for positioning elements on a webpage is the de facto approach to Web design and layout. However,...
How to Stop DIV Overlapping
Web designers often need to specify the height, width and positioning of the individual DIV containers in HTML pages relative to the...
How to Code a DIV Overlay
Cascading Style Sheet, or CSS, overlays give you the ability to position objects over other objects on a Web page. DIV elements...