There is no way to set the image size that you assign to an element’s pseudo like ::before. But do not fret. There is a workaround.

User David Vasquez of StackOverflow provided a solution for this. See sample CSS.

When I used a bootstrapped 3.0 template together with Angular JS, I found out that the height of the DIV layer where ng-view resides does not change its height to fill the window viewport height if its content height is small.

I have not found any solution in any forum regarding this problem so what I did was to create a directive and added it to the HTML element where ng-view is located.

My template contains only a horizontal bar at the top, while the bottom is occupied by the content where ng-view is.
This is my HTML:

This is my directive:

What the code does, is that once the ng-view works its magic and populates the HTML contents to the DIV layer, the Angular JS Directive will wait for the DOM till it is ready. Angular JS also has its own way to detect if a DOM is ready the same way JQuery does, but with a different syntax.

Once it is ready, I call on the $(window).resize() function to simulate a window viewport resize, then do the formula to adjust the height of the DIV content layer to fill the extra height of the window viewport.

Without calling the resize() function the height adjustment will not work when, say, you have a tab element and one of those tabs contains small content.

If you have a footer at the top, then simply add the footer height to the computation.

There is no way in the API to do this. However, Frode Johansen made a custom class that inherited Region and placed a WebView control inside it, then adjusting its height based on the document height after it has loaded its content by executing a Javascript one-liner code in order to retrieve the height value.

A very big thank you because considering that the Label control cannot display formatted HTML content, the only way to work around this limitation is to create a custom class of it. Luckily, he has saved us all the trouble of making one.

Here is the custom class.

Related Posts Plugin for WordPress, Blogger...