Solved

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

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Code works but I need to redo it and assign values to Model 7 31
C# Offline Apllication 5 51
Syntax Error 2 42
CSS z-index issue 3 17
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
This article discusses four methods for overlaying images in a container on a web page
In this tutorial viewers will learn how to customize the background color and font color of highlighted text using the ::selection element in CSS Begin by defining the selected text as an element in CSS by typing "::selection": Style the ::selection…
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 …

932 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