p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   ASP.NET 1.0 and 1.1 Basics (http://p2p.wrox.com/forumdisplay.php?f=60)
-   -   CSS support in ASP .NET applications? (http://p2p.wrox.com/showthread.php?t=11700)

saturdave April 11th, 2004 05:03 PM

CSS support in ASP .NET applications?
Hi. I was wondering if CSS1/2 is fully supported in ASP .NET. I have a situation where I want to control what is displayed in the browser by using the 'display' attribute. But so far, my trials haven't worked.

I have a Repeater control with html inside, & a line like this:

<div style="display:none;"> ETC. </div>

in a normal html file, the contents of the division would not be displayed. But that's not the case for my .aspx file.

Any ideas why this is? I thought this would be a handy trick to use in a pinch.



planoie April 11th, 2004 06:08 PM

ASP.net outputs HTML. ASP.net is a server-side technology and has no need to comply with a CSS standard. That is up to the browser. ASP.net doesn't provide the ability to add a CSS class to many of its controls, but in the end, it's up to the browser.

If what you are trying doesn't work, then there is a problem with the HTML that is coming out of ASP.net. I have used this technique many times for DHTML and have had no problem (once I worked out the javascript/dhtml bugs). Take a look at the HTML source in the browser and see if there is something interfering with the normal functionality of HTML and the CSS styles.

Work smarter, not harder

All times are GMT -4. The time now is 07:56 AM.

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