Welcome to Geeklog, Anonymous Thursday, January 02 2025 @ 07:55 pm EST

Geeklog Forums

Can you designate classes to individual blocks?


Status: offline

Jay

Forum User
Junior
Registered: 02/14/07
Posts: 16
Location:Beverly, MA
I'm trying to load an iframe up into a side block, and have all the padding and margins removed from the block. I can do it in a CSS file, but it effects all the blocks. Is there a way to designate a class an individual block? If not, how would I have a firefox/IE friendly block with an iframe in it, and no space around the iframe content (in this case a picture slideshow) ?

Thanks.
-Jay
I leave carnage in my wake.
 Quote

Status: offline

samstone

Forum User
Full Member
Registered: 09/29/02
Posts: 820
Have you tried simply putting the ifram in a normal block? I did it years ago, but I haven't done it with the new Geeklog versions.

Sam
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
You can use different templates for each block. Check the code in the theme's functions.php. It only checks if a block is on the left or right side, but using the same approach, you can extend it to use blockheader-foo.thtml for a block called "foo".

bye, Dirk
 Quote

Status: offline

Jay

Forum User
Junior
Registered: 02/14/07
Posts: 16
Location:Beverly, MA
Ah, that'll make things easier. I successfully hacked the associated help file to act as an individual CSS, but the method you mentioned sounds better so I'll give it a shot. MSIE is the devil.
I leave carnage in my wake.
 Quote

Status: offline

Jay

Forum User
Junior
Registered: 02/14/07
Posts: 16
Location:Beverly, MA
Ok, one problem here. I'm not using the professional theme, and the theme I am using (modified XSilver) has an empty functions.php file. I tried copying the pro themes functions.php file, but it just removed all the blocks from my page.
I leave carnage in my wake.
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
You will have to adapt the code a bit, mainly the names of the block template files.

The original article describing this technique is here.

bye, Dirk
 Quote

Status: offline

Jay

Forum User
Junior
Registered: 02/14/07
Posts: 16
Location:Beverly, MA
Alright, I got the template thing to work. One problem still remains, there is a padding issue, or a margine issue for just the right side of the frame. I can't seem to figure it out. I've tried everything. It works in Firefox, but in MSIE I still get a 10 pixel or so gap on the right side. You can view it here:

http://darcsystems.com/index.html scroll down on the left, you'll see a slideshow and you'll see the gap.

The gap is like 2 or 3 pixels in firefox, which it's adding for no apparent reason.
I leave carnage in my wake.
 Quote

All times are EST. The time is now 07:55 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content