TOPIC:

Adding CSS class to element 1 year 9 months ago #235762

  • Topic Author
  • dama
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 49
  • Thanks: 1
HI,

Haven't posted in a while so if this post belongs to different subforum please move it.

Is it possible to add CSS class to any element in breezing forms?

I would like to change the styling of checkbox and I'm having trouble doing it.
Label and input field don't have the same parent element which is div with empty class name.

So my question is, is it possible to add CSS class to single element in form?

Kind regards

Please Log in or Create an account to join the conversation.

Adding CSS class to element 1 year 9 months ago #235769

  • MarioPuco's Avatar
  • MarioPuco
  • Offline
  • Ultimate Breezer
  • Ultimate Breezer
  • Posts: 5958
  • Karma: 119
  • Thanks: 557
Hi,

To apply custom CSS to your form go to : Advanced properties > More options > Form pieces and in the Before Form section set Type to Custom.
echo '
<style>
//YOUR CSS HERE
</style>
';

Inside you can add your CSS which will have effect only on the actual form.

Regards,
Mario

Please Log in or Create an account to join the conversation.

Adding CSS class to element 1 year 9 months ago #235770

  • Topic Author
  • dama
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 49
  • Thanks: 1
Hi MarioPuco,

That is not what I want.
I want to change the style of a checkbox in every form on web site, and not in a single/one form.

This is how the code looks like:
<div class="">
	<label class="control-label bfLabelBlock" id="bfLabel2567" for="ff_elem2567">Prihvaćam <a href="#privatnost" data-rel="lightcase" title="Pravila privatnosti">pravila privatnosti</a>
	</label>
	<span class="">
		<input style="vertical-align: baseline;" class="ff_elem" type="checkbox" name="ff_nm_privola[]" value="checked" id="ff_elem2567">
	</span>
</div>
which looks like this:


And I want it to look like this:


So I know what CSS to add but I'm having trouble targeting the elements as I explained in first post.

Regards
Attachments:

Please Log in or Create an account to join the conversation.

Adding CSS class to element 1 year 9 months ago #235772

  • MarioPuco's Avatar
  • MarioPuco
  • Offline
  • Ultimate Breezer
  • Ultimate Breezer
  • Posts: 5958
  • Karma: 119
  • Thanks: 557
Dama,

You can target your element by ID.
Example :
echo '
<style>
#ff_elem2567 {
height: 100px !important;
width:100px !important;
}
</style>
';

You can target the element class also, but whatever suits you.

Regards,
Mario

Please Log in or Create an account to join the conversation.

Last edit: Post by MarioPuco.

Adding CSS class to element 1 year 9 months ago #235773

  • Eddy.vh's Avatar
  • Eddy.vh
  • Offline
  • Ultimate Breezer
  • Ultimate Breezer
  • Posts: 581
  • Karma: 4
  • Thanks: 97
Hello.

Only if you do not use a bootstrap theme, in the advanced properties of the checkbox, display the title position "top" should fix the case.

Regards.

Please Log in or Create an account to join the conversation.

Adding CSS class to element 1 year 9 months ago #235776

  • Topic Author
  • dama
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 49
  • Thanks: 1
I inserted those screenshots wrongly, I want it to look like on the first one and currently it looks like on second.

Unfortunately I use default bootstrap theme :(
Anyway, I changed it to group checkbox and have only one box to check.

Thanks for letting me know that other themes have classes and ids, or at least more than default bootstrap theme. Will play with it in the future now is too late for a change.

Thanks for the help both of you.

Kind regards

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
  • 2
Moderators: ForumSupport
Time to create page: 0.087 seconds

BreezingForms Pro 1.4.7 for WordPress Released!

Available in the membership section.

September Discount!

Massive discounts on all subscriptions!

Get Your Subscription Here

Quick Links

Downloads

BreezingForms

ContentBuilder

BreezingCommerce

Templates

Documentation

BreezingForms

ContentBuilder

BreezingCommerce

Apprendre BreezingForms (French Community)

Apprendre et maîtriser BreezingForms par des tutoriels et exemples, le tout en français

breezingforms.eddy-vh.com

Questions et réponses sur les forums de l'AFUJ

AFUJ

Special Offer

Summer Sale! All subscriptions at a special price!

Includes prio support, all of our current and future Joomla!® extensions and Joomla!® templates for the duration of your membership.

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!