Re: Format DataList
- From: rn5a@xxxxxxxxxxxxxx
- Date: 5 Oct 2006 14:25:34 -0700
I tried setting the background color of the table to transparent like
this:
<asp:DataList ID="dlYourCart" AlternatingItemStyle-BackColor="lavender"
ItemStyle-BackColor="pink" runat="server">
<HeaderTemplate>
<table bordercolor="black" cellspacing="0" class="format" width="100%"
style="background-image: none; background-color: transparent;">
but that doesn't make any difference - the background-color of the
entire table still remains white.
Any other ideas?
Never thought that formatting a DataList would be such a pain in the
wrong place!
Phil H wrote:
I've come across this behaviour too when using HTML table objects in a
DataList template. It is the default back colour of the table that is
rendered rather than that of the template.
I presume the table is there to control positioning within the
template. On the occasion when I did this I ended up abandoning this
method in favour of setting the width and height of the databound
labels to effect positioning because with the table they wouldn't line
properly with the the header.
If you need to use a table and don't want the back color to dominate,
try setting the back color of the table to transparent.
Good luck
.
- References:
- Format DataList
- From: rn5a
- Re: Format DataList
- From: Phil H
- Format DataList
- Prev by Date: Re: get HTML code of table created dynamically
- Next by Date: Reference controls
- Previous by thread: Re: Format DataList
- Next by thread: Visual Studio 2005 ASP.net publishing of virtual directories
- Index(es):
Relevant Pages
|