If you're the only person publishing content to your site, chances are you avoid the problems of long URLs - in most cases, you don't have to actually display a URL unless its the root domain.
However, there may come a point where you are quoting a line of code or text from else-where that runs on without any spaces (yikes!). At this point in time, CSS doesn't really help you break those long lines with artistic prowess - but it can definately make sure that your template doesn't break.
This fix will add to Joomla's content.html.php file and make sure that any content on your site that runs on is dealt with by including scroll bars where necessary...
...Why we need to edit code is because Joomla automatically wraps the content titles (along with pdf/print/email buttons) in the same styled table as it does to the content itself. What we are going to do is differentiate the two by classing the content:
Firstly, open up '/components/com_content/content.html.php' in a text editor. Then scroll down to about line 500 - you'll see a table classed as 'contentpane' - that's the one we want.
All you have to do is wrap that table in a div - which you can class and style seperately in your main template stylesheet.
For example, I used the class 'content_chunk' and then wrote it in my template_css.css file like this:
width:500px;
overflow:auto;
}
Now save the file and upload it back to your server. That's it! You'll note that the css I wrote does three things for us:
- assigns a (maximum) width to the div,
- tells the browser to create scroll bars whenever content wants to flow over that maximum,
- makes us happy campers! :)
Blog Categories
Latest comments
Friends and collaborators
About the author
why joomla? is mainly contributed to by Qasim Virjee - the Principal @ Design Guru
Subscribe
Sign up to our email newsletter to stay in touch - we send it out monthly and never spam.







This site uses
its very useful
No really,there is no way to describe...
Интересные link:http://goldhumor.ruсп...
Импрессив или как там по русски, впе...
I was looking for a comment solution ...