I have a div with a grid inside and I want to center it horizontally but so far I haven't found any solution to this problem yet.
I found a couple of solutions but they are all using CSS is there any other way to do this with out using css?just like when centering text you just put text-aign:center?
honestly? no way imo. text-align=center; is css by the way.
Take a look at this page and start learning css, its easy and fun!
http://webdesign.about.com/od/beginningcss/a/aa012207.htm
Related
So I have built a site using Keith Clark's pure CSS parallax idea. And it looks good, but I'm curious if anyone has figured out how to allow inertial/momentum scrolling on iOS.
Here is my site so far.
What I know so far:
Currently inertial/momentum scrolling doesn't work because essentially the whole page is held within a container with overflow-y:auto. So when you are scrolling on the page you are scrolling within a container.
On iOS you have to apply -webkit-overflow-scrolling: touch to allow anything that scrolls that isn't the viewport to have inertial/momentum scrolling.
If you add -webkit-overflow-scrolling: touch to .parallax then the entire parallax effect breaks.
example of that here
I've tried adding iscroll.js to the page but it also breaks the page by making the children within the .parallax container to scroll in a way that isn't proper. It makes the parallax layers move up and down relative to the viewport instead of he container.
Another problem that this causes which isn't as big a deal but would be nice to address here since it's related is that on iOS the page will never go into minimal-ui since that only happens when the viewport scrolls.
I've seen people ask about this on the blog post so I figured I could bring the same problems over to stackoverflow and see if anyone has any good ideas.
Thanks!
Not what you want to hear (assuming you put in some good hours reading through Keith Clark's guide) but iOS handles scrolling events differently than desktop. It's possible you could adjust what you have already, but if you really want this you're probably better off switching to a js tool with documented support for iOS parallax + momentum. Stellar can do this, for example - http://markdalgleish.com/projects/stellar.js/docs/
I am an Android developer trying to learn Dart-Polymer(I am also fairly new to HTML dev). I tried the custom card example in the polymer tutorial, and as an extension I want to display multiple cards in a rectangular grid. I see there are horizontal and vertical layouts in Polymer, and I was wondering if Polymer has something like GridView in Android. Can someone suggest how to proceed ?
The grid on left is what I want to achieve :
The core-card is on the right. I can see that element in the designer (please see the panel in right under core). But I am unable to find the core-card in Polymer libraries. That's why I am going with custom card (from the tutorial mentioned above). I would like to use core-card if available.
After posting this question, I found out about core-layout-grid - I am not sure how to use it, and if that's what I need.
Polymer has excellent handling to ease the use of CSS FlexBox. Using the various layout,horizontal,vertical, wrap, and flex attributes it is very easy to make very flexible and responsive layouts, including grids.
You can read more about the Layout attributes and their uses, including various alignment attributes from the Polymer Layout Attributes page. In particular look at the Wrapping section as it helps to create responsive grids that will appropriately adjust based on the width of the display.
I want users of my website to use pagination on their mobile devices, like for example UIScrollView with paging enabled in iOS.
Still the website should also be viewable on desktops.
So far, I tried Foundation's orbit, but that just doesn't feel fluent at all (when you release your finger, it performs the sliding a little delayed).
Is there any good alternative on how to get this done? If possible I would like the user to even slide vertically as well as horizontally.
Maybe Swipe.js is the thing you looking for.
have you tried SwipeView?
Here you have an demo gallery
I'm looking for this too, but I really think they are none.
If you want it to be fluid, you have create your own using CSS3 animation/transform and so it will not work on hold browser (IE < 10 or 11, but I'm not sure). If you want to handle touch events I recommend you to check out "jQuery Modile"
You can try iScroll 5 it's quite simple but do the trick perfectly.
You will find in the archive of the project an example of horizontal paging under demos/carousel, you will see it's quite good. :)
In addition you will be able to see all other things you can do with iScroll which should fit your demands.
I'm having a problem that others have talked about here. ie How to auto adjust TextArea Height. I saw this answer: Creating a textarea with auto-resize
but I was hoping someone here can translate how to do this in GWT or Smart GWT.
Take a look at SimpleLayoutPanel. It enables you to respond to the browser's resize events.
There's a dedicated sample in SmartGWT for this use case:
http://www.smartclient.com/smartgwt/showcase/#layout_form_filling
If you're using SmartGWT you should not introduce core GWT widgets without a good reason (and there isn't one here obviously).
I'm currently scoping out a project for the iPad which is rather text and font heavy. There are many pages of styled text, which also need custom fonts. I have toyed with the idea of simply rendering PDF or PNG files on-screen, but I think we need to be able to dynamically repaginate the text.
We've used UIWebView in a previous project quite successfully, however there are a few things I don't like about it... Firstly, you have to hide all the silly drop shadow elements to stop them showing when the user scrolls beyond the bounds, and we had to add some JavaScript to find out actually when a page had fully loaded. Overall, the experience seemed a bit clunky, as well as worrying if the project could potentially break if Apple decided to update the subviews...
The other thing we've been looking at is Core Text, which looks very powerful. The only worry with this is that it appears to be a rather steep learning curve for us since we've mainly been working in UIKit (with a bit of Core Graphics). I couldn't even work out how to change the size of the font after a morning's work.
Are there any other alternatives*? Should I stick with Core Text? Is there any way of using UITextView with multiple fonts and styles?
Thanks!
:-Joe
EDIT: *by alternatives, I am really looking for built-in iPhone SDK alternatives only please... I would rather not mess with third party frameworks because I don't have the time... Thanks :)
You could use Pango, which uses CoreText when on iOS.