What is alternative of DIV in NativeScript? - nativescript

What is alternative of DIV in NativeScript?
How to use block inline with content inside?

Within Browser the behaviour div is determined by display CSS attribute.
For example, by default it's block and vertical which is similar to StackLayout with orientation set to vertical. When you make it inline, that's more like a horizontal layout, so again could be StackLayout with orientation set to horizontal.
There is again flex, we also have an equivalent in NativeScript, the FlexboxLayout. If you set position to absolute on div, it can be compared to AbsoluteLayout in NativeScript.
There is also GridLayout, WrapLayout, and DockLayout in NativeScript that serves various purposes.
So the alternative for div here totally depends on what kind of UI / layout you are looking for / how exactly you have styled the div on web.
If you are beginner, https://www.nslayouts.com/ is a good start to know all about NativeScript layouts.

Related

Fullpage JS - navigation dots don't change in size on scroll

Fullpage js navigation dots don’t change in size as I scroll between sections. Other navigation interactions work fine: the dots increase in size on hover and they are linked/anchored to the appropriate sections.
How can I make the dots change in size upon section transition? Thank you!
The default navigation bullets change size as you can see here. So unless you provide us with an codepen or jsfiiddle where we can't see this, my best guess is that you are not importing the CSS file or you are overwriting it's styles somehow.

Position absolute in Xamarin.Forms

I want to place my Views dynamically on my App, so I used Absolute Layout from Xamarin.Forms.
The problem is that when I set a Y position too big it doesn't behave like I want. I want to scrool when the element is off screen but it doesn't work. Do I have to add something or it's impossible with Absolute Layout ?
Instead of an AbsoluteLayout, you need to use RelativeLayout, because:
AbsoluteLayout:
Elements cannot be positioned off screen using proportional values.
RelativeLayout:
RelativeLayout does support positioning elements outside of its own
bounds.

Slick + Shopify theme causing strange behavior

Live site is here: www.wiivv.com
Here's a video of the issue: http://imgur.com/a/JEFne
On mobile, buttons are skipping around when you scroll. I think the issue may have something to do with Slick Carousel.
How would you troubleshoot an issue like this?
Looks like Slick is adjusting the height of your slideshow div according to the device you are using. It doesn't know to adjust the height for your second button.
The height adjustment to the div is usually done via Javascript. You can adjust the JS code to suit your buttons or put some CSS media queries in place to override what the JS is putting on your div.

bxslider - custom controls outside the slider

Iam new to css and html5.
I`m using bxslider and would like to have controls (arrow nav) outside the slider div. I made it according to http://bxslider.com/examples/custom-next-prev-selectors but I do not like it.
How to replace "onward" with an arrow image (jpg)?
How can I move my arrow image to the edge of the slider? I don't want it in the center but aside the slider.
http://www.pulik.edl.pl/WWWMG/foto.html
Why you don't use the controls of the own bxslider and change its css?
Then with left/right you can work around to make the controls to be on the edge of the slider.
Else, if you really want to use the custom controls, make a container around the controls and the slider. Then you can easily do the trick, if the container was made properly.
To move the direction controls outside of the content, you'll need to override the bxslider css in your own css file:
.bx-prev {
margin-left: -70px;
}
.bx-next {
margin-right: -70px;
}
This might cause a further issue where the controls are outside ALL of your content and not even visible. In that case you should wrap the whole slider control inside another div that has left and right padding.

Is it possible to make the iFrame of a Colorbox adaptive?

I made an adaptive theme with Drupal 7.22, which works very fine. Unfortunately the size of the iFrame's opened by Colorbox are not adaptive.
To open them, I do the following:
<a class="colorbox" href ="http://mydomain.tld?width=800&height=700&iframe=true">Link</a>
But the width and height properties are hard-coded. How can I specify different values for the width and height properties based on the browser aperture/screen definitions?
For example, all screens which have a width between 0 and 1024px should have a colorbox iFrame with the following properties:
width=800px
height700px
and all screens which have a resolution greater than 1024px should have a colorbox iFrame with the following properties:
width=500px
height400px
Do you have any suggestion on how to make these adaptive?
Take a look at jRespond:
https://github.com/ten1seven/jRespond
that might be the easiest way to accomplish what you are looking for.

Resources