Quantcast

Styling Inline <h2> tag vertically

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Styling Inline <h2> tag vertically

Crest Christopher
I'm strictly having to use inline style sheets. My goal is to reposition
the tag I'm about to mention vertically on the page.

I have a <h2> nested within a <span>, when I try to style the <h2> tag I
can't reposition the contents within the tag using margins.  When I
attempt to style the the <span> using margins I also can't reposition
the contents within, although I don't want to style the <span> since
I'll be styling everything within the <span> as well and I strictly want
to only reposition the <h2> tag ?
______________________________________________________________________
css-discuss [[hidden email]]
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 | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Styling Inline <h2> tag vertically

Tom Livingston
On Thu, Feb 23, 2017 at 9:43 AM, Crest Christopher
<[hidden email]> wrote:
> I'm strictly having to use inline style sheets. My goal is to reposition
> the tag I'm about to mention vertically on the page.
>
> I have a <h2> nested within a <span>, when I try to style the <h2> tag I
> can't reposition the contents within the tag using margins.  When I
> attempt to style the the <span> using margins I also can't reposition
> the contents within, although I don't want to style the <span> since
> I'll be styling everything within the <span> as well and I strictly want
> to only reposition the <h2> tag ?


The span is an inline element which doesn't respond to margin styles.
add a declaration for the span to be inline-block (or block) and then
try your positioning.



--

Tom Livingston | Senior Front End Developer | Media Logic |
ph: 518.456.3015x231 | fx: 518.456.4279 | medialogic.com


#663399
______________________________________________________________________
css-discuss [[hidden email]]
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 | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Styling Inline <h2> tag vertically

Philip Taylor (Webmaster, Ret'd)


Tom Livingston wrote:

> On Thu, Feb 23, 2017 at 9:43 AM, Crest Christopher
> <[hidden email]> wrote:
>> I'm strictly having to use inline style sheets. My goal is to reposition
>> the tag I'm about to mention vertically on the page.
>>
>> I have a <h2> nested within a <span>, when I try to style the <h2> tag I
>> can't reposition the contents within the tag using margins.  When I
>> attempt to style the the <span> using margins I also can't reposition
>> the contents within, although I don't want to style the <span> since
>> I'll be styling everything within the <span> as well and I strictly want
>> to only reposition the <h2> tag ?
>
> The span is an inline element which doesn't respond to margin styles.
> add a declaration for the span to be inline-block (or block) and then
> try your positioning.
Do you both believe that an <H2> element can legitimately be a child of a <SPAN> element ?
If so, are you able to cite any W3C specification that permits such a nest ?

Philip Taylor
______________________________________________________________________
css-discuss [[hidden email]]
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 | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Styling Inline <h2> tag vertically

Tom Livingston
I do not. I was assuming the HTML couldn't be changed. The best thing to do
is get rid of the span.


On Thu, Feb 23, 2017 at 5:04 PM Philip Taylor <[hidden email]> wrote:

>
>
> Tom Livingston wrote:
> > On Thu, Feb 23, 2017 at 9:43 AM, Crest Christopher
> > <[hidden email]> wrote:
> >> I'm strictly having to use inline style sheets. My goal is to reposition
> >> the tag I'm about to mention vertically on the page.
> >>
> >> I have a <h2> nested within a <span>, when I try to style the <h2> tag I
> >> can't reposition the contents within the tag using margins.  When I
> >> attempt to style the the <span> using margins I also can't reposition
> >> the contents within, although I don't want to style the <span> since
> >> I'll be styling everything within the <span> as well and I strictly want
> >> to only reposition the <h2> tag ?
> >
> > The span is an inline element which doesn't respond to margin styles.
> > add a declaration for the span to be inline-block (or block) and then
> > try your positioning.
> Do you both believe that an <H2> element can legitimately be a child of a
> <SPAN> element ?
> If so, are you able to cite any W3C specification that permits such a nest
> ?
>
> Philip Taylor
>
--

Tom Livingston | Senior Front End Developer | Media Logic |
ph: 518.456.3015x231 | fx: 518.456.4279 | medialogic.com


#663399
______________________________________________________________________
css-discuss [[hidden email]]
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 | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Styling Inline <h2> tag vertically

Philip Taylor (Webmaster, Ret'd)


Tom Livingston wrote:
> I do not. I was assuming the HTML couldn't be changed. The best thing to do
> is get rid of the span.

OK.   I had in  mind Crest's previous message in which he said he had been booted out of a project because of a coding error on his part.  It therefore seemed wise to warn him that <span><h2>...</h2></span> would count as a pretty egregious coding error to my mind ...

Philip Taylor
______________________________________________________________________
css-discuss [[hidden email]]
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 | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Styling Inline <h2> tag vertically

Karl DeSaulniers
In reply to this post by Philip Taylor (Webmaster, Ret'd)
No he probably copied the code I sent him.
I threw together a quick example that had a span wrapping his elements.
It should have been a div or a paragraph.

Sorry Crest. Update that span to a div if your using my example.


Best,

Karl DeSaulniers
Design Drumm
http://designdrumm.com




> On Feb 23, 2017, at 4:03 PM, Philip Taylor <[hidden email]> wrote:
>
>
>
> Tom Livingston wrote:
>> On Thu, Feb 23, 2017 at 9:43 AM, Crest Christopher
>> <[hidden email]> wrote:
>>> I'm strictly having to use inline style sheets. My goal is to reposition
>>> the tag I'm about to mention vertically on the page.
>>>
>>> I have a <h2> nested within a <span>, when I try to style the <h2> tag I
>>> can't reposition the contents within the tag using margins.  When I
>>> attempt to style the the <span> using margins I also can't reposition
>>> the contents within, although I don't want to style the <span> since
>>> I'll be styling everything within the <span> as well and I strictly want
>>> to only reposition the <h2> tag ?
>>
>> The span is an inline element which doesn't respond to margin styles.
>> add a declaration for the span to be inline-block (or block) and then
>> try your positioning.
> Do you both believe that an <H2> element can legitimately be a child of a <SPAN> element ?
> If so, are you able to cite any W3C specification that permits such a nest ?
>
> Philip Taylor
> ______________________________________________________________________
> css-discuss [[hidden email]]
> 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 [[hidden email]]
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/
Loading...