Jump to content

Template examples / h3 classes not centered on iPad

Recommended Posts

I'm new to w3schools and forum, forgive me if this belongs in the General section.

I've been attempting to learn responsive web design from bottom to top from a book I loaned from the library. The examples are always incomplete and the code never seems to be consistent from one example to the next. Thought I'd take a look at your templates and see about learning from top on down. 

While experimenting with the parallax template I notice the section headings are not centered on my iPad (granted it's one of the old iPads). Attached is a screen shot of how your template looks on my iPad. Is there a fix for this?

Any reply appreciated. Love the templates w3schools provide and look forward to figuring it all out.



Link to post
Share on other sites

I can't tell for sure why that's happening just from the screenshot, I would need to actually see the image and code, or the page itself, in order to be sure.

If that is a background image which is not extending to the full width of the element then it means the image is not large enough, you can set the background-size to "100% auto" (100% wide and height adjusts based on the image's aspect ratio) or center the image if you prefer.

If the background image is large enough and is actually reaching the full size of the container then that means something is getting outside of the container and you would need to find out why.

Link to post
Share on other sites

Thanks, Ingolme.

Sorry, I might not have been clear in my original post. But do you see how the "MY WEBSITE LOGO" displays to the right in the above screenshot? It is centered on my laptop and phone. Same goes for the other headings when you scroll down on the ipad. They're all shifted to the right and not centered.

Here's the link to the actual template: https://www.w3schools.com/w3css/tryw3css_templates_parallax.htm#about

Any idea from looking at the code on your end?

I appreciate your time and reply!


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...