Posts Tagged ‘dialog’

New design tool features…

March 3, 2008

These new features are so cool, I just have to cross post here in the Tech Blog! Line things up accurately…check! Space things out evenly…check! Follow the link for details…

Please form an evenly spaced single line

To keep things on the tech topic, here’s a little CSS tip on how to center a block element inside another block element. Here’s a CSS class:

.centerme {
  margin-left: auto;
  margin-right: auto;
  width: 140px;
}

And here’s the HTML:


<div style="width: 400px">
<div class="centerme">This is text inside a DIV tag.</div>
</div>

The idea here is that we are setting the left and right margins of the parent DIV to be equal (auto), and the inner DIV, with a width of 140px, automatically gets centered. Neat.


Follow

Get every new post delivered to your Inbox.

Join 630 other followers

%d bloggers like this: