Closed (outdated)
Project:
Better Messages
Version:
6.x-1.13
Component:
Other
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
31 Jul 2010 at 13:14 UTC
Updated:
4 Jan 2018 at 13:46 UTC
Jump to comment: Most recent
I needed to implement a background in the template file (lightbox-like effect).
Here is what I did, nothing huge, but still worth to add it in the doc if it can help someone.
Copy the better_messages.tpl.php file from module into your theme.
Change those lines :
<div id="better-messages-default">
<div id="messages-inner">
<table><tbody>
per :
<div id="better-messages-default">
<div style="background-color:#A6A6A6; position: fixed; top: 0; left: 0; width: 100%; height: 100%; -ms-filter:'progid:DXImageTransform.Microsoft.Alpha(Opacity=50)'; filter: alpha(opacity=50); opacity: .5;"></div>
<div id="messages-inner" style="overflow: visible; display: block; position: fixed; z-index: 9999; width: 400px; top: 30%; left: 30%;-ms-filter:'progid:DXImageTransform.Microsoft.Alpha(Opacity=100)'; filter: alpha(opacity=100); opacity: 1;">
<table><tbody>
Change the color code (grey) #A6A6A6 per your own...
Edouard
Comments
Comment #1
drupalorg commentedHello, I tried this script, it works but I have problems!
Using the "position: fixed", I can not chiuedere more posts by drupal. Clicking on the X and nothing happens. Can you help me?
Comment #2
rutiolmaHi,
nice trick Edouard.
I didn't have problem with this script as it is, but I think it's better not give any style to #messages-inner and let better-messages deal with it.
Cheers
Comment #3
bucefal91 commentedThe 6.x version is no longer supported.