Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Wordpress Category widget - how do you style it?

Featured Replies

Hiya,

 

I am trying to style the Wordpress Category dropdown as the dropdown is far too wide.

 

Here is the html code:-

 

<div id="sidebar">
<ul>
<div class="sidebarSearch clearfix">
<h2 class="widgettitle">Recommended Posts</h2>
<ul>
<h2 class="widgettitle">Recent Posts</h2>
<ul>
<h2 class="widgettitle">Categories</h2>
<select id="cat" class="postform" name="cat">
<option value="-1">Select Category</option>
<option class="level-0" value="503">Example</option>
</select>

 

Thanks in advance :-)

Have you tried looking in the inspector in your browser to see what html, classes and divs are being outputted?

  • Author

Hiya,

 

I got the above code from the inspector in my browser, the output code for dropdown is:-

 

<select id="cat" class="postform" name="cat">
<option value="-1">Select Category</option>
<option class="level-0" value="503">Example</option>

 

I have not written any CSS for this so there's nothing to attach as it is a plugin.

 

Thanks :-)

Adjust the CSS properties for #cat in your CSS like so:

 

#cat {
    width:200px; /*OR WHATEVER YOU WANT IT TO BE */
}

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.