Adding an css id tag to custom modules

  • Ryan Wildauer
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
12 years 6 months ago #27038 by Ryan Wildauer
Adding an css id tag to custom modules was created by Ryan Wildauer
On the custom field inputs in the admin section, at the bottom is a field for css class. I cannot seem to see that class tag working. Am I missing something? I would like to adjust the custom fields to stack up horizontally instead of vertically. I was thinking of a css tag and float:left;

usafmemorial.org/joomdonation is the current page

Select "$100 for 2 lines of engraving WITHOUT a service symbol (20 characters per line)." donation type (campaign) in order to see the boxes I am trying to stack.

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

More
12 years 6 months ago #27130 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Adding an css id tag to custom modules
Hi

That's the campaign dropdown. It is not one of the custom field, so the css class attribute won't be applied in that case. If you view source of the page, you will see that the campaign dropdown has id campaign_id. So if you want to change css for that campaign dropdown, simply using the systax like that:
Code:
select#campaign_id { //Add the css code you want here }

Could you give it a try ?

Tuan

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

  • Ryan Wildauer
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
12 years 6 months ago - 12 years 6 months ago #27165 by Ryan Wildauer
Replied by Ryan Wildauer on topic Re: Adding an css id tag to custom modules
Once you select the correct campaign it shows the custom fields that I am trying to modify the css on below in the donation info section. I do understand the drop down selects the campaigns. What I want is for my custom fields to stack next to each other left to right...


...rather than top to bottom as they do now.



I would like to give them and id tag so I can accomplish this with a few simple css instructions such as (width:100px; float:left;) But each custom field has a unique name and no way to build matching id tags. So if I am stacking 20 custom fields left to right. Which in my case I need to do 3 different times each on 3 different campaigns that means over 200 lines of messy css. Can you provide any ideas for an easy work around?

It seems like at the bottom of the custom fields form. (Highlighted by a red square their is a css class tag you can customize. When I try to customize the tag with "squeeze" I get no reference to that anywhere in the code. I am not sure how this css class would have to do with the css for the campaign.

Last edit: 12 years 6 months ago by Ryan Wildauer. Reason: Pics not uploaded

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

  • Ryan Wildauer
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
12 years 6 months ago #27263 by Ryan Wildauer
Replied by Ryan Wildauer on topic Re: Adding an css id tag to custom modules
<Bump> Any thoughts?

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

More
12 years 5 months ago #27313 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Adding an css id tag to custom modules
Hi Ryan

Could you please get this file, unzip it and upload to components/com_jdonation/helper folder and check it again ? The dropdown custom field will now use the css class which you entered when setting up the custom field and it should solve your issue ?

Tuan

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

  • Ryan Wildauer
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
12 years 5 months ago #27342 by Ryan Wildauer
Replied by Ryan Wildauer on topic Re: Adding an css id tag to custom modules
Thanks for the time and help. I added the file and it worked just as you said, however it was controlling the table cell rather than the whole row which is what I need to control in order to see 20 drop down column next to one another. I edit the code a little bit to pull the ccs field into the row class rather than the cell class and viola it stacks 3 cells. What I cannot figure out is how to stack 20 cells all the way across the page. Though I cannot be sure I am wondering if it is some sort of problem with columns. I tried replacing the table cells with divs which float much easier but I lost the page positioning and hidden when not selected attributes so I quickly abandoned that. Here is a screen shot of what I have now. Any thoughts on how I might stack these 20 rows across the page?


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

More
12 years 5 months ago #27429 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Adding an css id tag to custom modules
Hi Ryan

I am really sorry. I am afraid of it is not easy to control it via css. So in this case, I think you will need to find a developer who know php code to help you to customize the code to meet your requirement.

Tuan

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

Moderators: Dang Thuc DamDang Dam