view raw
Jamieɇ Bernard Jamieɇ Bernard - 8 months ago 25
CSS Question

Putting an <H2> with my text <p> while having it styled with "text-align:center;" don't work

This is for a drop down menu of 4 columns.

On the first column with is the "HOME" within a div, I have the text "HOME" in a tag.


<p style="text-align:center;"> HOME </p>

now if I try an add in
<H2> </H2>
between HOME, it cancels out the text-align:center and just uses the H2.

What so I need to do in the css to keep both the style="text-align:center and H2 in the same tag?....if possible anyway, because I like to keep the text-align:center with H2 on the text in the same paragraph


Try below

<p style="text-align:center;">HOME </p>