I'm not certain if you'd want h2 and h3 tags, as opposed to using a span
class. For example if your h2 tag was

h2.title {
  font-family: "Open Sans", "Helvetica Neue", "Helvetica", Helvetica,
Arial, sans-serif;
  font-weight: 700;
  font-style: normal;
  color: #FFFFFF;
  background-color: #FF0011;
  text-rendering: optimizeLegibility;
  margin-top: 0.2rem;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.subtitle {
  font-weight: 200;
  font-style: normal;
  color: #999999;
  background-color: #E9E9E9;
}

Obviously, that doesn't take care of the arrow, which can be done via CSS
or an image, and you'll need to adjust width, etc. But that would place all
the text on a single line.

The other idea is, I believe what Foundation by Zurb calls collapsable
division tags. Basically, you'd have one division tag that covers the whole
title, then one for the main title and subtitle, so something like:

<div class="full-title">
    <div class="title"><h2>{title}</h2></div>
    <div class="subtitle"><h3>{subtitle}</h3></div>
</div>

Basically, depending on your CSS, the first declaration of the division tag
would create a row. The next two would be columns or cells within that row,
so you could use the display: cell or  table-cell property. So instead of
creating two rows of data, the tags would display as a single row, like:
{title}  >  {subtitle}.

I'm not certain which approach would be best for your situation, but that's
two possibilities.

Alnisa








.....................
Alnisa Allgood
Executive Director
Nonprofit Tech
t. 608.241.3616
e. [email protected]

..................................................................................


On Mon, Nov 25, 2013 at 3:46 PM, <[email protected]> wrote:

> Hi everyone, I'm sitting here scratching my head on the best way to
> achieve this effect on some h2 and/or h3 tags. What I'm looking to do is
> have a header appear side-by-side with a subhead, have each be a different
> background color, and have a triangle in between them. the width of each
> would be determined by the length of text in the subhead.
>
> Please check out this image to see what I mean:
>
> http://www.em-w.com/bijal/_images/home-revise.jpg
>
> (The red/grey headers are what i'm trying to achieve.)
>
> Does anyone have an suggestions? Thanks in advance!
>
>
> Regards,
> Matthew
> ______________________________________________________________________
> css-discuss [[email protected]]
> http://www.css-discuss.org/mailman/listinfo/css-d
> List wiki/FAQ -- http://css-discuss.incutio.com/
> List policies -- http://css-discuss.org/policies.html
> Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
>
>
______________________________________________________________________
css-discuss [[email protected]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to