Search code examples
cssalignmentcss-float

Aligning objects


This is the complete design I'm going for: enter image description here

And this is the code: http://jsfiddle.net/rlesko/f3R7r/4/

A couple of questions:

  1. Why doesn't a code margin-left do nothing when changed for the object #date?
  2. Do you know of a code that I can use to center a #separator object on a .post-bg (the white background)? I used margin-left for that in my CSS.
  3. How can I align the <h2> text's right border to the <p> text's right border but keep the <h2> text alignment to the right?
  4. Why doesn't a custom font code work for this fiddle?

Solution

  • lots of points are best put into separate questions, but anyway...

    1. It does work! Margin is set to 550px to prove

    2. You can use margin: 0 auto; on the separator element to center it. See here.

    3. Use text-align: justify; for your desired text alignment on both sides. See it here.

    4. I think it has to do with not being able to serve fonts cross-domain. But I am not 100% sure.