Background Image Not Appearing with CSS

Posted by Self-Innovator under ASP.NET on 4/5/2012 | Points: 10 | Views : 9557 | Status : [Member] | Replies : 8
Hi this is my CSS
.ParentDefault
{
background-image:url('~/Images/FF.png');
background-position:top;
background-repeat:repeat-x;
}
In .aspx.
<asp:Menu ID="menuBar" StaticMenuItemStyle-CssClass="ParentDefault"
runat="server" Orientation="horizontal" CssClass="cssMenu" >
</asp:Menu>

mage isnot appearing...any tell me wats wrong here

Join Hands Change lives
Thanks & Regards
Straight Edge Society



Responses

Posted by: Ajay.Kalol on: 4/5/2012 [Member] Starter | Points: 25

Up
0
Down
Check your Image Url.
Replace it with
" background-image:url('Images/FF.png'); "

Hope this will work..

Ajay
ajaypatelfromsanthal.blogspot.in

Self-Innovator, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Self-Innovator on: 4/5/2012 [Member] Bronze | Points: 25

Up
0
Down
YOU MEAN IN THIS WAY..
Inside the CSS will it work inside the CSS
.ParentDefault
{
"background-image:url('~/Images/FF.png'); "
}


Join Hands Change lives
Thanks & Regards
Straight Edge Society

Self-Innovator, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Prabhakar on: 4/5/2012 [Member] [MVP] Starter | Points: 25

Up
0
Down
hi ,Self-Innovator


change ur css

.ParentDefault

{
background-image:url('Images/FF.png');
background-position:top;
background-repeat:repeat-x;
}


Best Regard's
Prabhakar

Self-Innovator, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Self-Innovator on: 4/5/2012 [Member] Bronze | Points: 25

Up
0
Down
ya i've tried still its not working...any other soln..pls

Join Hands Change lives
Thanks & Regards
Straight Edge Society

Self-Innovator, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Prabhakar on: 4/5/2012 [Member] [MVP] Starter | Points: 25

Up
0
Down
try without ( ' )


.ParentDefault

{

background-image:url(Images/FF.png);


Best Regard's
Prabhakar

Self-Innovator, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Self-Innovator on: 4/5/2012 [Member] Bronze | Points: 25

Up
0
Down
S...I've tried in Many ways but Dontknow it's not at all appearing in..
I am bindingg the parent menu dynamically where i want the background of Parent menus to be some Image...Pls find Soln...Once Again go thru my CSS

.ParentDefault
{
background-color:#0aadf6 ;
color:White;
font-family:Calibri ;
background-image:url('Images/FF.png');
/*background-image:url(Images/FF.png);
background-image:url("Images/FF.png");*/
}

Join Hands Change lives
Thanks & Regards
Straight Edge Society

Self-Innovator, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Prabhakar on: 4/5/2012 [Member] [MVP] Starter | Points: 25

Up
0
Down
Try this . .

.ParentDefault

{
background-image:url(Images/FF.png);
}



.ParentDefault

{
background-image:url(../Images/FF.png);
}


Try this may be it's help us u . .

Best Regard's
Prabhakar

Self-Innovator, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Self-Innovator on: 4/5/2012 [Member] Bronze | Points: 25

Up
0
Down
ya great this wrks...Thanks...
background-image:url(../Images/FF.png);



Join Hands Change lives
Thanks & Regards
Straight Edge Society

Self-Innovator, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response