I am having a slight issue with my HTML due to improper nesting. When attempting to click my links in Chrome it properly anchors to a set point. However, in Internet Explorer, Mozilla Firefox, and Edge it does not. In fact it seems as if the link is disabled. How would I go about cleaning up my nesting to fix this issue?
body{
margin: 0;
font-family: 'Raleway', sans-serif;
background: #2e2e2e;
overflow-x: hidden;
}
*{
transition: .3s;
}
#abt{
width: 100%;
height: 100vh;
background-color: cyan;
}
#hero{
height: 50%;
min-height:400px;
width: 100vw;
background: url("imgs/space2.gif");
background-size: 11%;
text-align: center;
display: flex;
flex-direction: column;
justify-content: center;
transition: none;
-webkit-transform-origin: left bottom;
-ms-transform-origin: left bottom;
-moz-transform-origin: left bottom;
-o-transform-origin: left bottom;
transform-origin: left bottom;
-webkit-transform: skewY(-3deg);
-ms-transform: skewY(-3deg);
-moz-transform: skewY(-3deg);
-o-transform: skewY(-3deg);
transform: skewY(-3deg);
z-index: -1;
}
#hero h3 img{
height: 1em;
-webkit-transform-origin: left bottom;
-ms-transform-origin: left bottom;
-moz-transform-origin: left bottom;
-o-transform-origin: left bottom;
transform-origin: left bottom;
transform: skewY(3deg);
}
#hero h1{
font-size: 3.5em;
color: rgb(245, 251, 255);
margin: 0;
margin-bottom: 1.5vh;
font-weight: 100;
text-shadow: 0 1px 0 #d1d1d1,
0 2px 0 #909090,
0 3px 0 #626161;
margin-left: 5vw;
margin-right: 5vw;
margin-top: 3vh;
-webkit-transform-origin: left bottom;
-ms-transform-origin: left bottom;
-moz-transform-origin: left bottom;
-o-transform-origin: left bottom;
transform-origin: left bottom;
-webkit-transform: skewY(3deg);
-ms-transform: skewY(3deg);
-moz-transform: skewY(3deg);
-o-transform: skewY(3deg);
transform: skewY(3deg);
}
#hero h3{
font-size: 1.5em;
color: rgb(245, 251, 255);
margin: 0;
font-weight: 100;
text-shadow: 0 1px 0 #d1d1d1,
0 2px 0 #909090,
0 3px 0 #626161;
-webkit-transform-origin: left bottom;
-ms-transform-origin: left bottom;
-moz-transform-origin: left bottom;
-o-transform-origin: left bottom;
transform-origin: left bottom;
-webkit-transform: skewY(3deg);
-ms-transform: skewY(3deg);
-moz-transform: skewY(3deg);
-o-transform: skewY(3deg);
transform: skewY(3deg);
}
#options{
margin-top: 5vh;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 3vh;
margin-top: 3vh;
-webkit-transform-origin: left bottom;
-ms-transform-origin: left bottom;
-moz-transform-origin: left bottom;
-o-transform-origin: left bottom;
transform-origin: left bottom;
-webkit-transform: skewY(3deg);
-ms-transform: skewY(3deg);
-moz-transform: skewY(3deg);
-o-transform: skewY(3deg);
transform: skewY(3deg);
}
#options button{
color: rgba(78, 78, 78, 0.92);
background: rgb(245, 251, 255);
border: none;
border-radius: 3px;
padding: 5px;
padding-left: 15px;
padding-right: 15px;
font-size: 1.2em;
margin: 5px;
}
<div id="backdrop">
<div id="hero">
<h1>Haca</h1>
<h3>Student</h3>
<div id="options">
About Link
</div>
</div>
<div>
<div id="abt">About Section</div>
</div>
Thanks for your help.
For your z index in your #hero id, you need to change it to something other than -1. I just turned it off and it works. Let me know if that solves it for you. New CSS should look like this:
#hero{
height: 50%;
min-height:400px;
width: 100vw;
background: url("imgs/space2.gif");
background-size: 11%;
text-align: center;
display: flex;
flex-direction: column;
justify-content: center;
transition: none;
-webkit-transform-origin: left bottom;
-ms-transform-origin: left bottom;
-moz-transform-origin: left bottom;
-o-transform-origin: left bottom;
transform-origin: left bottom;
-webkit-transform: skewY(-3deg);
-ms-transform: skewY(-3deg);
-moz-transform: skewY(-3deg);
-o-transform: skewY(-3deg);
transform: skewY(-3deg);
}
Related
I have an animation for a div that looks like a heart and am trying to put some text next to the heart div when the animation finishes. I tried putting text in a div and positioning that next to the heart but the invisible part of the heart keeps pushing it around or sometimes the div with text isn't visible at all. some help would be appreciated. Here is the code:
body {
overflow: ;
}
#heart {
position: relative;
width: 1000px;
height: 900px;
left: 300px;
top: 200px;
color: blue;
z-index: 2;
animation-name: example;
animation-duration: 4s;
animation-delay: 1s;
animation-fill-mode: forwards;
}
#heart:before,
#heart:after {
position: absolute;
content: "";
left: 50px;
top: 0;
width: 50px;
height: 80px;
background: red;
-moz-border-radius: 5000px 5000px 0 0;
border-radius: 5000px 5000px 0 0;
-webkit-transform: rotate(-45deg);
-moz-transform: rotate(-45deg);
-ms-transform: rotate(-45deg);
-o-transform: rotate(-45deg);
transform: rotate(-45deg);
-webkit-transform-origin: 0 100%;
-moz-transform-origin: 0 100%;
-ms-transform-origin: 0 100%;
-o-transform-origin: 0 100%;
transform-origin: 0 100%;
z-index: 2;
}
#heart:after {
left: 0;
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
-ms-transform: rotate(45deg);
-o-transform: rotate(45deg);
transform: rotate(45deg);
-webkit-transform-origin: 100% 100%;
-moz-transform-origin: 100% 100%;
-ms-transform-origin: 100% 100%;
-o-transform-origin: 100% 100%;
transform-origin: 100% 100%;
z-index: 2;
}
#keyframes example {
0% {
position: absolute;
z-index: 2;
-webkit-transform: rotate(-45deg);
-moz-transform: rotate(-45deg);
-ms-transform: rotate(-45deg);
-o-transform: rotate(-45deg);
transform: rotate(-45deg);
-webkit-transform-origin: 0 100%;
-moz-transform-origin: 0 100%;
-ms-transform-origin: 0 100%;
-o-transform-origin: 0 100%;
transform-origin: 0 100%;
}
50% {
left: 0;
z-index: 2;
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
-ms-transform: rotate(45deg);
-o-transform: rotate(45deg);
transform: rotate(45deg);
-webkit-transform-origin: 100% 100%;
-moz-transform-origin: 100% 100%;
-ms-transform-origin: 100% 100%;
-o-transform-origin: 100% 100%;
transform-origin: 100% 100%;
}
100% {
z-index: 2;
}
#lol {
position: absolute;
right: 100px;
top: 200px;
font-family: Quicksand;
color: black;
}
<html>
<link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Quicksand" />
<body>
<div id="heart"></div>
<div id="lol">#Forever Alone</div>
You possibly missed the { after . That is,
100%{
z-index:2;
}
#lol {
should be
100% {
z-index: 2;
}
}
#lol {
Hope it helps!
The weird formatting is because you just need to add another closing bracket after you're done declaring your #keyframes (just before #lol).
#heart {
position: relative;
width: 1000px;
height: 900px;
left: 300px;
top: 200px;
color: blue;
z-index: 2;
animation-name: example;
animation-duration: 4s;
animation-delay: 1s;
animation-fill-mode: forwards;
}
#heart:before,
#heart:after {
position: absolute;
content: "";
left: 50px;
top: 0;
width: 50px;
height: 80px;
background: red;
-moz-border-radius: 5000px 5000px 0 0;
border-radius: 5000px 5000px 0 0;
-webkit-transform: rotate(-45deg);
-moz-transform: rotate(-45deg);
-ms-transform: rotate(-45deg);
-o-transform: rotate(-45deg);
transform: rotate(-45deg);
-webkit-transform-origin: 0 100%;
-moz-transform-origin: 0 100%;
-ms-transform-origin: 0 100%;
-o-transform-origin: 0 100%;
transform-origin: 0 100%;
z-index: 2;
}
#heart:after {
left: 0;
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
-ms-transform: rotate(45deg);
-o-transform: rotate(45deg);
transform: rotate(45deg);
-webkit-transform-origin: 100% 100%;
-moz-transform-origin: 100% 100%;
-ms-transform-origin: 100% 100%;
-o-transform-origin: 100% 100%;
transform-origin: 100% 100%;
z-index: 2;
}
#keyframes example {
0% {
position: absolute;
z-index: 2;
-webkit-transform: rotate(-45deg);
-moz-transform: rotate(-45deg);
-ms-transform: rotate(-45deg);
-o-transform: rotate(-45deg);
transform: rotate(-45deg);
-webkit-transform-origin: 0 100%;
-moz-transform-origin: 0 100%;
-ms-transform-origin: 0 100%;
-o-transform-origin: 0 100%;
transform-origin: 0 100%;
}
50% {
left: 0;
z-index: 2;
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
-ms-transform: rotate(45deg);
-o-transform: rotate(45deg);
transform: rotate(45deg);
-webkit-transform-origin: 100% 100%;
-moz-transform-origin: 100% 100%;
-ms-transform-origin: 100% 100%;
-o-transform-origin: 100% 100%;
transform-origin: 100% 100%;
}
100% {
z-index: 2;
}
}
#lol {
position: absolute;
right: 100px;
top: 200px;
font-family: Quicksand;
color: black;
}
How to place an image centrally over another image?
I tried the answers from so many similar questions, but none of them work for me.
Basically I need the 2 images to become 1 and
it MUST be RESPONSIVE(so the size changes automatically when different screen size devices access the web page.)
The heart and ring should remain the same position to each other when user resize his or her screen(or web page window size etc.)
I am trying to use css to draw both the ring and the heart, but it is okay if you really need the picture to replace the ring or heart.
Here is my code, I have been working on it for hours but haven't got any good luck.
http://jsfiddle.net/4u6tfacw/
Thank you.
Here is my code
<div id="logo">
<div id="heart-container">
</div>
<div id="heart">
</div>
</div>
#logo {
width: 50%;
height: 50%;
}
#heart {
display: block;
position: absolute;
top: 70px;
left: 30px;
z-index: 1;
width: 70%;
height: 70%;
}
#heart-container {
display: block;
position: absolute;
top: 0;
left: 0;
/*bottom:0;
right:0;*/
z-index: 1;
width: 70%;
height: 70%;
}
#heart-container {
border-radius: 50%;
behavior: url(PIE.htc);
width: 220px;
height: 220px;
padding: 8px;
background: #fff;
border: 2px solid #666;
color: #666;
text-align: center;
font: 32px Arial, sans-serif;
}
#heart:before,
#heart:after {
position: absolute;
content: "";
left: 90px;
top: 0;
width: 90px;
height: 130px;
background: red;
-moz-border-radius: 50px 50px 0 0;
border-radius: 50px 50px 0 0;
-webkit-transform: rotate(-45deg);
-moz-transform: rotate(-45deg);
-ms-transform: rotate(-45deg);
-o-transform: rotate(-45deg);
transform: rotate(-45deg);
-webkit-transform-origin: 0 100%;
-moz-transform-origin: 0 100%;
-ms-transform-origin: 0 100%;
-o-transform-origin: 0 100%;
transform-origin: 0 100%;
}
#heart:after {
left: 0;
box-shadow: 10px 10px 100px #6d0019;
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
-ms-transform: rotate(45deg);
-o-transform: rotate(45deg);
transform: rotate(45deg);
-webkit-transform-origin: 100% 100%;
-moz-transform-origin: 100% 100%;
-ms-transform-origin: 100% 100%;
-o-transform-origin: 100% 100%;
transform-origin: 100% 100%;
}
Well, here is my attempt to satisfy the requirements of the question — which is not only about putting an image/element over another one, but about achieving that in a responsive manner.
Key points
Using a percentage value on bottom padding to make elements' heights respect their width1.
Using percentage values on top, right, left, bottom offsets as well as width and height properties2.
Using a high value in pixels on border-radius instead of percentage — for instance 1000px.
And number four... well, the last step is trial and error!
Example on JSFiddle.
*, *:before, *:after {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
html, body {
margin: 0;
height: 100%;
width: 100%;
}
#logo {
width: 50%;
/* height: 50%; */
position: relative;
}
#logo:after {
content: "";
display: block;
padding-bottom: 70%;
}
#heart {
position: absolute;
top: 26%;
left: 35%;
z-index: 1;
width: 70%;
height: 100%;
}
#heart-container {
position: absolute;
top: 0;
left: 0;
z-index: 1;
width: 70%;
/* height: 70%; */
border-radius: 50%;
behavior: url(PIE.htc);
background: #fff;
border: 2px solid #666;
color: #666;
text-align: center;
font: 32px Arial, sans-serif;
}
#heart-container:after {
content: "";
display: block;
padding-bottom: 100%;
}
#heart:before,
#heart:after {
position: absolute;
content: "";
left: 0;
top: 0;
width: 39.130434782608695652173913043478%;
height: 56.521739130434782608695652173913%;
background: red;
-moz-border-radius: 1000px 1000px 0 0;
border-radius: 1000px 1000px 0 0;
-webkit-transform: rotate(-45deg);
-moz-transform: rotate(-45deg);
-ms-transform: rotate(-45deg);
-o-transform: rotate(-45deg);
transform: rotate(-45deg);
-webkit-transform-origin: 0 100%;
-moz-transform-origin: 0 100%;
-ms-transform-origin: 0 100%;
-o-transform-origin: 0 100%;
transform-origin: 0 100%;
}
#heart:after {
left: -38.9%;
box-shadow: 10px 10px 100px #6d0019;
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
-ms-transform: rotate(45deg);
-o-transform: rotate(45deg);
transform: rotate(45deg);
-webkit-transform-origin: 100% 100%;
-moz-transform-origin: 100% 100%;
-ms-transform-origin: 100% 100%;
-o-transform-origin: 100% 100%;
transform-origin: 100% 100%;
}
<div id="logo">
<div id="heart-container"></div>
<div id="heart"></div>
</div>
1 Have a look at Responsive Container section of this topic.
2 To find exact values, we can position/size things in an absolute length — like px — and then just measure things relative to each other.
If you want to go responsive, you'd have to drop all the fixed (pixel) units and use percentages unless you plan to have several versions depending on the screen size and in that case you can use media queries.
So, the idea is to use percentages for paddings, margins, etc... and I've replaced the fixed width/height definitions you had with percentual padding, which made the circle responsive. See if you can do the same for the heart (I think using an image might save you a lot of time here).
#logo {
width: 50%;
height: 50%;
position: relative;
}
#heart {
display: block;
position: absolute;
margin: 18% 14%;
z-index: 1;
width: 70%;
height: 70%;
}
#heart-container {
display: block;
position: absolute;
top: 0;
left: 0;
/*bottom:0;
right:0;*/
z-index: 1;
padding: 50%;
}
#heart-container {
border-radius: 50%;
behavior: url(PIE.htc);
padding: 50%;
background: #fff;
border: 2px solid #666;
color: #666;
text-align: center;
font: 32px Arial, sans-serif;
}
#heart:before,
#heart:after {
position: absolute;
content: "";
left: 90px;
top: 0;
width: 90px;
height: 130px;
background: red;
-moz-border-radius: 50px 50px 0 0;
border-radius: 50px 50px 0 0;
-webkit-transform: rotate(-45deg);
-moz-transform: rotate(-45deg);
-ms-transform: rotate(-45deg);
-o-transform: rotate(-45deg);
transform: rotate(-45deg);
-webkit-transform-origin: 0 100%;
-moz-transform-origin: 0 100%;
-ms-transform-origin: 0 100%;
-o-transform-origin: 0 100%;
transform-origin: 0 100%;
}
#heart:after {
left: 0;
box-shadow: 10px 10px 100px #6d0019;
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
-ms-transform: rotate(45deg);
-o-transform: rotate(45deg);
transform: rotate(45deg);
-webkit-transform-origin: 100% 100%;
-moz-transform-origin: 100% 100%;
-ms-transform-origin: 100% 100%;
-o-transform-origin: 100% 100%;
transform-origin: 100% 100%;
}
<div id="logo">
<div id="heart-container">
</div>
<div id="heart">
</div>
</div>
And the fiddle: http://jsfiddle.net/fzgd6cv8/
Let me know if you have trouble doing the same thing for the heart.
UPDATE
Here's my attempt for the heart, probably needs a bit of number tweaking:
#logo {
width: 50%;
height: 50%;
position: relative;
}
#heart {
display: block;
position: absolute;
margin: 20% 14% 0 9%;
z-index: 1;
width: 70%;
height: 70%;
}
#heart-container {
display: block;
position: absolute;
top: 0;
left: 0;
/*bottom:0;
right:0;*/
z-index: 1;
padding: 50%;
}
#heart-container {
border-radius: 50%;
behavior: url(PIE.htc);
padding: 50%;
background: #fff;
border: 2px solid #666;
color: #666;
text-align: center;
font: 32px Arial, sans-serif;
}
#heart:before,
#heart:after {
position: absolute;
content: "";
left: 60%;
top: 0;
width: 60%;
padding-top: 100%;
background: red;
-moz-border-radius: 150% 150% 0 0;
border-radius: 150% 150% 0 0;
-webkit-transform: rotate(-45deg);
-moz-transform: rotate(-45deg);
-ms-transform: rotate(-45deg);
-o-transform: rotate(-45deg);
transform: rotate(-45deg);
-webkit-transform-origin: 0 100%;
-moz-transform-origin: 0 100%;
-ms-transform-origin: 0 100%;
-o-transform-origin: 0 100%;
transform-origin: 0 100%;
}
#heart:after {
left: 0;
box-shadow: 10px 10px 100px #6d0019;
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
-ms-transform: rotate(45deg);
-o-transform: rotate(45deg);
transform: rotate(45deg);
-webkit-transform-origin: 100% 100%;
-moz-transform-origin: 100% 100%;
-ms-transform-origin: 100% 100%;
-o-transform-origin: 100% 100%;
transform-origin: 100% 100%;
}
<div id="logo">
<div id="heart-container">
</div>
<div id="heart"></div>
</div>
http://jsfiddle.net/fzgd6cv8/2/
I would like to transform this cube, see code below, to this one which you can see on the pictures, but I don't get it.
Actual Result:
CSS
<style type="text/css">
.cube-wrap {
-webkit-perspective: 800px;
-webkit-perspective-origin: 50% 100px;
-moz-perspective: 800px;
-moz-perspective-origin: 50% 100px;
-ms-perspective: 800px;
-ms-perspective-origin: 50% 100px;
perspective: 800px;
perspective-origin: 50% 100px;
}
.cube {
position: relative;
width: 200px;
margin: 0 auto;
-webkit-transform-style: preserve-3d;
-webkit-animation: spin 5s infinite linear;
-moz-transform-style: preserve-3d;
-moz-animation: spin 5s infinite linear;
-ms-transform-style: preserve-3d;
-ms-animation: spin 5s infinite linear;
transform-style: preserve-3d;
animation: spin 5s infinite linear;
}
.cube div {
position: absolute;
width: 200px;
height: 100px;
background: rgba(255, 255, 255, 0.1);
box-shadow: inset 0 0 30px rgba(125, 125, 125, 0.8);
font-size: 20px;
text-align: center;
line-height: 100px;
color: rgba(0, 0, 0, 0.5);
font-family: sans-serif;
text-transform: uppercase;
}
.depth div.back-pane {
-webkit-transform: translateZ(-100px) rotateY(180deg);
-moz-transform: translateZ(-100px) rotateY(180deg);
-ms-transform: translateZ(-100px) rotateY(180deg);
transform: translateZ(-100px) rotateY(180deg);
}
.depth div.right-pane {
-webkit-transform: rotateY(-270deg) translateX(100px);
-webkit-transform-origin: top right;
-moz-transform: rotateY(-270deg) translateX(100px);
-moz-transform-origin: top right;
-ms-transform: rotateY(-270deg) translateX(100px);
-ms-transform-origin: top right;
transform: rotateY(-270deg) translateX(100px);
transform-origin: top right;
}
.depth div.left-pane {
-webkit-transform: rotateY(270deg) translateX(-100px);
-webkit-transform-origin: center left;
-moz-transform: rotateY(270deg) translateX(-100px);
-moz-transform-origin: center left;
-ms-transform: rotateY(270deg) translateX(-100px);
-ms-transform-origin: center left;
transform: rotateY(270deg) translateX(-100px);
transform-origin: center left;
}
.depth div.top-pane {
-webkit-transform: rotateX(-90deg) translateY(-100px);
-webkit-transform-origin: top center;
-moz-transform: rotateX(-90deg) translateY(-100px);
-moz-transform-origin: top center;
-ms-transform: rotateX(-90deg) translateY(-100px);
-ms-transform-origin: top center;
transform: rotateX(-90deg) translateY(-100px);
transform-origin: top center;
}
.depth div.bottom-pane {
-webkit-transform: rotateX(90deg) translateY(100px);
-webkit-transform-origin: bottom center;
-moz-transform: rotateX(90deg) translateY(100px);
-moz-transform-origin: bottom center;
-ms-transform: rotateX(90deg) translateY(100px);
-ms-transform-origin: bottom center;
transform: rotateX(90deg) translateY(100px);
transform-origin: bottom center;
}
.depth div.front-pane {
-webkit-transform: translateZ(100px);
-moz-transform: translateZ(100px);
-ms-transform: translateZ(100px);
transform: translateZ(100px);
}
</style>
HTML
<div id="page">
<div id="contentHolder">
<div style="height: 100px; margin-top: 40px;">
<div class="cube-wrap">
<div class="cube depth">
<div class="front-pane"></div>
<div class="back-pane"></div>
<div class="top-pane"></div>
<div class="bottom-pane"></div>
<div class="left-pane"></div>
<div class="right-pane"></div>
</div>
</div>
</div>
</div>
</div>
Demo Fiddle: http://jsfiddle.net/YT6hd/
Expected Output:
This should help, you'll have to play around with the values a little bit:
http://jsfiddle.net/YT6hd/1/
.cube.depth {
-webkit-transform: rotateY(45deg);
}
.cube-wrap {
-webkit-perspective: 8000px;
-webkit-perspective-origin: 20% 2000px;
}
Of course you'll need all the browser prefixes, I use chrome so I added -webkit-
I have an image and a div over it which is working as a wrapper for the image, I am trying to rotate a square div over let's say 45 deg. to give it a diamond like shape so actually it comes as the image is being cut in a diamond like shape.
The issue is when I rotate the div the image and other things in it also gets rotated than I have to rotate those images back let's say -45deg to bring them to original place.
This is doing above involved a lot of rotating which is almost un-necessary, plus it's really not that simple for me to get it right for images and text of different size etc.
If only I can work out something through which on the above div gets rotated and elements inside it remain like how they are it will be great.
Can anyone suggest anything please?
My markup is:
<div class="wrapper" id="01">
<a href="#">
<img src="image.gif" />
<span class="text" id="text01">Lorem Ispum </span>
</a>
</div>
CSS:
.wrapper {
-webkit-backface-visibility: hidden;
position: relative;
width: 300px;
height: 300px;
margin: 0 30px 0 0;
overflow: hidden;
float: left;
-moz-transform: matrix(-0.5,-0.5,0.5,-0.5,0,0);
-moz-transform-origin: center;
-webkit-transform: matrix(-0.5,-0.5,0.5,-0.5,0,0);
-webkit-transform-origin: center;
-o-transform: matrix(-0.5,-0.5,0.5,-0.5,0,0);
-o-transform-origin: center;
-ms-transform: matrix(-0.5,-0.5,0.5,-0.5,0,0);
-ms-transform-origin: center;
transform: matrix(-0.5,-0.5,0.5,-0.5,0,0);
transform-origin: center;
-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=-0.5,M21=-0.5,M12=0.5,M22=-0.5,SizingMethod='auto expand')";
filter: progid:DXImageTransform.Microsoft.Matrix(M11=-0.5,M21=-0.5,M12=0.5,M22=-0.5,SizingMethod='auto expand');
cursor: pointer;
}
.wrapper img {
width: 700px;
margin: -10px 0 0 -245px;
-moz-transform: rotate(135deg);
-moz-transform-origin: center;
-webkit-transform: rotate(135deg);
-ms-transform: rotate(135deg);
-o-transform: rotate(135deg);
transform: rotate(135deg);
-webkit-transform-origin: center;
-o-transform-origin: center;
-ms-transform-origin: center;
transform: matrix(-0,-0,0,-0,0,0);
transform-origin: center;
-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=-0,M21=-0,M12=0,M22=-0,SizingMethod='auto expand')";
filter: progid:DXImageTransform.Microsoft.Matrix(M11=-0,M21=-0,M12=0,M22=-0,SizingMethod='auto expand');
}
span.text {
background-color: rgba(255,255,255,0.7);
-webkit-transform: rotate(180deg);
margin: -475px 0 0 -1px;
float: left;
width: 296px;
height: 42%;
z-index: 100;
position: relative;
padding: 4px;
display: none;
font-size: 1.2em;
}
demo
Demo html
<div class="controller">
<div>Special Offer</div>
</div>
Demo css
.controller{
width: 55px;
height: 216px;
background: #000;
border-radius: 0 19px 19px 0;
text-align: center;
vertical-align: middle;
display: table-cell;
}
.controller div{
transform: rotate(90deg);
}
I could use white-space: nowrap; to .controller div it will increase the width of that controller and if I have long text this will have in one line. But I want this multiline but fully heighty as this.
Ok,what about THIS
.controller{
-webkit-transform: rotate(0deg);
-moz-transform: rotate(0deg);
-ms-transform: rotate(0deg);
-o-transform: rotate(0deg);
transform: rotate(0deg);
width: 55px ! important;
height: 215px;
background: #000;
border-radius: 0 19px 19px 0;
text-align: center;
vertical-align: middle;
display: block;
float:left;
position:relative;
margin-right: 10px;
}
.controller div{
position: relative;
top: 90px;
left: -70px;
width: 190px;
-webkit-transform: rotate(90deg);
-moz-transform: rotate(90deg);
-ms-transform: rotate(90deg);
-o-transform: rotate(90deg);
transform: rotate(90deg);
}