Jamieɇ Bernard Jamieɇ Bernard - 1 year ago 55
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

Answer Source

Try below

<p style="text-align:center;">HOME </p>
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download