Menu
  • HOME
  • TAGS

aligning component in a line

Tag: twitter-bootstrap,twitter-bootstrap-3

I have the following code:

<div class="container">
    <div class="row">
        <div class="col-md-3">
            <div class="input-group">
                <input type="text" class="form-control input-sm" placeholder="Search Ticket" />
                <span class="input-group-btn">
                     <button class="btn btn-default btn-sm btn-default-gradient" type="button">
                         <i class="glyphicon glyphicon-search"></i>
                     </button>
                </span>
            </div>
            <button type="button" class="btn btn-default btn-sm btn-default-gradient">
                <span class="glyphicon glyphicon" aria-hidden="true"></span> Search Tools
            </button>
        </div>
        <div class="col-md-6"></div>
        <div class="col-md-3">
            <button type="button" class="btn btn-default btn-sm btn-default-gradient pull-right">
                <span class="glyphicon glyphicon" aria-hidden="true"></span> New Ticket
            </button>
        </div>
    </div>
</div>

I have a problem with "Search Tools" button, it went down in a new line. It looks like:

enter image description here

What I want is this:

enter image description here

Best How To :

form-group and form-inline should do the trick here.: bootply

<form class="form-inline">
            <div class="form-group">
              <div class="input-group">
                  <input type="text" class="form-control input-sm" placeholder="Search Ticket" />
                  <span class="input-group-btn">
                       <button class="btn btn-default btn-sm btn-default-gradient" type="button">
                           <i class="glyphicon glyphicon-search"></i>
                       </button>
                  </span>
              </div>
            </div>
            <button type="button" class="btn btn-default btn-sm btn-default-gradient">
                <span class="glyphicon glyphicon" aria-hidden="true"></span> Search Tools
            </button>
</form>

integrating my form in your current system:

<div class="container">
    <div class="row">
        <div class="col-md-3">
          <form class="form-inline">
            <div class="form-group col-md-7">
              <div class="input-group">
                  <input type="text" class="form-control input-sm" placeholder="Search Ticket">
                  <span class="input-group-btn">
                       <button class="btn btn-default btn-sm btn-default-gradient" type="button">
                           <i class="glyphicon glyphicon-search"></i>
                       </button>
                  </span>
              </div>
            </div>
            <button type="button" class="btn btn-default btn-sm btn-default-gradient col-md-5">
                <span class="glyphicon glyphicon" aria-hidden="true"></span> Search Tools
            </button>
          </form>
        </div>
        <div class="col-md-3"></div>
        <div class="col-md-3">
            <button type="button" class="btn btn-default btn-sm btn-default-gradient pull-right">
                <span class="glyphicon glyphicon" aria-hidden="true"></span> New Ticket
            </button>
        </div>
    </div>
</div>

boostrap & Normalize.css: spacing problems

html5,twitter-bootstrap,css3

As far as I see you have this style .wrapper { border: 1px solid white; } Try to remove the border style. It should help you....

Border spacing between the columns

html,css,twitter-bootstrap

You can use paddings and a child div .col-xs-4 { padding: 16px; } .col-xs-4 > div { border: 1px solid black; padding: 16px; } <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" rel="stylesheet" /> <row> <div class="col-xs-4"> <div> Lorem ipsum dolor sit amet, consectetur adipisicing elit. Iste necessitatibus, sapiente vitae ullam exercitationem debitis quos quod, consequatur...

Bootstrap dropdown on hover not working, what am I doing wrong?

javascript,jquery,twitter-bootstrap

jQuery(this).find('.dropdown-menu') won't work here as .dropdown-menu is not a child of <a>-#dropdown-filter. .find() searches for children. Use jQuery(this).next('.dropdown-menu')......

Bootstrap Grid on the screen

twitter-bootstrap

As you have not provided code it will be hard to understand the problem in code. But what usually the problem comes is with using container class. So instead of using container class use jumbtron class or container-fluid class as they takes full width of the web page. For more...

how to align column to the right?

angularjs,css3,twitter-bootstrap-3

You can add ' text-right to your <div class="col-md-6 form-group"> please see here http://plnkr.co/edit/rUAdxLJ6ExKZYFbkveuC?p=preview and if you want to have column for 50% of screen even on small devices change col-md-6 to col-xs-6 http://plnkr.co/edit/RxPx0zzT5YmodepQ3zIj?p=preview...

bootstrap center 3 col-md-3 divs

css,twitter-bootstrap

Update: This is good solution for normal layout, not for Twitter Bootstrap as it disrupts the Bootstrap behaviour. Check Jeben's answer for a better layout. A modern browsers solution and apt for your problem. Flexbox technique with justified content. @media (min-width:992px) { .community-images { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox;...

Random opening tabs/pills - bootstrap 3

javascript,css,wordpress,twitter-bootstrap-3

use this code : var items = $('[data-toggle=pill]'); var i = parseInt(Math.floor(Math.random()*items.length)); $('#tabs a:eq(' + i + ') ').tab('show'); ...

How to prevent bootstrap from making font bold?

javascript,jquery,html,css,twitter-bootstrap

The original black color which bootstrap was using was #333. You change it to #000 which makes it appear bolder. Try this $(document).ready (function () { $('.ztag') .hover ( function () { $(this).css({color: '#ff0000'}) }, function () { $(this).css({color: '#333333'}) } ) }) ...

Prevent bootstrap 3 tab from stacking when window is resized (made smaller)

html5,css3,twitter-bootstrap-3

Your tabs breakdown after the width is within 767px, so you can use the below CSS hack. @media (max-width: 767px) { .nav-tabs.nav-justified > li { float: left; width: 50%; } } Bootply...

Disabling right-click for not yet loaded content

jquery,twitter-bootstrap

Use event delegation instead of waiting for $(document).ready: $(document).on("contextmenu","img",function(e){ return false; }); That said, please keep in mind that it's not hard to use the browser's DOM debugger to download your images anyway. Disabling right-clicking is more of a nuisance than a solution, and (in my opinion) you're better off...

Centering navbar pills vertically within the navbar using flexbox

html,css,twitter-bootstrap,flexbox

Set display: flex for the <ul class="nav">, not for items. Also use align-items: center for vertical aligment: .nav { height: 70px; display: flex; justify-content: center; align-items: center; } <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet"/> <div class="container"> <nav class="navbar navbar-default navbar-fixed-top"> <ul id="nav_pills" class="nav nav-pills" role="tablist"> <li role="presentation"> <a href="/">About</a> </li> <li...

Datepicker not showing days - Bootstrap

javascript,jquery,html,twitter-bootstrap,datepicker

DEMO Ok. The problem was with your below line: ("tr:not(:has(>th))").show().filter inside FilterLoggingTable() function. What this does is hides or shows all the trs in the page when criteria is matched!Now why this effects your calendar is because the bootstrap creates table for your calendar when you initialize the datepicker and...

Bootstrap Navbar vertically align Brand with other links

html,css,twitter-bootstrap

Set a negative margin-top value. In your case -1.1px seems perfect. .navbar-inverse .navbar-brand { margin-top: -1.1px; } Output: ...

Remove weird space bootstrap

html,css,twitter-bootstrap

It's actual whitespace usually caused by the spaces in your HTML reflected for inline elements such as images.. You can remove it by making the image display:block img { border: 1px solid red; height: 100%; width: 100%; display: block; } JSfiddle Demo...

Move icon up and inline with my main heading

html,css,twitter-bootstrap

You are accessing the class with wrong selector syntax. Add a dot to the selector. .IconFront { position:absolute; } .img1 { position:relative; top:10px; left:0px; } ...

Content section overlap footer

html,css,twitter-bootstrap,css3,twitter-bootstrap-3

remove - position: absolute for footer create wrapper for page content to push down footer html, body { height: 100%; } body { margin: 0; padding: 0; } .wrapper { min-height: 100%; height: auto; /* Negative indent footer by its height */ margin: 0 auto -60px; /* Pad bottom...

How to set CSS class in AngularJS directive and default if none set?

javascript,angularjs,twitter-bootstrap

Something like this could work: <div class="{{ btnClass || 'btn btn-primary btn-upload'}}" ng-click="openModal()"> <i class="fa fa-upload"></i> Upload </div> And then the directive: angular.module('documents').directive('documentUpload', ['$timeout', '$translate', '$q', '$docs', function ($timeout, $translate, $q, $docs) { return { restrict: 'E', scope: { text: '@', refId: '@', refType: '@', documents: '=', btnClass: '=' //**...

Left and Right Carousel Controls not Working when Smooth Scroll for Anchor Tags Used

javascript,jquery,twitter-bootstrap,carousel

Then you just have to edit you code for the smooth scroll like this, depending if you have the ID header-menu or class header-menu Change $('a[href*=#]:not([href=#])').click(function() { to (if you use the ID header-menu) $('#header-menu a[href*=#]:not([href=#])').click(function() { or (if you use the class header-menu): $('.header-menu a[href*=#]:not([href=#])').click(function() { This way you...

RequiredFieldValidator not working in my ASp site

c#,css,asp.net,twitter-bootstrap

You just miss a little thing i.e. to assign a Validation Group to your buttons and your RequiredFieldValidators. Your code should be: <div class="container"> <h2>Registration</h2> <p>Please fill out the forms to complete your registration.</p> <form role="form"> <div class="form-group"> <label for="username">Name:</label> <asp:TextBox runat="server" ID="UserName" CssClass="form-control" /> <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"...

React js css transitions on class removal

twitter-bootstrap,reactjs,css-transitions

You just need a width transition, since the width CSS property is defined on both the col-xs-2 and col-xs-12 classes. http://jsfiddle.net/5pvkjwth/2/...

Bootstrap navbar toggle button not collapsing

javascript,jquery,html,css,twitter-bootstrap

You should be using the <script> tag to reference JS files <script src="bower_components/bootstrap/dist/js/bootstrap.min.js"> Not <link>. These are for stylesheets. <link rel="stylesheet" href="bower_components/bootstrap/dist/js/bootstrap.min.js">...

How to fit the title to the entire page

html,css,twitter-bootstrap

You just need to remove margin-left: -29px; from #titlebig. For example: body { background-color: black; margin: 0px; padding: 0px; } div { margin: 0px; padding: 0px; } .header { color: white; font-family: "HelveticaNeueLight", "HelveticaNeue-Light", "Helvetica Neue Light", "HelveticaNeue", "Helvetica Neue", 'TeXGyreHerosRegular', "Helvetica", "Tahoma", "Geneva", "Arial"; } .box { background-color: aqua;...

Bootstrap toggle doesn't display well when added dynamically

javascript,jquery,twitter-bootstrap

You need to call the bootstrapSwitch() again after adding and with a new ID, class or else it will alter the states of existing toggle as well. $('.btn').on('click', function () { $('p').after( '<input id="newCheckBox" type="checkbox" data-off-text="Male" data-on-text="Female" checked="false" class="newBSswitch">' ); $('.newBSswitch').bootstrapSwitch('state', true); // Add }); JSfiddle...

Calling AngularJS function from a remote page loaded by Bootstrap modal

javascript,angularjs,twitter-bootstrap

You don't need to create two 'ng-app'. With only two controllers but with the same ng-app, you can do the job. Can you try something like this : (EDIT: the code bellow doesn't works) <div ng-controller="saveFormController"> <div class="modal-header"> <button class="close" data-dismiss="modal" type="button"> <span aria-hidden="true">×</span> <span class="sr-only">Close</span> </button> </div> <div class="modal-body">...

How to update the value of data attribute using jquery

javascript,jquery,twitter-bootstrap

You should update the attribute value, rather than updating data property: $('#collapseDiv').on('shown.bs.collapse', function () { $('.icon-before').attr('data-icon', '&#xf147').text('Show Less'); }); $('#collapseDiv').on('hidden.bs.collapse', function () { $('.icon-before').attr('data-icon', '&#xf196').text('Show More'); }); ...

End to end alignment of 3 Columns using Bootstrap

twitter-bootstrap

You can use the text-align property for alignment. No need to have col-md-11 wrapped inside it. .col-md-4:last-child { text-align: right; } .col-md-4:nth-child(2) { text-align: center; } <link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet" /> <div class="container"> <div class="row"> <div class="col-xs-4 col-md-4"> <div class="col-md-11"> <!-- Remove --> <h1>Head 1</h1> </div> </div> <div class="col-xs-4 col-md-4">...

.NET MVC: Finding default Bootsrap JavaScripts

javascript,asp.net-mvc,twitter-bootstrap

You can reference the open li using css class selector '.': $(".dropdown.open") this will give you the currently open dropdown. Explanation: 'CSS selectors' allow you to select elements using CSS syntax. For example: '#id' where the '#' indicates the following text is the id of the element. '.class' allows you...

MvcSiteMapProvider - Enhanced bootstrap dropdown menu

c#,twitter-bootstrap,asp.net-mvc-5,mvcsitemapprovider,mvcsitemap

node.Descendants should be node.Children Learn the difference on Descendants and Children here, CSS Child vs Descendant selectors (Never mind the post beeing about CSS, this is a generic pattern)...

Bootstrap 3 DatePicker - How to reset selected date without resetting the picker configuration?

jquery,twitter-bootstrap,datepicker

You need to get the current datePicker instance and call setDate(null) on it. you can do it like this: $("#clear").click(function(){ $('#myDatepicker').data('datepicker').setDate(null); }); updated fiddle: http://jsfiddle.net/4L6fhjLf/2/...

Marionette CompositeView - change in template each nth items

twitter-bootstrap,backbone.js,marionette,composite-view

You can exploit Collection/CompositeView's childViewOptions which accepts a function. From the CompositeView you can pass the template you need. So for example: childViewOptions: function () { var template = defaultTemplate; if (++this.childCount % 4 == 0) // 3 children have been rendered, this one is the 4th template = fourthTemplate;...

adding background image in style rails 4

ruby-on-rails,twitter-bootstrap,ruby-on-rails-4,asset-pipeline

You should change "background-image:"url(image-url('lines3.png')"; into "background-image:"image-url(image-url('lines3.png')"; http://guides.rubyonrails.org/asset_pipeline.html#css-and-sass Or you can try with: background-image: url(<%= asset_path 'lines3.png' %>)...

CSS - Bootstrap centering col-md-3 with weird results

css,twitter-bootstrap

You have to separate the col- divs into rows in order for them to work properly: (also remember to close your divs) <div class="wrapper"> <div class="row"> <div class="col-md-3"></div> <div class="col-md-3"></div> <div class="col-md-3"></div> </div> <div class="row"> <div class="col-md-3"></div> <div class="col-md-3"></div> <div class="col-md-3"></div> </div> <div class="row"> <div class="col-md-3"></div> <div...

Bootstrap Modal popup not scrolling with keyboard

jquery,twitter-bootstrap

Keystrokes are only detected by the element that currently has the focus, so your keydown event won't trap anything if the focus is on an element in the background. I suggest doing the following: Making your modal focusable by giving it the tabIndex=-1 attribute Setting it to have the focus...

Bootstrap 'form-group has-error' not working with php codes [closed]

php,html,twitter-bootstrap

Note: If a user submits the form with empty fields except for gender, it will return true and will go to your insert statement. It will overwrite the value of your $valid variable in every if() statement. You can try this instead for assigning value on your $valid variable: if(empty($fname)...

Why does my hover button dropdown not stay open when I mouse-over?

javascript,jquery,twitter-bootstrap

It's because your hover handler is on the button element and as soon as you mouseover the menu element the "mouseout" handler triggers because you left the button. Instead your handler should be on the surrounding .dropdown element. $('.dropdown').hover(function () { $(this).find('.dropdown-menu').stop(true, true).delay(200).fadeIn(); }, function () { $(this).find('.dropdown-menu').stop(true, true).delay(200).fadeOut(); });...

Setting up the page grid using push and pull

html,twitter-bootstrap,css3,twitter-bootstrap-3

Make sure you don't add a period (.) inside of the class attribute. When using push/pull, you need to offset the columns from where they would normally go. Moving them left or right won't change their underlying order in the document flow. So you can do it like this:...

Bootstrap 3 col-sm-4 creates two columns instead of 3

html,css,twitter-bootstrap

Your problem lies in the styling being applied to the figure tag element by the normalize.css (some additional margins in the variety of 1em for margin-top and 40px for margin-right, causing your content to be wider than Bootstrap's 33.3% width for the col-sm-4 divs). Either switch your figure elements to...

change icon on collapse in Bootstrap 2.3 not in bootstrap 3

javascript,jquery,css,html5,twitter-bootstrap

Updated. Yes - the first pure CSS solution was not satisfactory. If you dare to add some javascript, you can do this : $('.accordion-group').on('show', function() { $(this).find('.accordion-toggle').removeClass('arrow-down').addClass('arrow-up'); }); $('.accordion-group').on('hide', function() { $(this).find('.accordion-toggle').removeClass('arrow-up').addClass('arrow-down'); }); It is using the bootstrap collapse hide / show events directly on the collapse sections. Still without...

Owl Carousel implementation

jquery,twitter-bootstrap,carousel,owl

You forgot to load jQuery! Try: <footer> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> <script src="js/plugin/owl.carousel.min.js"></script> <script src="js/custom.js"></script> </footer> ...

AngularJS & Bootstrap Modal - loading template outside controller

angularjs,twitter-bootstrap,angular-bootstrap

A good way to reuse your template is to put it in a separate html file and put its url in templateUrl. So $modal can get it from server every time needed.

how can I add a caption on hover with a img-circle image in bootstrap

javascript,jquery,html,css,twitter-bootstrap

Well I think I figured it out. But I'd love to hear if there is a nicer way to do this. HTML: <section id="design"> <div class="row"> <div class="col-sm-3 col-sm-offset-1"> <div class="circular pic img-circle" id='hatchBkgd'> <h3>Hatch</h3> <p>Typography, Print Design</p> <a href="hatch.html"><img src="http://i.imgur.com/IlW9pin.png" class="img-responsive img-circle fig"> </a> </div> </div> <div class="col-sm-3"> <div...

How to make background body overlay when use twitter-bootstrap popover?

html,css,twitter-bootstrap

Posting some more code would be nice. This should work. Use some jQuery or AngularJs or any other framework to make the .overlay initially hidden, then to make it visible when needed. If you need help, comment. If it helps, +1. EDIT $(function() { $('[data-toggle="popover"]').popover({ placement: 'bottom' }); $("#buttonright").click(function() {...

after puttin php syntax, my website get stuck at preloader

php,twitter-bootstrap,session

Remove the ; after$session->user_name;

Bootstrap 3 collapsed menu not working on mobile screens

jquery,css,twitter-bootstrap,twitter-bootstrap-3

1mjp Hi there, have a look at the Fiddle here. Or the snippet below. It only has standard Bootstrap css/js. And your menu, which works fine, no problem like in your website. Have a look to see if you have some js closing the link when clicked. I think you...

Put form fields two per line in bootstrap form

html,forms,twitter-bootstrap-3

You have to include the rows in a div. <div class="rows">. <div class="col-md-10"> <div class="form-group"> <legend>1st sth</legend> <div class="row"> <div class="col-md-2"> <select class="form-control" id="select"> <option value="1">1</option> <option value="1">1</option> <option value="1">1</option> </select> </div> <div class="col-md-3"> <input type="text" class="form-control" id="inputName" placeholder="name"> </div>...

Modal from inside Bootstrap Tabs using Knockout foreach

jquery,twitter-bootstrap,knockout.js,twitter-bootstrap-3

I suggest using a totally different pattern for this. Use one Bootstrap modal at the level of your $root view model. This modal shows data for a root view model observable currentModalItem and is hidden when that observable is null. The modal is activated by setting that observable from inside...