?
Solved

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

Posted on 2012-03-26
4
Medium Priority
?
337 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 2000 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

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

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

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this Micro Tutorial viewers will learn how to create a CSS image sprite (In a later tutorial, viewers will learn how to use CSS and HTML to create a navigation menu using this sprite) Open a new Photoshop document with a width of (Icon width)x(N…
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
Suggested Courses

800 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