Basic response page with centered content
source link: https://www.codesd.com/item/basic-response-page-with-centered-content.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Basic response page with centered content
I have a webpage and I'm using Jquery mobile.
I have an image and un text and I would like to center the content in my page horizontaly and verticaly, and when I modify the width of the window, the content should adapt.
Here is an example :
In the example, the content adapt correctly, but it's not centered. if I set the style of my content div to :
style="position: absolute; top: 0; bottom: 0; left: 0; right: 0; margin: auto;width: 500px;"
To my div, the content is centered but no longer adapt...
Can you update my jsfiddle to do what I need ?
You can work with display: table;
on the outer and display:table-cell
on the inner container to center stuff vertically. Check this out:
http://jsfiddle.net/NrCGb/578/
EDIT Max width 500px for content:
Related Articles
How can I burn pages with dynamic content using node.js?
Get the result of the PHP script of a page with HTML content by AJAX
Force footer down on pages with little content
Place the div at the bottom of the page with dynamic content
Web Scraping pages with javascript content on shared hosting
Using node.js to run a basic Web page with CSS and JS elements
ASP.NET vs. JQuery to create a Web page with dynamic content
The best way to fill a page with dynamic content
Spring how to merge an external html page with generated content
Sensitive circle with centered content
read the web page (with dynamic content) and save
How to publish to the Facebook page with multimedia content using Node JS
How to load the HTML page with javascript content in a WebView Xamarin.Forms?
The iframe html page with flash content creates a problem for the drop-down menu
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK