Posts

Showing posts with the label Bootstrap

Bower: Installing Bootstrap without jquery

    For one of my projects I was using AngularJs and UI Bootstrap. Which converts all the jquery code to angular code and adds some helpful directives. From what I notice with bower was that I couldn't install bootstrap without jquery. Since it was a dependency of bootstrap.    Note, I'm still working on this!  It's important for me publish this since I've gotten so far with it. As started out I thought what I could do was to install the bower components and then try to exclude jquery in a separate folder. However in another article I will look at a better solution. Which will be where just ignore the jquery and combine the files I want. However I can see reasons for both approaches. Like in my case I wanted to remove some nuget packages and then pass off that task to bower, which I think is now how Asp.net vnext is doing it. In my case though there was too many views names js/css files and just too many js and css files.     So this first part isn't much but I t

Bootstrap: btn-lg is smaller than input-lg

Link:  btn-lg is smaller than input-lg Example:  input-size-bootstrap Issue     In all modern browsers except in IE10+, it seems that the large buttons with large inputs for input groups are smaller. The difference is only a pixel but is noticeable on some screens. To be clear this issue can be avoided if you  use the input-group-lg  however my test prove that the heights stay consistent regardless which style classes you use. I didn't find this out until I started looking into the issue and I think this is kinda nit picking but something that should be corrected to prevent future mistakes. Changes     For my first attempt I tried changing the @line-height-large but if I changed the @line-height-large this affects the input-group-lg, and select input-group-lg as well as the large buttons. So instead to just change the large buttons I set the large button line-height by adding a 0.01 value. This still had problems in firefox, which lead me to the final solution below.  File(s

Server-side Browser Detection with Bootstrap

    One thing I love about bootstrap is that it eliminates the need to create separate views or pages to handle both types of clients (mobile/desktop) . A few years back when Asp.net MVC 4.0 first came out and before the big boom of "mobile first" styled css libraries there was a huge additional feature for server side detection. Now this was back in the early parts of my career so I was not sure where this feature would fit in or if it would ever. Since then I have been looking at all types of frameworks and server side detection systems but ultimately have been moving toward the bootstrap style mentality until I looked at my blog. Blogger actually does all the work for me so I didn't have do anything to create this.     The thought behind this is to minimize the amount of information you sent to the user. Its great that you hidden it to the user on mobile devices and even design it with them in mind. However they are still getting all that information, which seems li

Bootstrap: Navbar Header

    I don't see too many examples in bootstrap with something like this but what it is incase you don't know is a banner of some kind above the navbar. In fact I don't see too many sites with this kind of structure lately and from my experience I can understand why not. If you're going for responsiveness it's difficult to create since you are always checking to see if you have enough space on both sides for whatever it is your trying to display in between. From the sites that I have seen that do have this can really pull it off and use something similar to bootstrap's affix feature.     When I first started using bootstrap which was sometime around 3.0, I was using the navbar-brand to hook into the styles already written for me. However since  bootstrap 3.1    navbar-brand   has now been given a height where before I was using the image's auto or attributes to adjust the height. I was able to give my header an even amount of padding around my header which

Compiling Bootstrap LESS using Asp.net MVC and Web Essentials

Image
    My goal is to work with others in whatever framework they choose but I'm constantly update css styles with a pre-processor so that I do not have to work with the css libraries directly. Download the   Web Essentials  and the Bootstrap less nuget package. Get this nuget package! I see it all the time where developers install the wrong packages, sometimes theres ones with similar names and you just not sure what the differences are. So just so we're clear its the first package with the bootstrap .less in the name. Just search for bootstrap less as two seperate keywords, should be no problem. Solution For this solution did  not have to change thing with my setup or move around files on the directory once I got things up and running. I even made it easier for colleagues to come into web applications without any problems so in case they are new to bootstrap they can simple ignore the less files. Now what I did was create  separate  bootstrap.less file and did some reg

Ng-grid: Sorting Ascending and Descending with Font-Awesome

    I wrote this little snippet for some requirements a while back but since it's so general and if it helps the project to have a quick template to grab it I think it would be much greater to share. Also I was just wanted to write out the documentation as I was learning Angularjs along with ng-grid for the first time during the time I wrote it. So it should be clear that the dependencies are Font-awesome ,  Ng-grid  and Angularjs for this snippet. When I wrote this when I was using Angularjs v1.2.16 stable, font-awesome v4.1.0 both it should not be a problem moving forward but with Ng-grid I used v2.7. It may break with later version as I know a lot has or will change in the template. This snippet should work in all browser but I only tested for Chrome, FireFox, IE8 and greater. My Code $templateCache.put("headerCellTemplate.html", "<div class=\"ngHeaderSortColumn {{col.headerClass}}\" ng-style=\"{'cursor': col.cursor}\" ng

Bootstrap Typeahead/Autocomplete

    This UI feature goes by many names and whatever you call it is currently no included in the bootstrap project as of 3.1.1 but that might change in later versions. No all hope is lost, actually had found multiple alternatives to import this feature with no dependencies! My biggest concern I had at the start of my research for this feature was that I would have to include Jquery UI which as Autocomplete. Not that there is anything wrong with Jquery UI but I try to avoid adding too many third party styles into my applications. I also try to leverage the css files that I do have as much as possible. So below is two solutions that I am very comfortable with using and strongly suggest. Typeahead/Autocomplete Projects https://github.com/twitter/typeahead.js/ https://github.com/devbridge/jQuery-Autocomplete  -  Another approach which I have used. Resources jquery - Where is the typeahead javascript module in bootstrap 3 RC 1? - Stack Overflow Install typeahead in Bootstrap 3, fix

Bootstrap Dropdown-Checklist

    When it comes to web development there is a lot of ways achieve what you want but more importantly it is critical to know what to look for if you have no clue how to achieve it. Over the last five years I have become very efficient at finding examples to achieve my work and to push that even further what I have done is put those code snippets in my back pocket for other projects. Some codes I come across I modify for my own use, others I can simply plug n' play but having that code off hand is quicker than writing it. So what I'm leading up to is an example of that concept. I had a task recently to make a dropdown styled in bootstrap , where inside the dropdown was a series of checkboxes. Now by default the behavior for bootstrap would close dropdown immediately after I clicked. What I need is to keep the dropdown open until it is blurred. What I found with a quick search was what I needed but still once I had the code, and rather than just plugging' it in. What I did

Popular posts from this blog

UI-Bootstrap Collapsible Sticky Footer

Installing Windows on Acer chromebook 15 cb3-532

Aspetcore: NLog with Postgresql