By turtle182 on
I've installed the Events module and I've been having trouble making things fit in my site. I've made a fixed width template, but the calendar pushes my left menu out too far. I tried changing the width of the event-calendar class in event.css file but it doesn't seem to have any effect.
Also, I'd like the text in the day-view of an event not extend beyond the bounds of the event box. I've managed to get this width set but the text keeps going well beyond the edge of the page confines.
Any advice would be greatly appreciated.
You can view the site at http://www.plymouth-nh.org and click on the event for August 29 to see what I'm writing about.
Comments
random
I can't remember now, but isn't there a css setting that will force text to 'wrap' within a css box?
My book is at home, so hopefully someone else will speak up before I get off work
-sp
---------
Test sites and good habits: Drupal Best Practices Guide.
Misc Black Mountain
-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide
Wide Event
From what I can tell it looks like the P tag is extending beyond its container. One test that you could do would be to define the P tag as to width just to see if it would work by adding it to your CSS.
The additional color is just a check to make sure that something happens and should be removed once it works.
Of course this will change all of the P tags. It looks like event dayview p may work to limit the width to only that p tag, maybe.
or you can try and add a width to this event.css style and see what happens.
Let me know if you find a solution as I have not tested this possibility.
Jim
No Such Luck
Thanks for the suggestion, Jim, but none of these seemed to do the trick. As far as I can tell the trouble has to be with the Event module because When I get the preview on adding the item, it all wraps just fine. I even tried changing the CSS for the flexinode-textarea-3 div that it is put into, but that didn't solve the trouble.
The color of the text changes just as it should, but still I get the overflow issues.
Calendar Width
I still can't get the actual calendar in the left sidebar to resize, either. Hasn't anyone used the Events calendar and resized it? This seems like such a simple thing to want to accomplish yet I seem to finding no simple way to do this.
Width of Calendar
I assume that you are using the event module for your theme to add the calendar of events. If so, I had removed the CSS file for that module as a test and found that I liked it better without the added event.css file.
Go to modules > event > event.css and just rename the file to perhaps event_org.css. That will take it out so that it can be replaced once you see if its removal is a plus or a minus. If nothing good happens just rename to event.css and life will go on as usual. If it does make a positive change, then put in a blank event.css file to keep the Drupal log happy as it will log the missing event.css file.
Can't say if this will solve you issue, but it will tell you if event.css has any effect on your line length.
One other thing to consider is that in some cases certain themes have CSS that will override event.css. Just one more thing to think about!
Jim
webdeveloper toolbar
Get the webdeveloper toolbar for Firfox.
It shows your calender in the sidebar are controlled by
-sp
---------
Drupal Best Practices Guide - My stuff Black Mountain
-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide
Fixed Calendar Width but not Event Width
Thanks to bomarmonk, I was able to finally get the calendar width under control. The trouble was the day headers themselves. The Sun, Mon, Tue, Wed, etc. abbreviations were preventing the table from getting any smaller. The solution I used was identical to his: reduce these header abbreviations even further to S, M, T, W, etc.
I still have an issue with the text from the event in the dayview overflowing. Upon further examination I found that the title for the event didn't overflow but in fact wrapped. It seems that only the custom fields created using flexinode (I created a new content type called Events for calendar inclusion only) were the source of the problem.
I tried creating custom CSS in event.css for these divs but nothing worked.
Any suggestions?
Forget it
I decided it's really not worth the headache to have the additional information in the teaser. I've disabled showing the info in the teaser. Visitors will just have to click on the link for the event itself to find out more information.
how did you make this change ?
I've looked through (some) of the events code and can't find where to change mon to m. Could you share how you managed this.
thanks
Here's the code to change...
I'd be glad to share! Open events.module and look for (around line 1134):
Change this code to:
Obviously make sure the really long lines remain one line. Essentially what you're doing is going through and replacing all the Mon, Tue, Wed, etc. with the first letter of each or whatever you prefer. This or shrinking the font size are the only ways I know to reduce the width of the Events calendar block.
it's so easy
srturtle!
thanks for good idea!its for me the best way to change width of the events calendar.
This change worked for me.
I did not have an issue with the event calendar when using the Bluemarine theme; however, I recently changed to Sands and the calendar width became wider that the column that was supposed to contain it. Using the above-posted solution solved the problem. Additionally, I was able to use the abbreviations: M, T, W, Th, F, S, Su for Monday through Sunday, respectively. This keeps me from confusing Tuesdays and Thursdays and Saturdays and Sundays. ;-)
Change event.css too
If you make this change don't forget to add td.s to event.css so that the weekends still display the background color:
.event-calendar td.sat, .event-calendar td.sun, .event-calendar td.s {
background: #fdd;
}
work around for 5.x
For drupal 5.x, you can add this snippet to your template.php:
If you want to show the abbreviations only in block, customize it with:
Regards,
Leo
Here is the solution to a
Here is the solution to a somewhat similar problem that someone had with text wrapping in day view of the calendar. Might give you some pointers:
http://drupal.org/node/27012#comment-53494
Thanks!
Thanks for the pointer! I'll try it out later and let everyone know how it worked.
Nope
This didn't work for me, unfortunately. Still not wrapping.
here's a fix for day view.
i put this in the 'issues' area.. i dunno how to get the attention of a developer who can fix the code...
problem: the event day view does not wrap the text.
why: this is due to the prescence of the form-item class, which in the drupal.css has the attirbute: white-space:nowrap;
fix: therefore, by adding this below at the end of the event.css stylesheet, this solves the problem. i've nested the classes, so it should only affect the event module.
.event div.form-item {
white-space: normal !important;
}
bon chance!
filing
an issue against the project is how to get the attention of the module developer. :)
-sp
---------
Test site, always start with a test site.
Drupal Best Practices Guide -|- Black Mountain
-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide
You can file an issue
You can file an issue here:
http://drupal.org/project/issues
You need to select the appropriate module from the first drop-down list.
yep, did that
on 12 sep.
http://drupal.org/node/30990
i'm sure someone will work it in eventually.
Yeah, I tried that and still
Yeah, I tried that and still the text did not wrap. Oh well. I've just gotten rid of any teaser on the event.
I have to admit I'm getting very discouraged with Drupal. It's great if you want a blog, but if you want a real site with sensical organization, it's really not that great. It's too much work for something that really only fulfills a niche: blog sites.
Now if only Mambo had granular user management, I'd use that instead. :(
Don't be discouraged. The
Don't be discouraged. The following thread gives you excellent ideas on how to set up a typical site with drupal:
http://drupal.org/node/31896
Reducing cell padding via CSS
An approach I used in trying to make Sands work with the event module calendar block is adjusting the padding of the table cells. Place in some convenient CSS file:
The first rule reduces the padding on the table elements. The optional second rule makes any links in these elements blocks so they expand to fill their container. This is nice, as since they are smaller they are now also easier to click.
This may not work universally but it works for me.
__
Personal home page | Rhombic Networks: Drupal-friendly web hosting
Gracious!
After having tried all the other solutions this finally worked for me! Thanks so much !
Add Style Selector
I had the same problem using a fixed-column-width for blocks. My solution was to add the following to event.css right after the .event-calendar td.days selector:
This allowed the font for the days header to remain normal in areas outside of a block.
CSS Change
That did the trick. Thanks!!
Take Care, Sharon
resizing the "calendar to browse events" block for fixed width
This method worked and this is one of the best discussion threads I've found as far as completing a site from scratch with not alot of drupal experience. The oversized "mini-calendar" with a fixed width theme was a real stumbling block.
Almost all themes that I chose had this issue, so I sat out to try and fix this. I personally believe that the events.css might have a couple of bugs in it, because I couldn't get much change to happen by modifying .event-calendar td.days or .block-event-0 th.days
I ended up eventually adding this code:
Unfortunately, this code DID NOT work.
This code also DID NOT work
For some unknown reason, I had to specify #block-event-0 instead of #block-event and I also have to specify th.sat, th.sun, etc. instead of just th.days to get it to work.
Thanks for the great tip, now I can move along with my drupal community portal site.
success at last
Thanks cookiesunshinex, your code worked for me, and like you, I found that the other two you listed did not work.
Just pasted the code to the bottom of the event.css and bingo!
#block-event-0 th.sun, #block-event-0 th.sat, #block-event-0 th.mon, #block-event-0 th.tue, #block-event-0 th.wed, #block-event-0 th.thu, #block-event-0 th.fri { color: black; font-size: xx-small; background-color: #aaaacc; }See also...
I had the same problem. I think it mentions in the module documentation that the CSS does not work fully in IE. See:
for more info, such as narrowing the top-level table for the Calendar page, and tidying up the cell layout. (I shrank fonts for the sidebar block - no need to mess with padding - and narrowed the page table to 97% to fit in the IE window - doesn't look too hideous in FF so will not try any CSS hacks).
I'm all sorted now - I've even managed my first post on drupal.org - Hi everyone, I'm hoping to contribute in the near future (once I've found my feet). In the meantime, I really appreciate the effort that everyone puts into the forums.
Code snippet for 5.x
Leo (tjerah) above gave some code that will help you selectively reduce the day name to a single letter on the block only (M instead of Mon). However, it "broke" the regular full month view. Here is the full code snippet to add to your template.php file to autochange the day name on the block view (replace yourThemeName with your theme name ;)
Thanks Leo - this is certainly an example of standing on the shoulders of giants. I couldn't have done it without you.
regards,
Ron
regards,
Ron Northcutt
Directory of Technical Marketing, Acquia
Thanks
Thanks rlnorthcutt. It worked for me. I just had to add */ above the function to make it work. I'm a newbie and I'm not sure why I had to do that (to close the comment?), but I noticed it on the others comments in my template.php file (zen template).