Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS [Solved] Creating a dynamic underline for a heading

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #27652

    I am working on a design and want to create an underline background for a heading which can expand or shrink depending on the heading.

    [img]http://demowebsite.co.nz/heading.png[/img]

    The code for the heading is <h1><img(the stars in front which is inserted using jQuery)/>The Wahine Disaster<img(second stars at right)/></h1> . What is the best way to do this?

    #69721
    TheDoc
    Member

    You can actually apply a background to H1 elements. You can style them just like you would a div.

    #69758

    How do I get the H1 to fit tight to the text and also center the heading in the middle of the page?

    #69759
    TheDoc
    Member

    I’m not sure what you mean by "fit tight to the text", but you can apply a height to h1.

    Do you have a link of where you’re working on it?

    #69760

    FIXED!!!

Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘CSS’ is closed to new topics and replies.