Over a million developers have joined DZone.

Sometimes You've Just Gotta Draw a Line

· Web Dev Zone

Learn why developers are gravitating towards Node and its ability to retain and leverage the skills of JavaScript developers and the ability to deliver projects faster than other languages can.  Brought to you in partnership with IBM.

 I needed a short line in my HTML UI.  Turns out, you can do it with CSS. Here's the code that draws the specific line I needed:

<div
  style="height: 14px;
  color:white; background:white;
  position:absolute; left:77px; top:8px;
  transform:rotate(27deg);
  -ms-transform:rotate(27deg); /* IE 9 */
  -webkit-transform:rotate(27deg); /* Safari and Chrome */
  width:1px"/>
And here's a general-purpose kit for drawing lines a lot, which provided the clues I needed:

http://monkeyandcrow.com/blog/drawing_lines_with_css3/

So now you know.


Make the transition to Node.js if you are Java, PHP, Rails or .NET developer with these resources to help jumpstart your Node.js knowledge plus pick up some development tips.  Brought to you in partnership with IBM.

Topics:

Published at DZone with permission of Jerry Andrews, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}