tags:

views:

300

answers:

4

Want to edit things like DIV size, color, positioning (absolute), height/width etc.

+1  A: 

You can just output the CSS like any other with Response.Write or the <%= someValue %> methods.

Here are some of the other methods: http://cfouquet.blogspot.com/2006/06/making-dynamic-css-content-with-aspnet.html

Daniel A. White
A: 

I'm not sure of what you're trying to do with the information given, but to add css on the fly you can use jQuery to add the class to an element with those certain specifications.. you can have jquery wait in the background for something to happen on the client and just add the class with that certain style

Example:

<style>
 p { margin: 8px; font-size:16px; }
.color { color:blue; }

</style>

<script>
   $(document).ready(function(){
     $("#button1").click(function(){ 
      $("p:last").addClass("color");
   });
</script>

<p>Hello</p>
 <p>and</p>
<p>Goodbye</p>
TStamper
A: 

If by "on the fly" you mean while the user is interacting with the page then you're going to need to use some javascript. I suggest learning jQuery as it provides an easy and effective way interact with the DOM.

Jethro Larson
A: 

Ryan, you may want to look into Themes if you want to change the appearance of your site based on user preferences (Learning about Skins can help as well but master themes first). This is really the right approach in the ASP.NET model unless you are looking just to adapt some specific output to certain data conditions.

Mark Brittingham