Button image with Bootstrap 3 buttons - css

In a page with Bootstrap 3, I'm using standard buttons with different colors/shading (generated in a Bootstrap Button Generator). I'm trying to use an image so that it will be the background of the button, and still scale horizontally inside the containers.
The problem with using the standard methods that I was able to find is that the button appears as an image inside the bootstrap button. Maybe this is doable without bootstrap buttons, and if it works, no problem with me.

After a while of tinkering, I was able to use it with the background-size (100% as #Aibrean mentioned) and background-repeat set as no-repeat.

Related

Bootstrap.4 - Building Carousel Using Slick

I am trying to build a responsive carousel as present in Mecca website. I am using Bootstrap 4 and using slick plugin to build the carousel.
The look and feel i am trying to achieve is the something like this picture
As i am using boostrap 4, to build this tile, I have written the following code and codepen link is given below
[Codepen](https://codepen.io/bzaidi/pen/MWamJvZ)
I am facing the following problems
This carousel is not responsive. I need to change font-size using media queries on almost every resolution. If I see Mecca website, their carousel is perfectly responsive.
When i float the image left, the rightContent div seems to be taking all the width of parent div which is 290px? Why is that?
Is my approach correct?
How can I achieve responsiveness on all resolutions?
Can you someone help me?
Thanks.

Boostrap carousel show 3 images per slide truncated

I'm trying to set up a Bootstrap 3 carousel to show 3 images per active slide, I want the next and previous images to be truncated but the centre image full width, similar to this example: https://thescene.com/.
I've played around with this for quite a while but can't seem to get the truncated effect? My initial idea is to have the containing div full width to show all 3 images in full with an overflow:hidden property to get the effect, but the carousel itself needs to be 1280px wide. Codeply is here: http://www.codeply.com/go/6eBfBskTsV
Why not grab one online? This component seems has a partial nearby image effect...
http://www.jssor.com/index.html
The bootstrap carousel is just a simple implementation rather than a universal solution, which means it can be cumbersome to tweak to achieve some complicated presentation. I guess unless you are just practising your skills, you won't like to make one by yourself.

Modal service in AngularJS that allows me to resize the size of the modal popup

I'm writing an AngularJS app. I need to open a particular modal popup that is big in size. Is there any AngularJS library out there that allows me to open a modal popup according to my specification ? I have taken a look at AngularStrap : http://mgcrea.github.io/angular-strap/##modals, which looks like it doesn't support resizing at all, and AngularUI - Bootstrap : http://angular-ui.github.io/bootstrap/#/modal, which supports an option for big modal or small modal. I have measured the big modal and it's only 900px in width, which is not that big for me. I want the option to open the modal with specified size at will.
I have seen some answers on here that suggest to modify the .modal CSS if I want bigger modal popup, but I can't. Other parts of the code did use default modal popup, modify it will cause a mess everywhere else.
Is there any suggestions on how to accomplish this with AngularStrap (preferred library) or AngularUI - Bootstrap ?
Thanks,
You can take a separate class name for that modal and make CSS changes using that class name.It won't affect the existing modals.
I ended up using jQuery.addClass to append a separate class name into that modal. This is precisely the effect I'm looking for.
I tried using windowClass to my modal service and then appending custom CSS class to this:
windowClass: 'app-modal-window'
.app-modal-window .modal-dialog{width: 375px;
}

Change background of image maps on mouse hover

In my website I have an image as the navigation bar and have created hotspots to link them to different pages. The problem is since the text is a part of the image, I cannot change the style of the text on hover. Whereas I want the text/the hotspot to stand out on mouseover, so I learn the background color could be changed on mouse over. Is that possible? Is there a way to do that in CSS, using the area or maps. If Javascript is to be used, could someone help me out with it.
Is there a reason you've used a single image as the nav bar?
Instead of a single image with hotspots, I'd use an individual image for each navigation link. That way you can easily change the image (or use CSS image positioning) on hover. This is described here:
http://css-tricks.com/video-screencasts/7-three-state-menu/
along with many other places I'm sure.
I don't think it's a good idea to use neither image maps nor individual images.
Instead, use CSS sprites: a single image file, add that as a background image to the menu links, but position the background images differently. See this Line 25 tutorial for more information.

Shadowbox skinning & sizing

How do I skin shadowbox and make sure popup size is fixed size?
The css part is ok since it's just overriding ids and classes.
However, I'm not sure what the markup.js is supposed to look.
So here are my questions:
I created shadowbox-custom-skin/markup.js and added the hook like:
add_filter('shadowbox-markup', 'shadowbox_custom_markup');
Now I can't find an example of how the markup.js is supposed to look.
(I'm trying to put the sb-nav div before the content and the sb-title div below the content and also add some new parameters).
I fixed the size of the popup using this method:
rel="shadowbox;width=480px;height=240px"
handleOversize resize no longer works. Meaning, it will resize content, but it's squeezed.
How do I make sure the popup is the same size, but oversized content isn't squeezed and small content is just centered?
You don't really need to tweak javascript to do this. Using the property inspector on your browser or the Firebug plugin, right click on the Shadowbox and see what css classes/ids are being used. Put those css classes/ids in your own stylesheet apply the styles you want. Then upload the file to your server.

Resources