Read the statement by Michael Teeuw here.
News module 'height' changes when 3 vs 2 lines of text - pushes up other modules?
-
Not sure how best to describe, but I’m using the news feed module located at the bottom region of my mirror - pretty standard for most people seemingly. My only issue is that if the RSS feed has 2 vs 3 lines of text, the module ‘size/height’ changes which pushes up the two modules I have located above the News module ( I have the 3rd party Calendar module in the lower left region and the stock ticker on the lower right region). I’m trying to figure out which part of the main.css module needs to be changed to fix this…
Help appreciated.
Thanks
-
I’m trying to figure out this problem as well right now.
Temporary solution for now is to add “wrapTitle:false” to the config.js. This of course cuts off the text after the first line. -
You could try changing the font size so the div doesn’t expand to accommodate the 3rd line. However, if doing that creates an instance where only 1 line is necessary to display the text then the same problem will arise.
A trim(function) could limit the number of characters but that would mean the text would be cut off at a set point.
Take a look at WunderGround weather.js. I think the author had his text change size (in the current weather portion) to stay within the same boundaries, thus, not moving the surroundings.
-
@valid8r
I don’t know exactly what you want. but as I’ve read, there are several CSS tricks to consider.-
overflow:hidden
: You can keep yourheight
of div box with this. https://www.w3schools.com/cssref/pr_pos_overflow.asp
This would be helpful, but you should adjust exact target height. -
Use
line-height
in CSS : If you are carefully calculating the font-size, thisline-height
will help how many lines to show with combination withheight
andfont-size
-
Use
vw
orvh
forfont-size
unit. It makes your font resizing relatively by viewpoint.
-
-
@Sean said in News module ‘height’ changes when 3 vs 2 lines of text - pushes up other modules?:
there are several CSS tricks to consider.
Even better. Good stuff Sean! :-)