How to have dots as horizontal separator with inline text like in this screenshot?

Tags: css,css3,frontend

Problem :

I was surfing at this iA Blog post the other day and tried to figure out how did they do the dots as separator around the date.

I looked at CSS and figured out it is possible only with their own special font. Is there a way to do that without using their font? What would be some hacks without using images to do the same thing?

Screenshot below:

iA blog

Solution :

I used a negative (relative em) margin to place the header over the dotted top-border of the containing block. This should keep the code save when the font-size changes. See CodePen for an example.

    CSS Howto..

    HTML CSS How to swap css attributes

    How to use css to put an item just above the top of the screen?

    How to position html tag above an image and in the middle?

    How can I place multiple spans in the same line?

    How can I adjust the Wordpress Twentyeleven theme so that the page width is 100% and centered?

    How to make ASP CheckBoxList labels stay on same line as checkbox

    how to use auto with a height in css

    How to make a linear-gradient to fulfill two-coloured body in CSS

    How to deploy just HTML, CSS webpage to jetty?

    How to adjust height based on content css

    How can i fit my webPage in browser when user makes browser window big?

    How can I include an element within a div without using html?

    How to do valid CSS for li text and li text with image?

    How to define `autocomplete=“off”` as a CSS style?

    How to flip an image horizontally halfway through an animation

    how to add a class to buttons attribute using css or jquery

    How to make the long text to fit inside a small div?

    How to give viewers custom CSS option

    How to apply Sticky Table header design on every ajax refresh which is every 30 seconds?

    How to route requests in codeigniter so we can serve static css, js and img files?

    Why the input box is showing so different on Ipad but not on chrome

    If I have 3 elements, how do I only allow one to be highlighted when clicked at any one time? - CSS, jQuery

    How to align contents in different containers using only css

    How to position this div next to others?

    CSS3 - How to “restore” ::-webkit-scrollbar property to the default scroll bar

    How does gmail preserve copy and pasted web content, maintaining the attached CSS?

    How div automatically adjust their size and positions the element inside it

    how to create an anchor point

    CSS div element - how to show horizontal scroll bars only?

    How to check if Html element has a background-image css property in WebBrowser control C#