Read the statement by Michael Teeuw here.
Table width, how do I increase it?
-
How do I increase the text width on my module? I want to show the album art and info, but the info gets broken up into multiple lines.
Below is part of my code and a picture of what happens. The “meta_html” is the table I want to change
getDom: function() { var wrapper = document.createElement("div"); var albumart_html = ''; var meta_html = ''; var html = "<div class='player bright scrobbler-"+this.config.alignment+"'>"; albumart_html += "<div class='album-art-container'><div class='album-art'><img src='"+ this.image +"' width='150'></div></div>"; meta_html += "<div class='meta'><table class='small'><tr class='track-name bright'><td>"+this.title+"</td></tr><tr class='artist-name'><td>"+this.artist +"</td></tr><tr class='album-name dimmed'><td>"+this.album+"</td></tr></table></div>"; html += albumart_html; html += meta_html; html += "</div>"; wrapper.innerHTML = html; //var wrapper = document.createElement("div"); //wrapper.innerHTML = this.config.text; return wrapper; },
-
I set my table with a variable width using a percentage for my module.
https://www.w3schools.com/tags/tag_table.asp is a good place to start, and you can then adjust things like the
<td>tag as needed.jsfiddle.net is a good place to play, as well, FYI. You can build your JS up and get it working, then all ya gotta do is translate to MM spec.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login