MagicMirror² v2.14.0 is available! For more information about this release, check out this topic.

organization of the text next to the icon.

  • How to align the left next to the icon?

    If I put the module to the left of the MM, the text is next to the icons.
    But I would like to use the module on the right side,

  • @iorifly i don’t think u can change this with CSS… i would have to see how the author formatted the data… suspect he used a table structure, if so you would have to change the code

    also, it is always nice if u tell us the module that is generating the content

  • boy, you became my tutor on this site !! I just have to thank!

    this is the module.

  • As I said. If I position the module on the left side. Everything is perfectly aligned.

    If I place the module on the right side, the text is far from the icons.

    Taking advantage of that will look at the code. It is possible, for example, when he displays “off” or “on” he writes in my language …
    I don’t think so, as it pulls that information from the Home Assistant server.

  • I did not find any css files in this addom.

    It would be possible to add lines to separate some functions, or I’m saying stupidity.

  • @iorifly

    yes, he creates an html table (table)
    and each row is a table row (tr)
    you would have to move this

    		// Name
    		newCell = newrow.insertCell(1);
    		newText = document.createTextNode(name);
    		// Value
    		newCell = newrow.insertCell(2);
    		newCell.className = "align-right"
    			newText = document.createTextNode(value);
    		// Unit
    		newCell = newrow.insertCell(3);
    		newCell.className = "align-left"
    			newText = document.createTextNode(unit);

    in front of this

    		// icons
    		newCell = newrow.insertCell(0);

    and change the insertCell(?) numbers back to 0-3 in order again
    change 1 to 0,
    2 to 1,
    3 to 2
    and 0 to 3

    as for left/right areas of screen… yes, it is quite a challenge to have the text properly aligned, regardless of the area of the screen (position) selected… there is NO ‘simple’ fix

  • I will try to play with this. But already mine gave a north !!!

    I will try to create the lines. About aligning if standing next to the icons already helps. Now creating html is simpler. I will try to understand. Anything I report.

  • Module Developer

    Wait! I think that’s not what @iorifly wants, right?

    If I understand this correct (and it is difficult to understand 😉 ) the text in the middle should be aligned left?

    If I place the module on the right side, the text is far from the icons.

  • I will send another photo. with the module positioned to the left of the screen.

  • @doubleT yes, you are correct… sorry, I misunderstood , I thought he wanted the icons on the right end of the line

Log in to reply