Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make panel header clickable with bootstrap? [closed]

I am trying to create a website for mobile, and I would like the collapse box clickable and not only the text.

Image

I have uploaded the site. http://kristian-jacobs.dk/mobileapp/

Thanks in advance.

like image 207
kristian Avatar asked Apr 22 '14 11:04

kristian


2 Answers

Actually you just have to add btn-block as a class to the a tag.

like image 143
adius Avatar answered Oct 01 '22 19:10

adius


Well. Here is a workaround. The easiest way is to assign display: block to your a element and then setup the clickable area with width & height in pixels. But setting fixed width and height can impact the responsive nature.

A more advanced and flexible way is to change a bit the HTML structure, so as the a will be inside the panel and then add display: block, but instead of setting the fixed width and height you can use percentiles so as the clickable zone inherits the size of the panel.

FIDDLE example with fixed sizes.

like image 22
knitevision Avatar answered Oct 01 '22 19:10

knitevision