Why Joomla?
The mission of this blog is to make using joomla simple.
English French German Italian Portuguese Russian Spanish
breaking long URLs...
Posted by: Qasim Virjee on Thursday, 16 November 2006
Print E-mail
(1 vote, average: 3.00 out of 5)

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:

  1. assigns a (maximum) width to the div,
  2. tells the browser to create scroll bars whenever content wants to flow over that maximum,
  3. makes us happy campers! :)
You can also use the 'word-wrap' css property specifically to handle internet explorer - google it . Share Link:
Google Del.icio.us Digg Facebook
Comments
Add New Search RSS
Joomla vs Dupal
posted by Ian on 2008-12-18
If you guys were starting from scratch on a social network for the Brazilian market which one would you choose? Would you go with a Drupal or Joomla! or other? I do not have the technical expertise at all to know the difference.
Sincerely,
Ian
PS - I have heard good things about Elgg and Dolphin too.
Chinese Handicrafts
posted by angel on 2010-03-04
Who can kill time? Who can active brain? Who can increase art cells? Shadow puppet and other various handmade crafts and handmade gifts! The Chinese crystallization of wisdom and also one of Chinese folk art can do it! What are you waiting for? Get some roles in our Chinese handicrafts store for your family and friends, let you play and happy together!
Chinese knot
posted by happy on 2010-03-04
What is made of Chinese knot? Yes! Chinese knot cord! Do you want a different challenge? OK, come to the Chinese knot store, and buy Chinese knotting cord to experience the intelligence of Chinese and weave yourself.
Write comment
Name:
Email:
 
Website:
Title:
UBBCode:
[b] [i] [u] [url] [quote] [code] [img] 
 
Please input the anti-spam code that you can read in the image.
 

Friends and collaborators

About the author

[photo of qasim]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.