simple modal with fullpage.js - modal-dialog

I am using fullpage.js in several sections on my website. When I call a simple full-screen modal on section 2, 3, or higher it appears over section 1 instead of the correct section.
My CSS is the following:
.modal-screen
position: fixed
width: 100%
height: 100%
left: 0
top: 0
z-index: 1
I would be very grateful for any help or suggestions!

Related

How to fix "BOTTOM OVERFLOWED XXX" without scroll -related widgets

I want to locate each widgets across the height of the screen without scroll widget (It means the total height of screen is always fixed), but do not know to implement those widget generally.
For example, height of Iphone 13 is 2532 pixel but 13 pro max is 2778.
If total height of screen is fixed (non allowed to scroll), all widgets should be more shorten (like 70%-80%)than former for pro max.
Should I use MediaQuery class or other responsive libraries generally?
Making the size of height of a button dynamic is not recommended. You can check telegram signup button the height will stay but the width will be dynamic and reduced x pixel from left or right using margin.
if you are trying to make a floating button like whatsapp which is no matter size of the screen the height and width will stay, you can customize it on floatingactionbutton()
but if you still want to customize the height you can use this logic:
var heightOfMyPhone = (MediaQuery.of(context).size.height);
InkWell(
onTap: (){
//code here
},
child: Container(
height: heightOfMyPhone > 300 ? (heightOfMyPhone*0.5) : 100,
width: MediaQuery.of(context).size.width,
padding:const EdgeInsets.fromLTRB(10, 10, 10, 10),
)),

How to set rectangular shape to children of a grid?

I need to make the following page in flutter:
I need to make the following page in flutter. I already tried to do it with a SliverGrid.count(), the problem is that it is the grid that is in charge of establishing the width and height of its children. In addition, the width and height established are always the same(square shaped). Somehow I need to be able to modify the width and height and make it rectangular) so that the children are very similar to how they can be seen in the image
I appreciate any help you can give me
GridView.count(
crossAxisCount: 2,
childAspectRatio: 0.8, // change this value for different results
crossAxisSpacing: 5,
mainAxisSpacing: 5,
padding: EdgeInsets.all(10.0),
children: []
)

Dojox Datagrid, add span to every cell to make css nowrap to work in IE7

Since nowrap on td element doesn't seems to work in IE, see this question, I am in desperate need of help how to add a span element with nowrap to every cell in a Dojox Datagrid without having to define field formatters to accomplish this.
See jsfiddle here http://jsfiddle.net/HkxHZ/4/
Using this css I get what I want in Chrome and FF, i.e. no word wrap and overflow hidden. But it doesn't work in IE..
<style type="text/css">
.dojoxGridRowTable {
table-layout: fixed;
width: 0px;}
.dojoxGrid .dojoxGridCell {
text-align: left;
overflow:hidden;
white-space:nowrap;}
</style>​
This method is like auto-size in that is will make the width of each column in the DataGrid big enough to show your data with no wrapping.
What you should do is calculate the proper width for each column of the grid layout based on PX size of the text in the column description and data for that column. This should be done before creating the grid layout.
Here is how you get the proper width in px. Add the following html to your page:
css:
#test
{
position: absolute;
visibility: hidden;
height: auto;
width: auto;
}
<div id="test"></div>
1) Get the font size used in your DataGrid
2) Get the div object and set the font size to what is used in the grid
<div id="test"></div>
var tst_item = window.document.getElementById("test");
tst_item.style.fontSize = grid_fnt_sz;
3) Place each column description and data item intended for your DataGrid into the hidden div:
tst_item.innerHTML = "Your data";
var widthPX = (tst_item.clientWidth + 1); //Width of text in PX
Store this widthPX in an array for each column keeping only the largest found for the column.
4) When creating the layout for your grid, set the width for the column to the largest width from your column description and data for that column.
This method ensures that width of each column will be big enough to show your data without wrapping. Depending on your needs, you can tweek the logic to do what you need. This might not be feasible with large amounts of data. But, it works great for me.

LWUIT Form.show() has a weird margin (or padding)

When i add a Form to LWUIT using form.show(), the form is not set exactly in the (0,0) coordinate, it's leaving like 20 pixels in the top and 3 on the left.
I'm developing for the Nokia SDK 1.1 FYI and i'm using their version of LWUIT
Let me know if there is a workaround on this.
Cheers!
Alberto
EDIT:
Here is how i'm creating the Form
Display.init(this);
this.view = new Form();
this.view.setLayout(new CoordinateLayout(Display.getInstance().getDisplayWidth(), Display.getInstance().getDisplayHeight()));
this.view.setScrollableY(false);
this.view.show();
This shows a padding on the top and on the left side (Bigger on the top than on the left side)
See a screen shot:
Found the 2 Issues:
1) I had to set the titleArea padding and margins to 0 like this:
this.view.getTitleArea().getStyle().setMargin(0, 0, 0, 0);
this.view.getTitleArea().getStyle().setPadding(0, 0, 0, 0);
this.view.revalidate();
2) For the left padding, it was in the label where i was placing the photo, so just changing it's style (padding) to 0 made the trick
Cheers,

WebKit CSS transformations and animations in Javascript

I'm working on a IPhone web application. I just starded playing with the webkit-transform and webkit-animation CSS rules. I've some questions: for example, is there real advantage in using these instead of, say, jQuery.animate(...)? The resulting animations don't seem to be that much accelerated and fast. Let's explain better: I've a series of images I have to move on the screen, like a gallery... I set each image CSS rules like this:
-webkit-transition-property: left, top, right, bottom, width;
-webkit-transition-duration: 200ms;
then I change the style.left and style.top of each element I want to move with new coordinates. The result is not so fast as I expected. It is fast more or less as jQuery is (not fluid at all). I've seen there is even -webkit-animation and -webkit-transform but I still don't understand how to use them properly. The first one lets me move things around, but doesn't generate an animation, I use the following code:
var trans = "translate(" + x + "px," + y + "px)";
ELEMENT.style.webkitTransform = trans;
with this the element moves around, but without an animation. If I create dynamically an animation with:
var lastSheet = document.styleSheets[document.styleSheets.length - 1];
lastSheet.insertRule("#-webkit-keyframes "+ "animX" + "{ from { top: "+oy+"px; left:"+ox+"px;} to {top: " + y + "px; left: " + x + "px; } }",lastSheet.cssRules.length);
ELEMENT.style.webkitAnimationName = "animX";
this way the element will move once, not so fludly, and well be back to it's old position. Repeating this code doesn't lead to anything.
What do you think, is there a real advantage in terms of fluidity of movement in using those? And if yes, how to use them properly?
Something like this should do what you want, and runs quite smoothly in Safari on my iPhone 4:
<style type='text/css'>
#element {
position: absolute;
top: 0px;
left: 0px;
-webkit-transition-property: top, left, bottom, right;
-webkit-transition-duration: 300ms;
-webkit-transition-timing-function: ease-in;
}
</style>
<script type='text/javascript'>
document.querySelector('#element').style.left = '300px';
</script>