A control to display html code
Many products are displayed on a page, each product has a long text description, which is dynamically created by php.
I displayed product description in a <div>, but text is too long.
I want a simple TAG, i.e. <textarea> to restrict text in a small area.
But <textarea> doesn't show html TAG or format.
Do you know which TAG or control can do this?
you can show in a div with showable height and width and with the style to scroll
He means use something like:
In other words, enclose the PHP code that outputs the product description with <div> tags as shown above, and adjust the 'width' and 'height' settings in the style attribute as needed.
<div style="width:250px; height:120px; overflow:scroll;">
<?php echo($description); ?>
It's exactly what I need.
Thanks a lot.
use code with fixed (CSS) width and height, and then apply attribute "overflow:scroll"
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)