Wrox Programmer Forums
|
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 27th, 2007, 09:10 AM
Authorized User
 
Join Date: May 2007
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to swifty_programmer
Default Label width in firefox

Hi all,
I've made an ASP.NET AJAX Enabled WebApplication in VS2005.
Everything's working great in IE7 but then I tried on FireFox and...problem. (FF 2.0.0.6)
The width of the labels inside my DataTable ItemTemplate aren't fix,
the width is restricted to the used width of the text inside.
An example to clarify:

IE7:

 |label1 ||label2 ||label3 |

FF 2:

 |label1||label2||label3|


This ofcourse misses with my colums-layout in my DataTable.
I tried a different DOCTYPE and not using 'px' in a width-specifications but nothing worked:

here is a peice of my markup code:

...
<asp:DataList ID="_dlOverview" runat="server" Width="98%" BorderStyle="Solid" BorderWidth="1px"
                            CellPadding="4" ForeColor="#333333" Style="z-index: 102; left: 0px; position: absolute;
                            top: 0px;" Visible="False">
                            <FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
                            <SelectedItemStyle BackColor="#C5BBAF" Font-Bold="True" ForeColor="#333333" />
                            <ItemTemplate>
                                <span style="white-space: nowrap">
                                    <asp:Label ID="_lBullet" runat="server" Text="•" Width="5px" ToolTip='<%# ConvertDateToLocal((DateTime)Eval("ArrivalDateUtc" )) + " | " + Eval("SerialData") + " | " + Eval("DataString")%>'></asp:Label>
                                    <asp:Label ID="_ArrivalDate" Text='<%# ConvertDateToLocal((DateTime)Eval("ArrivalDateUtc" )) %>'
                                        runat="server" Width="135px" ToolTip='<%# ConvertDateToLocal((DateTime)Eval("ArrivalDateUtc" )) %>'
                                        BackColor="Transparent"></asp:Label>
                                    <asp:Label ID="_lSerialData" Text='<%# (Eval("SerialData") != null & Eval("SerialData") != "")? Eval("SerialData"): " - " %>'
                                            runat="server" Width="190px" ToolTip='<%# Eval("SerialData") %>' BackColor="Transparent"></asp:Label>
                                    <asp:Label ID="_lDataString" Text='<%# Eval("DataString") %>' runat="server" Width="600px"
                                                ToolTip='<%# Eval("DataString") %>' Style="white-space: nowrap min-width: 500px;"
                                                BackColor="Transparent"></asp:Label>
                                </span>
                            </ItemTemplate>
                            <AlternatingItemStyle BackColor="White" BorderColor="Silver" BorderStyle="Solid"
                                BorderWidth="1px" />
                            <ItemStyle BackColor="Lavender" />
                            <HeaderTemplate>
                                <asp:Label ID="ArrivalDate" runat="server" Text="Arrival Date (local)" Width="135px"
                                    Font-Underline="True"></asp:Label>&nbsp; &nbsp;<asp:Label ID="_lHeaderSerialData"
                                        runat="server" Text="Serial Data" Width="185px" Font-Underline="True"></asp:Label>
                                <asp:Label ID="_lHeaderDataString" runat="server" Text="Data String" Width="500px"
                                    Font-Underline="True"></asp:Label>
                            </HeaderTemplate>
                            <HeaderStyle BackColor="Navy" Font-Bold="True" ForeColor="White" BorderColor="Silver"
                                BorderStyle="Solid" BorderWidth="1px" HorizontalAlign="Left" />


                     </asp:DataList>
...


Thx in advance for all replies.
 
Old August 27th, 2007, 09:19 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

hi there..

did you try using a style tag??? throw everything inside a style tag... sometimes it makes it works...

HTH

Gonzalo

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from dparsons signature and he Took that from planoie's profile
================================================== =========
My programs achieved a new certification (can you say the same?):
WORKS ON MY MACHINE
http://www.codinghorror.com/blog/archives/000818.html
================================================== =========
I know that CVS was evil, and now i got the proof:
http://worsethanfailure.com/Articles...-Hate-You.aspx
================================================== =========
 
Old August 27th, 2007, 09:28 AM
Authorized User
 
Join Date: May 2007
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to swifty_programmer
Default

Hi, thx for quick reply.
Just tried with width-prop in the "Style"-tags without any luck.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Screen width day10 Classic ASP Basics 1 March 2nd, 2007 12:58 PM
ie vs. firefox menu/hover/width problems mishagos BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3 2 June 29th, 2006 08:02 AM
Height and Width? venkatesh_anmca Beginning VB 6 0 January 31st, 2005 05:13 AM
Width in pixels from width in percentage bsausser Classic ASP Basics 1 December 31st, 2003 02:31 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.