Struggling with simple HTML formatting that just doesn't seem to be coming out right.
Here is the code snippet in question:
<div class="fc-event-time" data-hasqtip="true" aria-describedby="qtip-6">
2:54 - 6:54
<i class="icos-refresh" style="float: right; margin-top: -17px; margin-right: 2px"></i>
<i class="icos-acces-denied-sign" style="float: right; margin-top: -17px; margin-right: 2px"></i>
</div>
Firebug shows that the following CSS classes are affecting it:
padding-left: 5px;
white-space: nowrap;
font-weight: 500;font-size: 12px !important;
padding: 0px 1px;
color: rgb(0, 0, 0) !important;
cursor: pointer;
direction: ltr;
text-align: left
font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
line-height: 18px;
Currently, the rendering looks like this:
As seen above, the two icons are stacked on top of each other. My goal is to have them display side by side instead. I initially tried adding display:block;
but that did not solve the issue. How can I get them to align next to each other rather than overlapping?
UPDATE:
After removing the margin-top: -17px;
, the layout changes, but I still need the text and icons to be on the same line.
UPDATE 2:
I finally identified and resolved the problem—it was due to the plain text "2:54 - 6:54
" preventing the <i>
elements from appearing on the same row. By modifying the Full Calendar source to enclose the time within a <span>
with a float: left
style attribute, everything is now aligned properly. Thank you for all your assistance. If an alternative solution is provided (one that does not require modifying the JavaScript), I will acknowledge it as a better approach.