In the specification config.xml of a wirecloud widget, we can set initial width and height
<Platform.Rendering width="x" height="y"/>
When I put in something like width 300 and height = 80, the widget gets much bigger and overflows the screen.
In the specification I only see that the width field defines the width.
http://forge.fi-ware.org/plugins/mediawiki/wiki/fiware/index.php/FIWARE.OpenSpecification.Apps.ApplicationMashup
I see in example widgets values like 5 and 8. So what unit is the width and height?
WireCloud prior to 0.8.0 only supports columns and row as units. Pixels and percentages are supported from WireCloud 0.8.0 onwards.
See the documentation for more info.
If you check your workspace settings, you will see that you may set your workspace grid up by determining the number of columns and rows you want it to use.
I think these numbers refer to the workspace grid columns/rows.
Related
I'm looking at the docs for a command line tool, and in the section indicating options there is:
--viewport-size <> Set viewport size if you have custom
scrollbars or css attribute overflow to
emulate window size
Just wondering how this viewport-size is supposed to be passed. Just width in pixels? Two arguments for width and height of the viewport in pixels? I'm experimenting with it but the results are somewhat confusing. For reference here is the documentation page.
Thanks!
the --viewport-size argument takes a resolution value. Here's an example
wkhtmltopdf --viewport-size 1280x1024
I'm having a few problems laying out my phone page which contains a Hub control. The height of the Hub control doesn't seem to be consistent with it's parent container.
To see the issue for yourselves follow the steps below:
Create a new project.
Choose Store Apps - Hub App (Universal Template).
Goto the Windows 8.1 part of the project and view the HubPage.xaml unit.
Place the cursor in the Grid element on line 35 and view it's layout properties in the property window.
Notice that it's VerticalAlignment is set to stretch and it's height is set to Auto (768).
Now do the same with the Hub element on line 41 and it's height is also set to Auto (768) as you would expect.
Now go to the HubPage.xaml unit in the Windows Phone 8.1 part of the project.
Place the cursor in the Grid element on line 73 and view it's layout properties in the property window.
Notice that it's VerticalAlignment is set to stretch and it's height is set to Auto (640).
Now go to the Hub element on the next line (74) and although it's VerticalAlignment is set to Stretch, it's height is set to Auto (666.666625976562).
How can the Hub element be bigger than it's parent when everything is stretched vertically. What's worse is that the difference between the height of the child and the height of the parent seems to change when the phone switches to landscape mode. This is really causing me issues with my app layout and I'm struggling to understand why it is happening.
Can anyone explain this?
Ok, using the latest version of Bootstrap
Trying to set a column in my ROR application to a background color.
Here is the code (it's in HAML)
.row.testing
.col-lg-2
= render 'blah/blah_testing/
= yield :sidebar
.col-lg-10
= yield
I am trying to have the col-lg-2 column display a background color in its entirety regardless of how many rows there are, otherwise it stops when the last row stops.
The height is dynamic. And the width is set by bootstrap. And I don't think I can use table settings to set the column's background because that seems to rely on fixed measurements?
EDIT
Have simplified this question extensively .
Instead of height:100% use viewport heights.
You CAN use height:100% for a column, but you must set the body's height to 100% in CSS as well. It's cumbersome, once I discovered Viewport Units I've not used it since.
Alternatively as mentioned above, you can use a bit of a new CSS element called vh (do a quick google of "CSS vh unit" and you'll get a better explanation if you'd want to read more. [there ARE other viewport measurements you could find if you do read into it further])
Anyways back on point, for your row, give it an ID, let's say id="myRow" then set its height in the CSS to height: 100vh
One VH unit is equal to 1% of the screen size. So 100vh would be the full screen height, 50vh would be half screen height. (This unit is -supposed- to be dynamic, BUT I believe only the current version of Firefox has built in support so far...but don't quote me on that, been a while since I read the Viewport measurements doc.)
Here's a handy link/explanation to check out
https://css-tricks.com/viewport-sized-typography/
I am trying to create a sleek re-sizable website. After doing a bit of reading I found that the way to achieve this is having a parent node with a rigidly defined size, and children with % sizes. On the w3schools website it says that in 2012 85% of monitors has a resolution greater than 1024.
My question is, in order to implement a re-sizeable website the preserves its layout, what is the best size for the fixed-size parent node in order for it to be compatible and consistent on all monitors?
Why don't you forget about setting a fixed size on the parent and set the parent's width to 100% which would give you what you are looking for.
How browsers calculate size for elements with percents width or height? Is it calculated based on size of the parent node? What if parent node does not have explicit size attributes?
Yes it is calculated based on the parent node. Coming to your point if no explicit size has been given to the parent...Actually I have never done this so cannot guide you on that point.
But remember in case of font-size..if you do not specify any size then browsers go for some pre-defined settings. Every browser has a base font size..When you set a custom value of font-size then the browser actually adds or subtracts the values from that base size...
In short:
Yes its calculated on the basis of parent tag.
Its not safe to not give a custom size and rely on browsers pre-defined settings.
If you dont specify something mostly browsers fall back to their pre defined settings.