Wrap multi-content blocks with div and then style?
Teetime
Registered Users Posts: 202 Major grins
I have numerous places where I have an HTML content block followed by several video content blocks. I would like to visually connect the HTML text content block with the video content blocks by enclosing them all in a shaded background. I suspect this could be done if I could wrap these content blocks with a div wrapper, and then style the div. Is that possible in SM, or is there a better way?
Jerry
0
Comments
require separate CSS rules in the "Just This ...." CSS widget. Add a background to each rule.
Each widget has a unique class name
like this. You might also have to play with each widget height in the CSS.
My Website index | My Blog
description or caption. And you can not add widgets in html boxes/widgets to get a
around them.
Take a look at my Guestbook, three widgets side by side. 2 slideshows and html widget.
I have a border around all the widgets including comments using the butt together method.
Each has the same background applied so it all looks like one box.
My Website index | My Blog
That's probably an easier place to apply background and any border.
My Website index | My Blog
Thanks, I'll try that Allen. In the meantime I accomplished it block by block per your previous instructions and it was easy enough thanks to your instructions. I've finally gotten proficient at finding the page element id via the Chrome inspector so that is progress.
One more question please. How can I extend the background a few pixels below the edge of the Vimeo video content block (see image). I tried this but it extended the white portion rather than the shaded portion:
[HTML].sm-page-widget-12446899{ margin-bottom:50px !important; }[/HTML]
I tried this CSS above and below the shading CSS but neither extended the shaded area. I suppose I could add a one line HTML block below the Vimeo block and style and nudge it, but is there a CSS way to extend the bottom margin of the Vimeo block?
Allen, I really appreciate your willingness to share your knowledge here!
My Website index | My Blog
Makes sense and worked nicely. Thanks again!
This might be a bit astray from the topic, but maybe not. This code from Allen:
I have it in this gallery (gallery css):
http://www.joinrats.com/ModifyBehavior/The-Heart/
It was, Allen, part of your original code to put titles and captions on the right side in collage landscape galleries. (Thread http://dgrin.com/showthread.php?t=255309, #10 post.)
Anyway, the code has an interesting effect if you add borders, in that each content block gets it's own border.
This kind of achieves what your Guestbook achieves, except the background color goes all the way to the top.
My Website index | My Blog
will do that. It goes in the gallery CSS. This code doesn't requires butting widgets together so that the background borders merge. It acts like a DIV grouping all content blocks. The only "additional" side effect is that the background goes up to the top of the page, all page content, top to bottom.
Then you could give the left and right edges, borders. Or, borders to all four sides of each content block, but the latter would be a very different format choice.