victoriaely (victoriaely) wrote in lemon_craze,
victoriaely
victoriaely
lemon_craze

If you have a large amount of text and images, you don't always want them to take all you page's space. To do that, you have several options. The most common one is using frames. In my opinion, frames are bad, really really bad :) so we'll use something else.

Here's an example:

<table>



"Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipiscptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?"
Photobucket - Video and Image Hosting
"Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta s voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?"


As you can see, the text on the left is html-formatted and we included an image.
In the box under this text, the html code is not parsed and we can only have text.


</table>

The box on the left is achieved using a small trick, with the overflow property. We are setting the height of the
element and setting the overflow to auto. This way, everythign that would overflow is hidden and a scrollbar is added.

<*div style="PADDING-RIGHT:10px;PADDING-LEFT:10px;OVERFLOW:auto;PADDING-TOP:10px;HEIGHT:480px"*>
(remove *)

For the right-bottom box we use the <*textarea*> tag, which is used to display text 'as is'. We can set the width and height using the cols and rows attributes:
<*textarea cols="20" rows="5"*> (remove *)

The code for the entire table is this: (added one * at the second textarea closing tag so it's displayed properly)
Tags: tutorial : css, tutorial: html
Subscribe
  • Post a new comment

    Error

    default userpic
    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 4 comments