Wrap in div

NeoID - June 2, 2009 - 13:26
Project:Vertical Tabs
Version:6.x-1.x-dev
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:by design
Description

I want to theme the tabs (the whole thing)...what's the easiest way of wrapping all tabs in a div with a special class?

#1

quicksketch - June 3, 2009 - 01:49

Not sure why you'd want to wrap the whole thing in another DIV, it's already wrapped in <div class="vertical-tabs"></div>. What are you trying to accomplish?

If you're set on wrapping in another DIV, you can accomplish this by overriding the theme_vertical_tabs() function.

#2

NeoID - June 3, 2009 - 07:54

OK thanks, vertical-tabs does not wrap the whole thing, but uses padding on the left hand side. By having another div around the whole thing I want to add some CSS like border and such.... I have an idea which could end up becoming quite nice... posting pictures when done... :)

Edit: This is how it should look like when I'm done: http://img91.imageshack.us/img91/6725/demotck.jpg

#3

quicksketch - June 5, 2009 - 04:40

Ah I see. It's not impossible, but certainly more difficult without an extra wrapper. You can accomplish a similar effect (minus rounded corners) using something like this:

margin-left:0;
padding:1em 1em 1em 16em;

However this is probably more trouble than it's worth. I'd suggest overriding the theme_vertical_tabs() function and adding another wrapper div. The markup in Vertical Tabs now mirrors Drupal 7 core, so we probably won't change the default markup unless the same changes are made in core.

#4

Dave Reid - November 6, 2009 - 20:43
Status:active» by design

Marking as by design then.

 
 

Drupal is a registered trademark of Dries Buytaert.