Stop data retention! Click here & act! Are you a webmaster and want to participate? Here you can find all necessary material for your website - Willst du auch an der Aktion teilnehmen? Hier findest du alle relevanten Infos und Materialien:
Chris Karakas Online Forum Index Karakas Online
 FAQFAQ   Forum SearchForum Search   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
How to Change Width of Modify a Category Drop-Down



 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
   Chris Karakas Online Forum Index -> PHP-Nuke Forum RSS Feed of this Forum
Share this page: These icons link to social bookmarking sites where readers can share and discover new web pages.Digg  del.icio.us  tc.eserver.org  Blinklist  Furl  Reddit  Blogmarks  Magnolia  Sphere  Yahoo!  Google  Windows Live  Technorati  Blue Dot  Simpy  Newsvine  Stumble Upon  co.mments.com  Blinkbits  BlogMemes  Connotea  View previous topic :: View next topic  
Author Message
anthonyaykut
Staff Sergeant
Staff Sergeant


Joined: 07 Jan 2004
Posts: 45
Location: Europe

PostPosted: Wed Jan 07, 2004 12:28 pm    Post subject: How to Change Width of Modify a Category Drop-Down
Reply with quote

How and where can I change Width of "Modify a Category" Drop-Down in the Dropdown Admin??
Back to top
View user's profile Send private message Visit poster's website
chris
Dark Lord of the Sith


Joined: 10 May 2003
Posts: 6267
Location: Outer Space

PostPosted: Wed Jan 07, 2004 5:34 pm    Post subject:
Reply with quote

You mean Downloads Admin? The code that outputs the select boxes is in admin/modules/download.php. Just search the code there for "<select" and you will see them all.

However, there is no way to manipulate the width of a select box in HTML, other than entering a "dummy" option that has a certain length. From <Code_Punk>'s Tutorial on Select Boxes:
Quote:
Open quoteSizing The <select> Box

The width of a select box is determined by the width of the longest line of text beside an <option>. I used a "title line" -- "Pick Your Favorite Browser" -- to make wide box. Of course, "Microsoft Internet Explorer" would have sized the box pretty wide had I left off the title line.

There is no way to set the width of select boxes except by manipulating the text tags associated with <option>s. You can add a margin by beginning and ending your option's text with a &. Close quote


Arrow Tip: The very first category that you ever enter in the Downloads Administration Panel should be a "Dummy" one, with text something like: "Choose your Category here"
_________________
Regards

Chris Karakas
www.karakas-online.de
Back to top
View user's profile Send private message Send e-mail Visit poster's website
anthonyaykut
Staff Sergeant
Staff Sergeant


Joined: 07 Jan 2004
Posts: 45
Location: Europe

PostPosted: Thu Jan 08, 2004 9:54 am    Post subject:
Reply with quote

Indeed this works great - thanks for your pointer!

Anthony
Back to top
View user's profile Send private message Visit poster's website
micahsheets
Private
Private


Joined: 13 Jan 2008
Posts: 1

PostPosted: Sun Jan 13, 2008 5:16 am    Post subject: Another way to set the width of a select box.
Reply with quote

I found this way to do this with an inline css style or you could use an external style sheet and a class or id.

I used the width of 8em because that would be a couple characters wider than what my longest text would be. Using em is nice because I don't have to try and calculate pixels and it will change if the user changes their type size.

Another nice thing about this is you don't have to come up with some long description just to make the box wide enough. I often want to fill the default via php with an actual value so I need the style to set the width.

Code:
<select name="selection" style="width:8em;">
</select>



And another way to get the box to be wide enough is to use the css text-align, like this.

Code:
<select name="selection" style="text-align:center;">
</select>


This will center all the options to the center of the widest one.


Hope this helps.
Back to top
View user's profile Send private message
Share this page: These icons link to social bookmarking sites where readers can share and discover new web pages.Digg  del.icio.us  tc.eserver.org  Blinklist  Furl  Reddit  Blogmarks  Magnolia  Sphere  Yahoo!  Google  Windows Live  Technorati  Blue Dot  Simpy  Newsvine  Stumble Upon  co.mments.com  Blinkbits  BlogMemes  Connotea 
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
   Chris Karakas Online Forum Index -> PHP-Nuke Forum
Page 1 of 1
This page contains valid HTML 4.01 Transitional - click here to check it!
This page contains a valid CSS - click here to check it!

 

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group