Reputation: 3751
I have an ASP.net website where I have the following...
HTML:
<div style="width: 99%; margin: 0; padding: 0; text-align: left; overflow: hidden;">
<div id="sample3" lang="is" class="sample3">
<figure>
<img src="../theImages/imgPra.png" width="160" height="160" alt="Specialty Profile" />
<figcaption>Specialty Profile</figcaption>
</figure>
<!--end sample3--></div>
</div>
CSS:
.sample3 figure {
width: 200px;
height: 200px;
overflow: hidden;
position: relative;
background: url('../theImages/preview4.jpg') fixed no-repeat;
}
.sample3 figcaption {
position: absolute;
display: block;
width: 350px;
height: 50px;
left: 110px;
bottom: -110px;
text-align: center;
color: #fff;
background-color: rgba(26,54,59,0.8);
border: 3px solid rgba(62,116,126,0.6);
line-height: 50px;
-moz-box-shadow: rgba(0,0,0,.5) 0 2px 8px;
-webkit-box-shadow: rgba(0,0,0,.5) 0 2px 8px;
box-shadow: rgba(0,0,0,.5) 0 2px 8px;
-moz-transform:rotate(-45deg);
-webkit-transform:rotate(-45deg);
-o-transform:rotate(-45deg);
transform:rotate(-45deg);
-moz-transition: bottom .5s ease-out, left .5s ease-out;
-webkit-transition: bottom .5s ease-out, left .5s ease-out;
-o-transition: bottom .5s ease-out, left .5s ease-out;
transition: bottom .5s ease-out, left .5s ease-out;
}
.sample3 figure:hover figcaption {
left: -20px;
bottom: 20px;
}
JSFiddle: http://jsfiddle.net/vas1watw/
It works fine in a regular webpage, but when I add it to my .net website, the ribbon is displayed without the animation.
How can I resolve the issue.
debug mode:
Upvotes: 4
Views: 2160
Reputation: 3751
All the code (HTML/CSS) were placed correctly in my site. IE just took a full day to refresh the page. I had to reset the IIS site which forced a refresh and it worked afterward.
Upvotes: 0
Reputation: 14892
Take a look at the ClientIDMode
property of the @Page
directive. ASP.NET tends to auto adjust the client generated ids, which causes your CSS to nome handle #sample3
selector since this Id will not exists in the HTML, unless that property is set to Static
. Read more about ClientIDMode on MSDN.
Upvotes: 1