Solved

how to set the (css) display property to inline  for an asp.net ContentPlaceHolder?

Posted on 2012-03-26
4
323 Views
Last Modified: 2012-03-28
Hello,

The ContentPlaceHolder emits a a div as html. I would like to set the display property to inline. Is there a way I can do this?


Thansk,
0
Comment
Question by:vielkacarolina1239
  • 2
4 Comments
 

Author Comment

by:vielkacarolina1239
ID: 37768985
Sorry, got confused with the object. I am not interested in the ContentPlaceHolder. This works fine and does not emit a div. The object I am interested in is a TreeView. The TreeView  emits a div and I would like to set the display to inline.

Thanks,
0
 
LVL 22

Accepted Solution

by:
Mrunal earned 500 total points
ID: 37770816
Of course you can set css property to it. (actually any html object/element).

Once document is ready, you can set it like:

Using jquery:

$('#treeview_client_id_here').css('display', 'inline');

using JavaScript:

document.getElementById("treeview_client_id_here").style.display="inline";
0
 
LVL 18

Expert Comment

by:mgfranz
ID: 37771748
Actually, the control itself allows you to create a class for the control, simply give the control property CssClass a name, then you can use regular CSS to control layout.  More info here; http://msdn.microsoft.com/query/dev10.query?appId=Dev10IDEF1&l=EN-US&k=k%28SYSTEM.WEB.UI.WEBCONTROLS.WEBCONTROL.CSSCLASS%29%3bk%28SYSTEM.WEB.UI.WEBCONTROLS.TREEVIEW%29%3bk%28VS.PROPERTIES%29%3bk%28TargetFrameworkMoniker-%22.NETFRAMEWORK%2cVERSION%3dV4.0%22%29&rd=true
0
 

Author Closing Comment

by:vielkacarolina1239
ID: 37777131
Great, thanks,
0

Featured Post

How our DevOps Team Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses four methods for overlaying images in a container on a web page
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this tutorial viewers will learn how to define a gradient in CSS. Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Gradient. Define the background as "linear-gradient(to right, #ee3668, black)". Ensure you …
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

825 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question