Home › Forums › Ticket Products › Eventbrite Tickets › Change Eventbrite iframe width
- This topic has 5 replies, 2 voices, and was last updated 8 years, 2 months ago by Geoff.
-
AuthorPosts
-
February 22, 2016 at 6:46 am #1079705SheaParticipant
Hi,
I am trying to change the Eventbrite iframe width. I tried to follow the steps in this link https://theeventscalendar.com/knowledgebase/changing-the-height-of-the-eventbrite-tickets-iframe/ and adjusted the code to be:
add_filter('tribe_template_factory_debug', 'change_eb_iframe_width');
function change_eb_iframe_width($html) {
if (false === strpos($html, 'eventbrite-ticket-embed')) return $html;
return str_replace('style="100%', 'style="96%', $html);
}I have also tried to target the CSS with classes and id’s and adding the !important tag to overwrite what is coming over, with no luck.
#ticket_information_wrapper .panel_628 {
width: 96% !important;
}Any help is greatly appreciated. Thanks!
February 22, 2016 at 4:49 pm #1080325GeoffMemberHi Shea,
Happy to help here! Would be willing to share a link to an example from the site you’re working on? I was able to change the form width using the tutorial but want to look at your site in case there’s something else to consider in the mix.
Thanks!
GeoffFebruary 23, 2016 at 5:27 am #1080625SheaParticipantThis reply is private.
February 23, 2016 at 7:29 am #1080681GeoffMemberHi Shea,
Yeah, there are a ton of wrappers on that iframe object, so it can be tough to override the width without it being overwritten by the width of another parent element.
This seemed to do the trick when I was scoping out the site using DevTools:
.eventbrite-iframe { width: 96% !important; }
That should work given that it is the very top element in the cascade, even above the iframe itself. And, since all other widths are percentages, this will base all the other widths on this 96%.
Let me know if that works. 🙂
Cheers!
GeoffFebruary 23, 2016 at 7:55 am #1080696SheaParticipantHi Geoff,
That worked, thanks so much for your help!
- This reply was modified 8 years, 2 months ago by Shea.
February 24, 2016 at 7:06 am #1081403GeoffMemberMy pleasure, happy to be of service! Feel free to let us know if any other questions pop up and we’ll be here to help. 🙂
Cheers,
Geoff -
AuthorPosts
- The topic ‘Change Eventbrite iframe width’ is closed to new replies.