[SOLVED] Can't apply css margin to date fields

13 years 5 months ago #146746 by sfraise
I'm using the cb privacy plug in and need to add a margin-right to the fields in order to line up the radio buttons I've changed the privacy fields to in order for them to line up uniformly.

I've been able to do it easily for all of the fields except the date fields that use the js popup calendars. No matter what I try I can't get a margin to apply to those fields. Obviously applying the css by field id didn't work so I went in to the ui.theme.css file and tried applying it there, still no luck. The only thing that seems to work is to go into the calendardateinput.min.js file and applying a margin to the icon image.

I would actually rather just remove the popup calendar as long as the drop downs remain. There seems to be some issues with the calendar and the cb profile pro component anyway so if I could just remove that part of the date fields I think it would be best. For some reason when using the cb profile pro component the first date field will display fine, but fields after that will show with the pop up calendar already displayed on page, not sitting on top of the page messing up the layout of the page it's self.

I'm going through the file right now trying to figure out if there's a way i can set the display to none for the entire popup and then hide the icon, but then i'll have to figure out another way to apply the margin lol. Getting this edit profile section to so what I need is just a never ending cycle of issue after issue lol, it just never ends.

Post edited by: sfraise, at: 2010/11/22 06:22

Post edited by: krileon, at: 2010/11/23 20:29

Please Log in to join the conversation.

13 years 5 months ago #146814 by krileon
Replied by krileon on topic Re:Can't apply css margin to date fields
It'd be easier to just apply a left margin to the privacy drop-downs instead of a right margin to the field it self. Each privacy select has unique ID to its field.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

13 years 5 months ago #146818 by sfraise
Replied by sfraise on topic Re:Can't apply css margin to date fields
Thanks Krileon, I just popped in to post that I did just that, well sort of. I actually set the privacy fields to float right and set a right margin in order to ensure everything is uniform regardless of browser, selector size, or screen size.

I'm still having an issue with this calendar thing though. For some reason the js from the calendar is conflicting with the cb profile pro component with multiple calendars. Like I mentioned before the first date field displays fine, but the second date field has the popup calendar displayed on the page on page load and clicking the icon doesn't do anything, and the third date field shows a text field before the selectors but the popup calendar isn't displayed on page load like the 2nd one. It's weird that the 3 fields all display differently like this.

When I'm not using the cb profile pro layout all 3 display fine so I'm sure it's a conflict between the 2. Have you seen any conflicts with the calendar script before with other components or know of a way simple way to resolve the conflict similar to the jquery noconflict tag?

If I can't figure out how to resolve the conflict I'll just have to change the other 2 date fields to plain text fields but I hate to do that if there's an easy fix, or an easy way to simply hide the calendar altogether. I can hide the icon with a display none like beat had mentioned in a previous post but it doesn't really do me any good with the issues I have of the actual popup being displayed and the extra text field before the selectors.

I'm sure if I bang on the script long enough I can figure it out but I've had so many issues with some other stuff that I'm a couple weeks behind schedule and just can't justify wasting too much time on this at this point.

Post edited by: sfraise, at: 2010/11/22 18:59
** I figured out the issue with the date fields. There's a js conflict in cb profile pro and the calendar if you use line breaks for some reason. I thought I had everything using p's but the editor must have auto formatted it to throw in some line breaks.

Post edited by: sfraise, at: 2010/11/23 04:29

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.194 seconds

Facebook Twitter LinkedIn