Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > CSS > CSS Cascading Style Sheets
|
CSS Cascading Style Sheets All issues relating to Cascading Style Sheets (CSS).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the CSS Cascading Style Sheets 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 21st, 2007, 02:48 PM
Authorized User
 
Join Date: Aug 2007
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default asp labels with border-bottom

            <tr>
                <td height="24">
                </td>
                <td colspan="6">
                    <strong>ID#:</strong>
                    <asp:Label ID="lblIDNum" runat="server" Width="140px" Style="border-bottom: black 1px solid;"></asp:Label>
            </tr>

Whenever I do that, instead of having a border accross the whole label, I only have a line across where the text is, which looks like underline. How do I make it to have a border on the bottom across the whole label? I'm currently using visual studio 2005 with .net 2.0.
 
Old August 21st, 2007, 04:29 PM
Friend of Wrox
 
Join Date: Jun 2007
Posts: 477
Thanks: 10
Thanked 19 Times in 18 Posts
Default

Check your output in the browser. I want to make sure, but I think a label is sent as a <span> tag correct?

-------------------------

Whatever you can do or dream you can, begin it. Boldness has genius, power and magic in it. Begin it now.
-Johann von Goethe

When Two Hearts Race... Both Win.
-Dove Chocolate Wrapper

Chroniclemaster1, Founder of www.EarthChronicle.com
A Growing History of our Planet, by our Planet, for our Planet.
 
Old August 21st, 2007, 04:38 PM
Authorized User
 
Join Date: Aug 2007
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I checked the output in the browser and it doesn't work. I start reading more about CSS and I believe you are correct on that.

 
Old August 21st, 2007, 04:42 PM
Authorized User
 
Join Date: Aug 2007
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I also have similar codes in my other vb project and the labels showed perfectly. The only thing different between the 2 projects is the styles.css, which is in the project that the labels don't work correctly. The confusing thing is I didn't even applied the style.css to that project. I wonder if there something in the project that's causing that.
 
Old August 21st, 2007, 06:34 PM
Friend of Wrox
 
Join Date: Jun 2007
Posts: 477
Thanks: 10
Thanked 19 Times in 18 Posts
Default

I think it may be a CSS thing. Different tags have different default settings, and I think <span> default behavior is to function as if the the display were set to inline. Inline elements typically have problems taking box model properties(margin, padding, etc.) and borders fall under that. These are also some of the yuckier problems to deal with when they go bad. First thing I'd try is setting the display of the span to block in your style sheet. In any case, I'd definitely use the CssClass property on your label, because if this one is going to be unfriendly we want to be able to isolate the css to apply only to that class. Otherwise we could break the site trying to get that one label to work. And that's bad. ;)

-------------------------

Whatever you can do or dream you can, begin it. Boldness has genius, power and magic in it. Begin it now.
-Johann von Goethe

When Two Hearts Race... Both Win.
-Dove Chocolate Wrapper

Chroniclemaster1, Founder of www.EarthChronicle.com
A Growing History of our Planet, by our Planet, for our Planet.
 
Old August 21st, 2007, 10:57 PM
Authorized User
 
Join Date: Jul 2007
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to vksingh24
Default

<asp:Label> is converted into <SPAN> Tag at the client browser so that the border will appear till the character will come.

In place of using this with <asp:Label> use it with your <TD>, I guess you will achieve your purpose.

__________________
Vikash Kumar Singh
 
Old August 22nd, 2007, 09:36 AM
Authorized User
 
Join Date: Aug 2007
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

okay, I've tried what you guys suggested and nothing worked. For testing I added a new page to the project that display correctly with the same code I copied from the other project and it displayed fine, but that's not what I want. So there is something in the project level that is doing the setting for me? I tried to exclude styles.css from the project and that didn't work.
 
Old August 22nd, 2007, 11:06 AM
Friend of Wrox
 
Join Date: Jun 2007
Posts: 477
Thanks: 10
Thanked 19 Times in 18 Posts
Default

I HATE when it does that.

Well, I'm glad it's working. This could be one of those "undocumented features". I once had a class in database applications where my program wouldn't work. I sat down with the instructor and we modified that thing until my program was character for character (at least visually) identical to his, and mine would never work. We emailed a copy of his code to my lab computer, swapped his files for mine and it worked fine. My instructor had a couple theories, but we never figured out what the problem was.

Anyone have an idea what could have done this?

-------------------------

Whatever you can do or dream you can, begin it. Boldness has genius, power and magic in it. Begin it now.
-Johann von Goethe

When Two Hearts Race... Both Win.
-Dove Chocolate Wrapper

Chroniclemaster1, Founder of www.EarthChronicle.com
A Growing History of our Planet, by our Planet, for our Planet.
 
Old August 22nd, 2007, 11:48 AM
Authorized User
 
Join Date: Aug 2007
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I'm still trying to make the project that doesn't display correctly to work. I still have no idea what could cause this.

 
Old August 24th, 2007, 01:33 PM
Friend of Wrox
 
Join Date: Jun 2007
Posts: 477
Thanks: 10
Thanked 19 Times in 18 Posts
Default

It's 99% likely to be a bug that no one will ever understand or fix. But there is a 1% it proves to be one of the great insights into .NET and you'll have a meteoric and amazingly successful career.

...And I can say I knew you when

-------------------------

Whatever you can do or dream you can, begin it. Boldness has genius, power and magic in it. Begin it now.
-Johann von Goethe

When Two Hearts Race... Both Win.
-Dove Chocolate Wrapper

Chroniclemaster1, Founder of www.EarthChronicle.com
A Growing History of our Planet, by our Planet, for our Planet.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Printing address labels from my ASP application bjtindle Classic ASP Databases 3 December 16th, 2007 08:00 AM
Exit bottom in ASP.NET with C# Somesh ASP.NET 2.0 Professional 1 November 29th, 2006 12:40 PM
border-bottom in IE6 interrupt CSS Cascading Style Sheets 7 February 17th, 2006 08:03 AM
check if a cell has a bottom border crmpicco Excel VBA 2 January 10th, 2006 07:19 AM
Printing address labels ASP/Access bjtindle Access ASP 1 September 23rd, 2003 11:57 PM





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