html - CSS: Right align a vertically rotated text -
i can't seem align vertically rotated div way right side of page: http://jsfiddle.net/f23w2/2/
html:
<div class="vertical">vertical text</div>
css:
.vertical { position: relative; background-color: #dddddd; padding: 10px; border-radius: 5px 5px 0 0; float: right; -moz-transform: rotate(270deg); /* ff3.5+ */ -o-transform: rotate(270deg); /* opera 10.5 */ -webkit-transform: rotate(-90deg); /* saf3.1+, chrome */ }
- there unwanted margin created between right page border , div.
- top part of rotated div gets cropped.
although can use negative margins work around, wondering if cleaner solution exists.
change origin of rotation transform via transform-origin: 100% 100%;
new fiddle
Comments
Post a Comment