Protostar (Joomla! version 3.x).
Buttons (<label>
class .btn
) within button groups are separated from each other with a 1 pixel gap occupied by their respective side frames when the HTML block includes other (<input>
) lines in between.
This is an example of a button group when editing a module in the Protostar frontend:
This is the underlying HTML code:
<fieldset id="jform_published" class="btn-group radio">
<input type="radio" id="jform_published0" name="jform[published]" value="1" checked="checked">
<label for="jform_published0" class="btn active btn-success">Published</label>
<input type="radio" id="jform_published1" name="jform[published]" value="0">
<label for="jform_published1" class="btn">Unpublished</label>
<input type="radio" id="jform_published2" name="jform[published]" value="-2">
<label for="jform_published2" class="btn">Trashed</label>
</fieldset>
Although editing is not broken in any way, it is neither intended nor transparent why alignment of buttons behaves differently.
This is an example of a button group that displays correctly:
It seems that the CSS rule to close the gap does not apply in this scenario. I am no expert in CSS/LESS, but I believe that
.btn-group > .btn + .btn {
margin-left: -1px;
}
should be replaced either with
.btn-group > .btn + input + .btn {
margin-left: -1px;
}
or with
.btn-group > .btn ~ .btn {
margin-left: -1px;
}
(different selector to address all .btn
class elements on the same level).
None.
There may be other CSS/LESS rules with +
selector affected when confrontated with additional HTML code lines between the elements. Besides, I do not know which (template) files other than template.css
must be edited as well.
Labels |
Added:
?
|
@anshi8269 Everything you need to resolve this is in the post. If you don't understand that then it's probably not the right issue for you to work on.
It belongs to: editing a module in the Protostar frontend.
Actual Result:
Expected Result:
Thanks to everyone for your commitment!
@ChristineWk That is correct, maybe I should have highlighted the info in the first place.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2022-11-16 08:51:53 |
Closed_By | ⇒ | joomdonation | |
Labels |
Added:
No Code Attached Yet
Removed: ? |
Joomla 3 is now in maintenance mode and only security bugs fixes, so changes like this won't be implemented anymore. Therefore, I'm closing this issue.
@joomdonation Never mind, it is just a minor cosmetic issue. Thanks for closing!
Can u please give the link to the website where the button separates differently?
or a pic when they get separated.
Actually, I didn't get the HTML file so I can see the problem.