Forums

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

Home Forums CSS Moving a span inside a h1 to create a-two-part-h1

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

    Hey,
    I am currently having a problem. For a website, I need to style a h1, which is divided into two parts: The first word (in an orange box) and the rest (light blue box). The orange box is on top and left of light blue one, so they just slightly overlay. Here’s my problem: I can’t do it. I try it with adding a span to the first word, I tried moving it with padding, margin and so on. I moved the orange box, but the blue one moves too, every time I move the orange one. I can’t move them individually somehow.

    Here is my code:

    http://codepen.io/anon/pen/vFkqy

    #129597
    yoyo
    Participant

    use position:absolute to move individually

    #129598
    chrisburton
    Participant

    I have no idea of the end result you’re looking for. Maybe it’s just me.

    #129600
    julianlau
    Participant

    Hard to explain, but yoyo was right. Thank you!
    [img]http://i.imagebanana.com/img/xc48zjix/sup.JPG[/img]

    #129601
    chrisburton
    Participant

    Right, okay. That image helps clarify.

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