I am trying to create a widget with three buttons but look like it belongs in a list item. ive gone a certain way but now need to be able to conttrol the alignment and margins of the text so it is aligned left with a margin (“Speed” below) - can anyone help?
I fiddled around with that myself a bit. Try to use a oh-list-item with media (your lightbulb) and label “Speed”. Add your buttons in the After-Start slot:
I’m on the phone so indentation is surely broken but I think you get the idea:
Thanks for your help - I cant get it to look anything like it does now but i dont think Im following (understanding) your method to translate to my widget - I think the after-start slot might be a clue though
Maybe I did not read your post well enough: You want to keep the buttons where they are but put the “Speed” label under the icon? Is that correct? Then I think you would need to use a f7-col for your icon and Text to align underneath.
changed the main containing object to oh-list-item which is a “child” of the standard one.
used the after slot to add your buttons (you will probably have seen default used as the slot name, but there are often other slots available, in this case default = div.item-inner = icon + title).
put the icons into a block container and set flexbox properties to display in a row and to the right (end). Without this they were displayed in a column, possibly because of your - flex-direction-column class (that I’ve removed).
removed excessive margin styling on the block container and icon (so they aligned with the sample media control buttons.
I’m going to try and implement some ‘radio buttons’ using this technique. Hope this helps, Andy
Your post seems to have been one of the ones lost in the recent forum software upgrade issue. Can you do me a favor and post the whole widget code that you are currently having problems with. I’ll be able to take a look.
I have seen behavior similar to what you described… in my case a button with a text property of Don't panic was causing the system to behave weird… single quote/apostrophe being the issue.