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

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsRepositoryRepositoryHow do I change the dropdown menu widths for categories, attributes, etc?How do I change the dropdown menu widths for categories, attributes, etc?
Previous
 
Next
New Post
2/4/2008 7:51 PM
 

Hi,

I'm making a custom template and I have the following html in my header.html.

<tr>
    <td><div class="label">Sort Options</div>[SORT]</td>
    <td><div class="label">View by Category</div>[CATEGORIES]</td>
    <td><div class="label">View by Document Type</div>[ATTRIBUTE:Document Type]</td>
    <td><div class="label">View by File Type</div>[ATTRIBUTE:File Type]</td>
    <td>[UPLOADBUTTON][MODERATEBUTTON]</td>
</tr>

The dropdown menus are all set to 100px wide and I cannot change them.  Here is what is output for the [CATEGORIES] TD....

<td><div class="label">View by Category</div><select name="dnn$ctr389$Repository$ddlCategories" onchange=" setTimeout('__doPostBack(\'dnn$ctr389$Repository$ddlCategories\',\'\')', 0)" id="dnn_ctr389_Repository_ddlCategories" title="Select Category" class="normal" style="width:100px;">
                <option value="5">ALL</option>
                <option value="6">Fiscal</option>
                <option selected="selected" value="7">Human Resources</option>

            </select></td>

Notice the bold part

class="normal" style="width:100px;">

I've been looking all over and I cannot find where to change this.  I even did a search on the whole DNN directory for "class="normal" style="width:100px;">"

I cannot change this with CSS because the style="width:100px;" is the very last thing in that select tag...so it overwrites whatever style I do.  So, in Internet Explorer my "Human Resources" option reads "Human Resourc" because the dropdown menu isn't wide enough. 

Can we get rid of the style="width:100px;"?

Thanks!
-Tim

 
New Post
2/4/2008 7:59 PM
 

Oye,

Okay, I figured it out right after I posted....here's what needs to be done....

1.) Open your header.xml file.

2.) Add the following XML....

<Object>
        <Token>[CATEGORIES]</Token>
        <Settings>
            <Setting>
                <Name>Width</Name>
                <Value>150</Value>
            </Setting>
        </Settings>
    </Object>

Just change what's in <Value></Value> to the width you want the dropdown menu to have.  I wish I could control this with CSS though.  I don't understand why only the width is controlled in the XML.  If anyone figures out how to control this using CSS I'd be interested to know.

Thanks!
-Tim

 
New Post
2/4/2008 8:06 PM
 

Turns out this solution doesn't work for the [ATTRIBUTES]....I tried...

<Object>
        <Token>[ATTRIBUTE:DocumentType]</Token>
        <Settings>
            <Setting>
                <Name>Width</Name>
                <Value>150</Value>
            </Setting>
        </Settings>
    </Object>

For example and no luck.  Anyone know how this works for Attributes?

-Tim

 
New Post
2/4/2008 8:07 PM
 

Oh and that's not a typo... I tried changing my attribute to have no space so I tried it with and without a space in the name.

<Object>
        <Token>[ATTRIBUTE:DocumentType]</Token>
        <Settings>
            <Setting>
                <Name>Width</Name>
                <Value>150</Value>
            </Setting>
        </Settings>
    </Object>

<Object>
        <Token>[ATTRIBUTE:Document Type]</Token>
        <Settings>
            <Setting>
                <Name>Width</Name>
                <Value>150</Value>
            </Setting>
        </Settings>
    </Object>

-Tim

 
New Post
2/5/2008 1:57 PM
Accepted Answer 

you can't set the width or cssclass for individual attribute drop downs. In the header.xml and footer.xml files, the token is [ATTRIBUTES] and setting the cssclass or width will affect all of your attribute selection dropdown lists.

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsRepositoryRepositoryHow do I change the dropdown menu widths for categories, attributes, etc?How do I change the dropdown menu widths for categories, attributes, etc?


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