Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Does anyone know how to size the content when opening an event with colorboy overlay?
At the moment, I have checked 'open events in colorbox' and have width at 60%. But the content itself isn't at that 60%. What I mean is that the content isn't equally in length as the colorbox width, as you can see in the screenshot.
Any help on how to get it to the edge of the colorbox overlay?
Regards.
Comment | File | Size | Author |
---|---|---|---|
issue colorbox.png | 194.43 KB | Maglor |
Comments
Comment #1
aspilicious CreditAttribution: aspilicious commentedWell you're loading a piece of content into the colorbox. The colorbox will use that piece of content like it is on the original page. (same width, fonts, ...)
This style is made in the template files and the corresponding css. IF colorbox adds a custom css class arround the loaded content you can try to write some specific css for the content when it's inside the colorbox.
But be aware of the risks! If you choose 60% and not for example 700px the box width will be different on every screen.
So the only thing I can think of right now is to:
1) Change the width to a fixed value. (for example 700px)
2) Try to search for a specific colorbox content selector and make it the same size as your fixed value.
Yes it needs a little coding and no you won't be able to do that through the UI. (maybe someone else has an idea how to do this)
Comment #2
tim.plunkettThis will have to be your own custom CSS. As you said, the colorbox is the correct width, you'll likely just need to add
width: 100%;
ormargin: 0;
to whatever is inside it, where appropriate.