logo
down
shadow

How to set width of drop-down button by customizing bootstrap?


How to set width of drop-down button by customizing bootstrap?

By : fastrecruitmentwebsi
Date : November 20 2020, 04:01 AM
Hope this helps
code :
var w = $(".dropdown-menu").width();
$(".selector-dropdown").width(w-15);
.dropdown-menu, .selector-dropdown {
    width: auto;
    height: auto;
}

.btn-group, .btn-group-vertical {
    position: relative;
    display: inline-block;
    vertical-align: middle;
}

.btn-group .dropdown-toggle:active, .btn-group.open .dropdown-toggle {
    outline: 0;
}

.btn-group>.btn:first-child {
    margin-left: 0;
}


.open>.dropdown-menu {
    display: block;
}
.dropdown-menu, .selector-dropdown {
    width: auto;
    height: auto;
}

.dropdown-menu {
    -webkit-box-shadow: none;
    border-radius: 1px;
}
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    display: none;
    float: left;
    min-width: 160px;
    padding: 5px 0;
    margin: 2px 0 0;
    font-size: 14px;
    text-align: left;
    list-style: none;
    background-color: #fff;
    -webkit-background-clip: padding-box;
    background-clip: padding-box;
    border: 1px solid #ccc;
    border: 1px solid rgba(0,0,0,.15);
    border-radius: 4px;
    -webkit-box-shadow: 0 6px 12px rgba(0,0,0,.175);
    box-shadow: 0 6px 12px rgba(0,0,0,.175);
}

li {
    display: list-item;
    text-align: -webkit-match-parent;
}

.dropdown-menu>li>a {
    font-size: 24px;
}

.dropdown-menu>li>a {
    display: block;
    padding: 3px 20px;
    clear: both;
    font-weight: 400;
    line-height: 1.42857143;
    color: #909090;
    white-space: nowrap;
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div class="dropdown open btn-group">
	<button id="vanaf" role="button" aria-haspopup="true" aria-expanded="true" type="button" class="selector-dropdown dropdown-toggle btn btn-default">alle 
		<span class="caret"></span>
	</button>
	<ul role="menu" class="dropdown-menu" aria-labelledby="vanaf">
		<li role="presentation" class="active">
			<a role="menuitem" tabindex="-1" href="#"> alle </a>
		</li>
		<li role="presentation" class="">
			<a role="menuitem" tabindex="-1" href="#"> Meta </a>
		</li>
		<li role="presentation" class="">
			<a role="menuitem" tabindex="-1" href="#"> Kuns</a>
		</li>
		<li role="presentation" class="">
			<a role="menuitem" tabindex="-1" href="#"> KartKartKartKartKart </a>
		</li>
	</ul>
</div>


Share : facebook icon twitter icon
Bootstrap customizing button style

Bootstrap customizing button style


By : Willy Mills
Date : March 29 2020, 07:55 AM
it helps some times On bootstrap .css , find all styles for btn-primary and copy them to your custom .css.
Now change the name to the color as you want .btn-primary = .btn-blue
code :
<button class="btn btn-customcollor">Custom Button</button>
.btn.btn-gray {
    border: 1px solid #626e7f;
    -webkit-box-shadow: inset 0 1px 2px #9aa4b1;
    -moz-box-shadow: inset 0 1px 2px #9aa4b1;
    box-shadow: inset 0 1px 2px #9aa4b1;
    background: #758294;
    background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzhjOTdhNiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzc1ODI5NCIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
    background-size: 100%;
    background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #8c97a6), color-stop(100%, #758294));
    background-image: -webkit-linear-gradient(top, #8c97a6, #758294);
    background-image: -moz-linear-gradient(top, #8c97a6, #758294);
    background-image: -o-linear-gradient(top, #8c97a6, #758294);
    background-image: linear-gradient(top, #8c97a6, #758294); 
}


.btn.btn-gray:hover {
    background: #728092;
    background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzhjOTdhNiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzcyODA5MiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
    background-size: 100%;
    background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #8c97a6), color-stop(100%, #728092));
    background-image: -webkit-linear-gradient(top, #8c97a6, #728092);
    background-image: -moz-linear-gradient(top, #8c97a6, #728092);
    background-image: -o-linear-gradient(top, #8c97a6, #728092);
    background-image: linear-gradient(top, #8c97a6, #728092);
    -webkit-transition: box-shadow 0.05s ease-in-out;
    -moz-transition: box-shadow 0.05s ease-in-out;
    -o-transition: box-shadow 0.05s ease-in-out;
  transition: box-shadow 0.05s ease-in-out; 
}


.btn.btn-gray:active {
    background: #818d9d;
    border-color: #5d6979;
    -webkit-box-shadow: 0 0 5px #818d9d inset;
    -moz-box-shadow: 0 0 5px #818d9d inset;
    box-shadow: 0 0 5px #818d9d inset; 
}

.btn-group.open .btn.btn-gray.dropdown-toggle {
    background-color: #8c97a6; 
}
Twitter Bootstrap - Button Width in Drop-down menu

Twitter Bootstrap - Button Width in Drop-down menu


By : Trevor Harms
Date : March 29 2020, 07:55 AM
this will help Fairly new to bootstrap-- but I have a button and drop down menu which is composed of an unordered list containing buttons. How would I make the button widths all the same-- or am I completely off base with my code: , You can add 'btn-block' to your buttons...
code :
<button class="btn btn-large btn-block">
Customizing the width of twitter bootstrap

Customizing the width of twitter bootstrap


By : msharma
Date : March 29 2020, 07:55 AM
Hope this helps Go to: Customize Bootstrap
Scroll down to Container sizes, there you can change the Container size.
Adjusting the width of the select drop button in bootstrap

Adjusting the width of the select drop button in bootstrap


By : Basstrax
Date : March 29 2020, 07:55 AM
I hope this helps . Well, if you are using Bootstrap, the class .form-control by default has the following properties:
code :
.form-control {
    position: relative;
    z-index: 2;
    float: left;
    width: 100%;
    margin-bottom: 0;
}
<div class="form-container">
    <select class="form control">
        <option value= "1">one</option>
        <option value= "2">two</option>
        <option value= "3">three</option>
    </select>
</div>
.form-container{
    width: 30%; //or width: 200px, etc
}
Customizing max-width value for Bootstrap .container

Customizing max-width value for Bootstrap .container


By : Alvaro Mello
Date : March 29 2020, 07:55 AM
it should still fix some issue From what I can tell using Bootstrap v3.3.7 there is no max-width property on the container class.
There is a width property. Which will decide the actual width if it is smaller then max-width.
Related Posts Related Posts :
  • Add label to image link
  • HTML Display info in a select option from an array?
  • jQuery expand/hide with cookie
  • How to conditionally apply css to differently nested content
  • Bootstrap align icon to leftside of button
  • Click on Hyperlink for TD Object
  • patternlab twig drupal8 bootstrap
  • get value from json object in html
  • Sending input value with formArray values?
  • Are people making a mistake when they say that static files are .html, .js etc?
  • Flex column: How to display 2 item on the same line
  • Golang to create a main layout webpage
  • Show div even if empty
  • Table width not updated when I hide native scroller of div
  • why is there this extra section in my code?
  • How to post data received from the server onto the client website
  • Resize dynamically div by text size
  • CSS text overlap. Z-Index doesn't works
  • How to Generate TOC page numbers with CSS in pdf
  • Smoothly removing animation from div
  • How can I pass a URL with query parameters to another URL as a query param?
  • Retrieve tags from an HTML page to import them into another HTML file
  • Bootstrap 4 Card Flex Width is not working correctly on Firefox
  • Bootstrap 3 Vs Bootstrap 4
  • CSS: How to position image across two columns, with wrap text? (img included for reference)
  • Change Color and background of the after content while hover
  • CSS fade children when hovering over parent div, then change again when hovering over child
  • Using table cell on dd
  • How to change <a href> color / remove formatting
  • Why do the colours of my document not change when the button is clicked?
  • How to allow for users to keyboard tab over and select invisible checkboxes with visible labels?
  • Overflow clipped, rest of the content visible
  • How to set height of "number-parent" class div equal to "active-lg" class div without JS
  • How do I make a menu scroll with the page only within a section?
  • Extra space on sides of images in outlook when creating HTML email
  • how to space div with content inside in html
  • Confusion when combining flex and absolute positioning
  • I can't remove spacing between letters. Even with 0px letter spacing it still has too much space
  • Using :visited on links doesn't work properly
  • nav article and aside widths sum is 100% but the aside goes to new line
  • Add flag image to select option
  • Content Scrolling / Overflowing Horizontally
  • Content of fieldset is moving out of legend container
  • How to change style of an HTML tag *inside* an Angular component?
  • Is rel="prerender" deprecated in Google Chrome?
  • How to align an image to the bottom of the div using flex?
  • Mat-checkbox [checked]="false" does not work angular 6
  • Laravel + Ajax, proper way to present data to html
  • VueJs CLI import/compile html string to vue
  • Import collection using button importing same collection multiple times - Postman
  • Striped table in HTML
  • Tooltip does not load in HTML
  • Play Button Alignment Issues in HTML/CSS
  • Text alignment and absolute positioning
  • There is no space on the right for overflow scroll items in Flexbox CSS
  • RadioField never validates correctly
  • How can I indent text to avoid wrapping around an icon?
  • HTML navbar header width
  • How to animate a circle for a clock effect in SVG animation using CSS3 or VanillaJS?
  • Animation delay in SVG not respected
  • shadow
    Privacy Policy - Terms - Contact Us © bighow.org