| breaking long URLs... |
|
|
| Thursday, 16 November 2006 | |
|
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:
.content_chunk{
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:
|
|
© 2007 Design Guru. Some rights reserved under license. |