Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...How to alter CSS class of Search skin objectHow to alter CSS class of Search skin object
Previous
 
Next
New Post
1/17/2006 3:46 PM
 

I want to customize the Search skin object so the text in the input box is smaller than the normal text size on the site. Also I want the style of the "Search" link to be a different size and colour from the input box text (white rather than black).

I have created a style in my skin's CSS file called SearchSkinObject and tried setting the CssClass property of the skin object to this, and also the CssClass property of the surrounding TD element, but all this seems to do is alter the style of the "Search" link, not the input box. The only thing that seems to control the style of the input box is the NormalTextBox style, but I don't want to change this as it will affect text boxes everywhere else on the site.

How can I alter the input box? Here is the SearchSkinObject style I created:

.SearchSkinObject

{

font-family: verdana,arial,geneva,sans-serif;

font-size: 8pt;

color: black;

font-weight: normal;

text-decoration: none;

}

 

 
New Post
1/20/2006 8:08 AM
 
Anyone have any input on this?
 
New Post
1/20/2006 3:23 PM
 

you've a few options

the search textbox always has a name of dnn:dnnSEARCH:txtSearch, so you could use javascript to set the style dynamically. Alternatively, you could use cascading order to identify a textbox within a parent control e.g. the DNN_HeaderTable table (see http://www.w3.org/TR/REC-CSS1#cascading-order ).

Finally, you could alter admin\Skins\Search.ascx file and alter the cssclass to a unique value. As you're only altering an ascx file, theres no need to recompile the solution.

Cathal


Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
1/21/2006 7:47 AM
 

OK thanks. The javascript and cascading order options sound the best because I will loose changes to the ASCX file each time a DNN upgrade occurs.

I have never used either of these techniques before. I did read the page you sent, but it went over my head! Do you have any examples of either technique I could look at? Many thanks again.

 
New Post
1/27/2006 7:07 AM
 
I figured it out. Here's what I added to my skin (at the very end of the HTML):
 
<!--set the font size of the DNN Search input box to small-->
<script language="javascript" type="text/javascript">
 document.getElementById("dnn_dnnSearch_txtSearch").style.font = "7pt verdana";
</script>
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...How to alter CSS class of Search skin objectHow to alter CSS class of Search skin object


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out