bootstrap-4

what's the shortest way to write this css? [duplicate]

青春壹個敷衍的年華 提交于 2019-12-20 07:39:29
问题 This question already has answers here : What do commas and spaces in multiple classes mean in CSS? (9 answers) Using regular expression in css? (8 answers) Closed 2 months ago . What's the shortest way to to make this css shorter in some kind of combined way? [data-pageid="187"] .sidebar-nav-heading { display: none; } [data-pageid="188"] .sidebar-nav-heading { display: none; } [data-pageid="189"] .sidebar-nav-heading { display: none; } 回答1: [data-pageid="187"] .sidebar-nav-heading, [data

Bootstrap 4 - center text with button label

廉价感情. 提交于 2019-12-20 07:09:24
问题 I want to achieve a very simple goal: I have a line - text aligned to left and a button to right. And I want the text to be vertically aligned to button's label. I tried to play with padding, margins,... but nothing worked. I believe there is a simple and smart solution I am missing. Plunker demo: https://plnkr.co/edit/KwRF2uOmKc3aPFQW9DXn?p=preview <div> <span> This text should match the "Submit" text </span> <button type="button" class="btn btn-secondary float-right">Submit</button> </div>

How to custom checkbox and radio in Django using Bootstrap?

a 夏天 提交于 2019-12-20 06:19:04
问题 I am trying to customize the checkboxes and radios in Django using bootstrap class. However, it has not worked. I already tried to insert the bootstrap class in forms.py with widgets and attrs : custom-control custom-radio custom-control-inline custom-control-input custom-control-label My code: models.py Y = 1 N = 2 YN = ( (Y, 'yes'), (N, 'no'),) class Prop(models.Model): yesorno = models.IntegerField(choices=YN, default=Y, verbose_name='Label...') forms.py class PropForm(forms.ModelForm):

Can I change what background colour should be depending upon the time?

依然范特西╮ 提交于 2019-12-20 06:07:00
问题 I created a good looking website using html5, CSS, bootstrap. I wanted to know if I can change the background colour and nav bar selection colour automatically in code during day (blue) and during night (dull red). Is there anything I can do to change the colour of nav bar and background based on user's time? Here's my code: <body> <nav> <h1 style="font-family:Helvetica;"> <ul class="nav"> <li><a href="#">Menu 1</a> <ul> <li><a href="#">Sub-menu Item 1</a></li> <li><a href="#">Sub-menu Item 2

Can I change what background colour should be depending upon the time?

拜拜、爱过 提交于 2019-12-20 06:06:25
问题 I created a good looking website using html5, CSS, bootstrap. I wanted to know if I can change the background colour and nav bar selection colour automatically in code during day (blue) and during night (dull red). Is there anything I can do to change the colour of nav bar and background based on user's time? Here's my code: <body> <nav> <h1 style="font-family:Helvetica;"> <ul class="nav"> <li><a href="#">Menu 1</a> <ul> <li><a href="#">Sub-menu Item 1</a></li> <li><a href="#">Sub-menu Item 2

Can't change nav-bar link's color in Bootstrap 4

白昼怎懂夜的黑 提交于 2019-12-20 05:59:29
问题 I am trying to change nav bar's one link's color while I tried all ways it still has a default color. Here is the code: <li class="nav-item signup"> <a class="nav-link" routerLink="/signup" >Sign Up</a> </li> css .navbar-light .navbar-nav .nav-link li a.signup { color:#ffffff !important; } I am trying to change sign up buttons link color. An interesting fact is that the background color of nav-item (.signup class) was possible to change while a link is impossible. How can I change that a link

Bootstrap 4 navbar with two rows, bottom row collapsible

五迷三道 提交于 2019-12-20 05:46:12
问题 I would like the 2 navbars to appear in two separate rows, with all the links (collapsible items) in the bottom, and a header and toggle button in the top row. Like this: ------------------------------------------------------ ONE_________BIG_________TITLE [Toggle] ------------------------------------------------------ Nav items Icon Links Forms ... ------------------------------------------------------ Top row will be expanded in both mobile and desktop devices, but the toggle button should

JQ event didnt active on the extract row sort by datatable.js

流过昼夜 提交于 2019-12-20 05:42:13
问题 I'm using DataTable.js to showing the data and I have some <select> option in my <tr> and DataTable are showing the 10 frist row with default param and I have a change event with JQ. Here is my problem, the JQ .change() event only work at the 10 frist row. If I change the show option in the user view (no in the code source), it still work for the 10 frist row. I tried to add onchange="changeEvent" on the select element.. well it didnt show up in user display code source $('select[name="type"]

Why does my link break (stop navigating to its location) when I use data-toggle attribute?

泪湿孤枕 提交于 2019-12-20 05:38:20
问题 I am having a play around with Bootstrap 4 in Rails 5 and I am trying to get a data-toggle to work on nav-pills . With my code below, the pill toggle works and it breaks the link_to part of the code and the link doesn't work. <div class="card"> <div class="card-block"> <ul class="nav nav-pills nav-justified" role="tablist"> <%= link_to 'All Things', all_things_path, class: 'nav-link nav-item active' %> <%= link_to 'Some Things', some_things_path(@things[0]), class: 'nav-link nav-item', "data

Bootstrap navbar: nothing is displayed on smaller devices

二次信任 提交于 2019-12-20 04:49:55
问题 This nav bar with logo image in the middle works really well on larger screens but on smaller screens, everything disappears including logo image (and the hamburger fails to be displayed) Does anyone know a fix for this issue? Here's the link: http://codepen.io/davidcochran/pen/Fkwys #navbar-primary .navbar-nav { width: 100%; text-align: center; } #navbar-primary .navbar-nav > li { display: inline-block; float: none; } #navbar-primary .navbar-nav > li > a { padding-left: 30px; padding-right: