0

I have a div that I rotate from vertical to horizontal. The problem is that when I rotate it creates big space at the top. I want when rotate the div be stacked on the top. How can I achieve this the image size that I have as background is width 756 x height 1250

.body
{
    width:756px;
    min-height:1250px;
    border-color:White;
    border-style:solid;
    border-width:thin;
    float:right;
    margin:0 auto;
    background-image:url("Images/bg.jpg");
    background-repeat:no-repeat;
      -webkit-transform: rotate(-90deg);
    -moz-transform: rotate(-90deg);
    -o-transform: rotate(-90deg);
    -ms-transform: rotate(-90deg);
    transform: rotate(-90deg);

}

<div class="body">
<div >
<div ><h2 style="font-size:20px;"><div style="width:540px; margin-top:520px; margin-left:110px;   ">
     <asp:Label ID="lblNtitle" runat="server" 
         Text="" style="color: #000000" CssClass="style3"></asp:Label><br /><br /> 
     <asp:Label ID="lblNCompany" runat="server" Text="" CssClass="style3"> </asp:Label></div></h2></div>

focus
  • 171
  • 9
  • 31

1 Answers1

0

From what I can gather you needed to switch the min-height and the width values because the div is now rotated vertically rather than horizontal. That takes care of the white space towards the top of the page. Here is an example http://jsfiddle.net/fDWkr/1/

Change

width:756px;
min-height:1250px;

To

width:1250px;
min-height:756px;