Q:I am stumpt. Is there anyway to set the background image on a webpart
title?
A: Welcome to ASPNET newsgroup.
Regarding on the setting background image on a webpart title question you
mentioned, based on my understanding, since the Web Part Title's style
setting is configured at WebpartZone level, so we can customize a certain
WebpartZone's PartTitleStyle and add that webpart into the Zone... The
ASP.NET WebpartZone's "PartTitleStyle" property has the "CssClass" sub
property which can help specify a css class, so we can define the
background image in the css class, for example:
=====WebPartZone template define=======
<asp:WebPartZone>
<PartTitleStyle CssClass="MyPartTitle" />
</asp:WebPartZone>
===========css class define============
<style type="text/css">
.MyPartTitle { background-image: url(Images/titlebar.gif) }
}
</style>
================
Thus, all the webparts added in the WebPartZone will has the specified
image as the background image.....
Setting the background image on a webpart title
最新推荐文章于 2024-09-20 17:15:28 发布