I want to customize bootstrap button and add two small images in the button itself to make it look like button.
Here is the image preview:
Image Link
Have you tried
<button type="submit" style="background-color:red;"><img src=""> Button<img src=""></button>
It seems simple enough
Related
I'm trying to adjust FABs in Ionic to make them scrolling with my content. If we refer to the Ionic Exemple :
<ion-fab top right edge>
<button ion-fab mini><ion-icon name="add"></ion-icon></button>
<ion-fab-list>
<button ion-fab><ion-icon name="logo-facebook"></ion-icon></button>
<button ion-fab><ion-icon name="logo-twitter"></ion-icon></button>
<button ion-fab><ion-icon name="logo-vimeo"></ion-icon></button>
</ion-fab-list>
</ion-fab>
The result is the following :
I'd like to make this FAB scroll with the content. I tried to overrider Ionic CSS, but when I change the position attribute it makes my button disappear..
Thank you in advance for any help
You can't because the case here is not css. Ionic adds the FAB button to the fixed-content class, so even knowing you can use css to manipulate both the fab and the fixed-content it does't scroll along with the scroll-content (i've tried here to find a solution for you).
Manipulating the DOM maybe works, taking out the fab from fixed-content and placing it in scroll-content with ElementRef, ViewChild, Renderer from #angular/core (haven't tried this yet).
Along with manipulating the DOM, the other solution is creating your own FAB button, it can be a hard work, but there must be some examples around the internet.
Hope this helps.
have a very basic page that I am working on that contains thumbnail images and a main image. When the thumbnail images are clicked I am using document.getElementById to change the main image. Easy to do but I now want to change my main image from landscape to portrait. This will mean that now when clicking the thumbnail I will not only need to change the main image but also the div tag dimensions. I am new to Javascript and was wondering if someone could give me a quick point in the right direction of how to go about this.
Thank you in advance for any help,
Margate
I would suggest adding/changing a CSS style class on the element and then configuring that class with all the necessary modifications. There's a lot you can do with just CSS.
You can either use a semi colon in your onclick event and add more javascript calls, or create a JavaScript function that will do all of your neccesary changes and call that method from your onclick event.
function changeStuff(){
document.getElementById("myThing").DoStuff()
document.getElementById("myOtherThing").DoOtherStuff()
}
<div id="myThing">
<img id="myOtherThing" onclick="cangeStuff();"></img>
</div>
In the Carousel Slider at the Evolve Theme, there are a few sample pictures.
How can I change them into new pictures and add an href that an article opens by clicking on an image?
You upload a photo in the media library with the correct dimensions for the slider.
When you select to edit the image you get the full size version.
In Firefox I right click on the image and ask to copy "Image Location", in the Chrome browser "Copy image URL"
that gives me the url to the image in my clipboard something like
http://www.####.###/wp-content/uploads/2013/06/image.jpg
Then you go to the widgets
You have to add the "T4P Carousel Slider" to the Header1 area. If you don't The theme automatically loads its own custom widget for advertizing the theme. Once you add the widget you will get a code box that by default has their code in it.
You are going to replace that code with your own it is not to hard but it is certainly not a drag and drop option.
Once you drag the Carousel Slider to the Header you will see the code.
you will see 4 sections that look like this:
<img src='http://www.####.###/wp-content/themes/evolve/library/media/images/slide/slider_img_01.jpg' alt='' />
<div class='carousel-caption'>
<h4>Built-in Bootstrap Elements let you do amazing things with your website</h4>
You replace this part of the code with the url to the image from the library using cntl-v and ad a alt tag if you like
Before
http://www.####.###/wp-content/themes/evolve/library/media/images/slide/slider_img_01.jpg' alt='' />
After
http://wp.fofc.org/wp-content/uploads/2013/06/baby.jpg' alt='Baby' />
Next you can add a Caption to be over the top of the image
Before
Built-in Bootstrap Elements let you do amazing things with your website
After
This is a really cool image
down at the bottom of the code box you will see additional code.
This controls how may dots are in the rectangular window for navigation one line for each dot
So you want to have as many lines as you have images. If you only have 3 images take the line with data-to='4' completely out. or you can add another line at the bottom:
5
<div id='carousel-nav'>
<a href='#myCarousel' data-to='1' class='active'>1</a>
<a href='#myCarousel' data-to='2'>2</a>
<a href='#myCarousel' data-to='3'>3</a>
<a href='#myCarousel' data-to='4'>4</a>
-- add or remove lines above this line
</div>
This controls the navigation box in the lower center of the slider. However the dot does not seem to move as the slides change automatically. The dot only moves when you click on it.
If you prefer you can remove the entire div from the code and that will remove the navigation box.
Hope this helps.
each post in my website, contains a photo gallery. The gallery consists of thumbnail images which link to full-size images.
I have also placed a PinIt button in my posts. The problem is that it catches thumbnail images for pining.
Based on what I've found about this kind of issue, I ended up with the following code which should exclude thumbnails from pining, and include full-size images instead. None of these, is donw though...
<a href="path_to_full_image" rel="lightbox[single_post]" pi:pinit:media="path_to_full_image">
<img src="path_to_thumbnail" width="200" height="130" nopin="nopin" />
</a>
Any suggestions?
We can avoid showing an image in the pin action just by using nopin = "nopin" in the image attribute.
For eg.,
<img src="http://via.placeholder.com/350x150" nopin = "nopin" />
In order for the PinIt button to pick full-size images they should be loaded and visible on the page. Since they are not, it cannot grab them to the grid gallery. As a workaround I would suggest to have a custom logic that pre-loads full-sized images before triggering the PinIt button click event. Something like this:
$('a[rel="lightbox"]').each(function(){
image_src = $(this).attr('href');
$('<img/>').attr('src',image_src).appendTo('#imageContainer');
;
})
$('#pinItButton').trigger('click');
This way you will pre-load all the images and put them into imageContainer block and then trigger a click that will open Grid Gallery to pick an image.
Hope it helps.
I have a lightbox that has one image, then some more images in the same set, but these are styled to be hidden, the only way you can see them is by clicking the first image (the only visible one) and activating the lightbox.
Is there a way of skipping straight to the second image in the lightbox instead of the image being clicked on being shown first,
This is what im working on:
http://yvonneestrada.com/taylor/gallery.php?id=5&start=3
Try setting a link on the first image that will link to the second one. It may look something like this:
<img src="1" />
<img src="2" />
<img src="3" />