Modifying CSS file used by profile editor

Permalink 1 user found helpful
I am trying to fix some weird layout problems in the profile edit page (see attached file). Note that the box displaying the various attributes seems to be too narrow. As such, labels such as FIRSTNAME, LASTNAME, etc., have their fields forced onto the next line, thus giving quite a confusing look -- the title of the following field is on the same line! It seems the solution involves tweaking the file ccm.profile.css, but where should that file reside in a customized theme? I've tried creating a version of it and storing it in ../themes/[mythemename]/css, to no avail. I also tried copying it to ../themes/[mythemename], where I have successfully modified the main.css file, but the edit.php file keeps using the core version of the file. Any help would be appreciated!
Thanks,
Frank Lawler

1 Attachment

lawlerfa
 
ld13 replied on at Permalink Best Answer Reply
ld13
To find the css file of an specific block, you have to go to packages in the main root of your FTP and then locate the specific folder for the block you are trying to edit. Inside that folder you should be able to locate the css file affecting that form. However, it is not a good practice to edit this file cause if in the future you install any update your changes will be gone. But at least you will be able to see what is the styling applied and them move any css needed to your main css file in the themes folder and make the necessary changes in there. If there is a css declaration in the css of the package, that you want to overwrite in you main.css and it does not take the change you can use !important (i.e color:#fff !important). Hope this helps!
lawlerfa replied on at Permalink Reply
lawlerfa
Ah! Yes! Looks like putting the style in main.css overrides it. Unfortunately, something else seems to be causing the problem, but now that I know where to tweak changes for styles, that's a BIG help! Thank you so much!
ld13 replied on at Permalink Reply
ld13
YW :) Hope you have found a solution for the problem. Let me know if I can be of further help.
timtorres replied on at Permalink Reply
timtorres
This is the wrong approach. First of all you can tell it's a system issue because it appears on the custom attributes and so you need to find the css file and override it as is described in the C5 docs. This has nothing to do with his theme so he should keep it out of his main.css, and adding the important! rule is unnecessary.

If you copy ccm.app.css into your /css folder and find line 39:
.span5{width:380px;}

and change it to
.span5{width:380px; float:none;}


Furthermore, even though this is the right way to do it, the problem isn't all gone yet. It still adds a 20px left margin to the text field which doesn't match any other inputs. Both of these problems are related to the span5 class that got added to the custom attribute. I'm currently trying to find the helper that renders that and override *that*, in order to take care of both these problems.
ld13 replied on at Permalink Reply
ld13
We have been working with C5 for a while and maintaining the overrides to the block's css in the themes css files is the proper way to do it to avoid conflicts with blocks updates. And actually, if the there are a lot of css modifications, another right approach is to override the blocks css file by copying it to the overrided blocks directory.

Here is a posting about Managing CSS files, modifying add-ons that validates my point
http://www.concrete5.org/community/forums/usage/managing-css-files-...

Lawlerfa and barrybsmith if yo want to send me a testing login to access the edit profile page, I can take a look and send you the css corrections you will need to implement for it to work across all browsers.
timtorres replied on at Permalink Reply
timtorres
Overriding the CSS in your theme file adds bloated code that is irrelevant to your actual theme. If you delete the block or an update removes the rule you overrode, you now have that useless code in your theme file. Just because it works doesn't mean it's proper.

I guess I wasn't clear but, overriding the file in your root was exactly what I said. The link you posted validates my point but says nothing about overriding blocks in main.css. And again as I said before, his problem was introduced by the update and has to do with the core CSS, file I posted above, not from a block.

Ps, sorry if this comes across as animosity haha
barrybsmith replied on at Permalink Reply
barrybsmith
Im having the same problem what was the solution to move the names to the next line below?
lawlerfa replied on at Permalink Reply
lawlerfa
I isolated the problem to the fact that spans as defined in ccm.app.css cause certain input fields to float left, thereby overriding the location of subsequent labels (which would fall in immediately after them, on the same line, rather than correctly preceding their associated fields, on the following line). So I found the span definition that was used in the problematic fields(.span5) and created an override in main.css as follows:

.span5{float:none !important;}

I was worried that causing span5 not to float would domino problems elsewhere where that definition is used, but so far, so good!

In other words, here's what was happening:

With float:left on the fields' span, the edit form was displaying like this:

FirstNameLabel
[FirstNameField]SecondNameLabel
[SecondNameField]ThirdNameLabel
[ThirdName Field]

Overridden with float:none on the fields' span, it now displays (correctly) like this:

FirstNameLabel
[FirstNameField]
SecondNameLabel
[SecondNameField]
ThirdNameLabel
[ThirdName Field]
barrybsmith replied on at Permalink Reply
barrybsmith
Where does the override go in the main.css?
barrybsmith replied on at Permalink Reply
barrybsmith
I just noticed that it is working fine in IE10 & Android Browser but not in Chrome PC...