So I have been working on a new site and wanted to take advantage of RSS feeds to pull content from other sites. This is a great technique, allowing you to show relevant content without having to write it!
The trouble is, you have no control over this content. If something is there that is too long, it will frequently break the layout of a column, making it grow too big or even worse, drop down in a float drop bug.
While getting the two feeds from the other sites I am involved in, there was a link that was too long and making the column stretch. The solution was actually quite simple though.
I just added this CSS
ul.newsfeed {overflow:hidden;}
This meant that any content in a RSS feed module would not overflow in some messy way. This little line might be worth adding to any templates if you use the Joomla RSS feed module.

Buddy Quaid
said:
|
Overflow is the obvious choice but I don't think it's very elegant. But I just wrote a javascript that you can download that will take all links on the page and shorten them to whatever character count you want and then add '...' to the end. Here is a working page: Demo You can get the javascript page here: Demo You would include this as a external script or you can copy and paste it in the head of the page and you need to call the function shortenURL() from the onload event of the body tag like so: If you already have stuff in onload then just put it at the end of the existing stuff seperated by a semicolon like so: Hope this helps. Feel free to modify it, I'm certainly no javascript expert but thought this would be something I could write. |
Buddy Quaid
said:
|
I sent the links through the email contact form on the site, if you need them through here, here they are: demo link: http://buddyquaid.com/javascript/javascript.htm Javascript source: http://buddyquaid.com/javascript/shortenURL.js If you could change the word DEMO for the second link to "javascript source" that would be great. I copy and pasted the link and just changed the filename but I forgot to edit the "demo". Thanks! |
Clau
said:
|
Hello, i think your website looks amazing. Thanks on the overflow:hidden tip, really helpful. See, i'm new in css and joomla and i was trying to get the double menu like in your page. If you can tell me how you did it, or where i can find it, would mean the world to me. keep up the good work |

Welcome to the new Compass Designs website, powered by Joomla 1.5! The goal of this new site is to be the place to bookmark if you are looking for quality Joomla tutorials, news and tips.


