Solved

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

Posted on 2012-03-26
4
317 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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…

746 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now