Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
Iframes question
Avatar
kvr28
Member
Free Members
sp_UserOfflineSmall Offline
Dec 19, 2014 - 9:35 am

this may be a little dense, but, here is the issue I am running into, my wordpress theme handles video embeds and such at 100 percent width for responsiveness, which carries over to the forum, so embedded videos are huge, I know you can add something like this work around that

.spPostContent iframe {
max-width: 640px !important;
max-height: 360px !important;
}

but, that controls all Iframes, such as a imgur gallery, which would be preferable for 100% width, is there anyway to distinguish between the two?

Avatar
Ike
Sawtry, UK
Member
Free Members
sp_UserOfflineSmall Offline
Dec 19, 2014 - 9:45 am

Can you link me to an imgur gallery in a post to take a look?

Avatar
kvr28
Member
Free Members
sp_UserOfflineSmall Offline
Dec 19, 2014 - 9:49 am

sure, he is a video embed as well

http://thehomesteadingboards.c.....to-church/

here is a imgur

http://thehomesteadingboards.c.....table-top/

Avatar
Ike
Sawtry, UK
Member
Free Members
sp_UserOfflineSmall Offline
Dec 19, 2014 - 10:27 am

Well it doesn't look to me like there is any way to differentiate between the two, just being inside the iframe, unless anyone else has any suggestions..

Avatar
kvr28
Member
Free Members
sp_UserOfflineSmall Offline
Dec 19, 2014 - 10:36 am

okay thanks for looking, one way would be to just use the iframes embed code for the videos instead of just posting the link and auto embedding it, but that would only work for me and not the members since they are not allowed to use iframes

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Dec 19, 2014 - 10:39 am

you should be able to target the iframe specifically if it contains and imgur url...  something like:

iframe[src*="imgur"] {...}

of course, replace the ...  with the css you want...

Avatar
kvr28
Member
Free Members
sp_UserOfflineSmall Offline
Dec 19, 2014 - 10:45 am

is that something I could add to my theme custom css?

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Dec 19, 2014 - 10:46 am

not sure exactly what you mean by custom css... but yes, you can add it to your sp theme (child?)...

just not sure what you want to do...

Avatar
kvr28
Member
Free Members
sp_UserOfflineSmall Offline
Dec 19, 2014 - 10:49 am

my wordpress theme I meant, not the sp, I'll give it a shot

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Dec 19, 2014 - 10:52 am

I would expect it should work in either...  though you may have to target a bit more specifically for sp... maybe

#spMainContainer iframe[src*="imgur"] {...}

but without #spMainContainer may work too... just try both :)

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 617
Members: 17359
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10125
Posts: 79620