HTML & CSS Snippets

Name:Content Box
Description: Fits a content into a set of width and height using overflow property. Useful for shoutbox etc.

Code below...
<!-- Put the CSS style code between your header tags -->

<style type="text/css">
/* You can change pretty much change everything here, width, height, color etc. 
just make sure the overflow property is set to auto. */

#contentbox {
  background: #E5E5E5;
  padding: 5px;
  width: 195px;
  height: 200px;
  overflow: auto; }


<!-- Here's an example -->

<div id="contentbox">
<p>This whole paragraph will be inside the content box with the specified width and height.</p>

<p>There will be a scrollbar when the text are too big to fit in the content box.</p>

<p>This next paragraph should create the scrollbar just to show you what im talking about.</p>

« Back to HTML & CSS Snippets

Home | Site Map | Privacy Policy | Advertising | Contact Us
Copyright © 2006-2014 - All Rights Reserved.
eXTReMe Tracker