LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-13-2021, 08:31 PM   #1
pizzipie
Member
 
Registered: Jun 2005
Location: Hayden, ID
Distribution: Ubuntu 20.04
Posts: 384

Rep: Reputation: 9
Select Box will not hide Vertical Scroll Bar


Trying to hide vertical scroll bar in a 4-choice Select Box. My css is not working. See attachment for screenshot.

CSS for select is below. Any help appreciated.
R

Code:
input[type=text], select {
  display: inline-block;
  width: 75%;
  padding: 5px;
  margin: 2px 0;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
  font-size: 20px;
  font-weight: bold;
  background-color: var(--box-bgcolor);
  color: blue;
}

select {
	overflow-y: auto;
}
Attached Thumbnails
Click image for larger version

Name:	selbox.png
Views:	15
Size:	5.1 KB
ID:	37205  
 
Old 09-14-2021, 05:54 PM   #2
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=14, FreeBSD_12{.0|.1}
Posts: 5,715
Blog Entries: 11

Rep: Reputation: 3747Reputation: 3747Reputation: 3747Reputation: 3747Reputation: 3747Reputation: 3747Reputation: 3747Reputation: 3747Reputation: 3747Reputation: 3747Reputation: 3747
Quote:
Originally Posted by pizzipie View Post
Trying to hide vertical scroll bar in a 4-choice Select Box. My css is not working. See attachment for screenshot.

CSS for select is below. Any help appreciated.
R

Code:
input[type=text], select {
  display: inline-block;
  width: 75%;
  padding: 5px;
  margin: 2px 0;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
  font-size: 20px;
  font-weight: bold;
  background-color: var(--box-bgcolor);
  color: blue;
}

select {
	overflow-y: auto;
}
CSS overflow-y property

... from which I suspect that it is doing exactly what you told it to do given the size of the list, border, padding and margin constraints.

Have you tried hidden to see what is overflowing and whether the scrollbar disappears?

Last edited by astrogeek; 09-14-2021 at 06:40 PM. Reason: ptoy
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] kicker - Relaunch task bar/ tray bar (the bar at the bottom of screen). andrewysk Linux - Newbie 3 03-18-2021 03:19 PM
[SOLVED] Firefox 77.0.1 (64 bit) - no vertical scroll bar GPGAgent Linux - Software 3 07-17-2020 12:18 PM
Widen Vertical Scroll Bar in KDE swamprat Linux - Desktop 1 12-26-2007 08:41 AM
Firefox vertical scroll bar problem rahilrai SUSE / openSUSE 8 04-24-2006 04:05 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:22 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration