Friday, 6 September 2013

How can i make the background image visible using css?

How can i make the background image visible using css?

I tried to make the div with background image and with text message. In
that Everything works perfect when i make the width as 100% and the height
as auto. I make that div height is auto because whenever i increase the
font size of the text That div height is also dynamically increase. But
Now my question is when i left empty message inside the div then it
doesn't show any, Because of height:auto I want to show the div with
actual background image appear-able. Even if i left message as empty. Is
it possible to show the background image with height of auto.
Here is my code:
#loginContainer {
-moz-border-bottom-colors: none;
-moz-border-left-colors: none;
-moz-border-right-colors: none;
-moz-border-top-colors: none;
background: url("http://s3.buysellads.com/1237708/176570-1371740695.gif")
no-repeat scroll center center #FF660D; /*for example */
border-color: #FFFFFF;
border-image: none;
border-right: medium solid #FFFFFF;
border-style: none solid solid;
border-width: medium;
left: 0;
margin-left: auto;
margin-right: auto;
position: fixed;
right: 0;
top: 0;
vertical-align: super;
width: 100%;
z-index: 9999999;
}
Here is the fiddle
Here is the fiddle with empty message inside div

No comments:

Post a Comment