• Resolved mismatchedpear

    (@mismatchedpear)


    I am looking for advice on how to make the “margin-right” a negative value on my H2 on the sidebar.

    If you would, please, check out my client’s project: https://dirtysmoke.com/

    On the left, you will see the <h2> and <h3> a negative value, trailing off the side. I would like that the same way on my sidebar (except off the right edge, not left).

    Thank you kindly!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter mismatchedpear

    (@mismatchedpear)

    I don’t even know if I will like how it will look yet – I just need to get it to work to see if I like it or not! Ha!~

    esmi

    (@esmi)

    Something like:

    position:relative;
    right:-80px;

    should do it.

    Thread Starter mismatchedpear

    (@mismatchedpear)

    Thanks Esmi!

    The “right:-50px” does it proper.

    But unfortunately I ran into another problem! I would like to have my Headers’ backgrounds cover only as wide as the text, instead of the header bg color extending the entire width of its parent element. Does that make sense? In comparison: the header on the very top of the page vs. a log post header.

    The way I have achieved this is by using “Display: Table” — I do not know the official use of Display table, but it seemed to work fine for me. But in this specific incident Display Table is preventing me from using “text-align:right” That I may align my sidear on the right wall of #content.

    Is there a way of achieving the same results of Display Table while also aligning my Sidebar H2 to the right and applying “Right:-50px”?

    Woo, what an elaborate explanation!
    You’re utmost helpful. Thanks!

    Thread Starter mismatchedpear

    (@mismatchedpear)

    Two min. after posting, Display: Inline fixed the problem.

    [RESOLVED BUTTON]

    Jonas Grumby

    (@ss_minnow)

    I’m guessing that right now the red background color is a property of #header. Try making it a property of #header h2 instead.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Question about Margins’ is closed to new replies.