Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Welcome to Code Forum!
Join a community that supports you and your coding journey from day one. We strive to be a friendly, supportive community that empowers everyone to be better developers. By registering with us, you'll be able to discuss, share and private message with other members of our community.
I'd suggest using a UL for your nav items and then you can apply borders to the LI elements. Of course you'll need to style the UL to be without bullets and horizontal. Pad the A elements to create your rectangular click areas.
<nav>
<div class="box">
<ul>...
Here's what I came up with:
/* Form styling */
form {
display: flex;
flex-direction: column;
align-items: center;
text-align: left;
max-width: 400px;
width: 100%;
margin: 0 auto;
}
label...
I’d suggest putting the input inside the label but before the label text. Then set the label to display:flex; align-items:center;
You might want to add a bit of a margin to the right of the input.
If you don’t want the label text wrapping under the input, wrap the text in a span.
Tough one. Here's a quick sample I whipped up:
https://tomliv.com/game-test/
Adjust as needed. You might have better luck with this structure and manipulating the label background rather than the input.
One thing I noticed is you are sizing fonts with viewport units. This is fine, to a point. Fonts can become very small and very large very quickly. I recommend using this tool:
https://royalfig.github.io/fluid-typography-calculator/
I believe everything you need is in this screenshot:
https://cln.sh/pCymVq0kfDjWsWh8tzQ3
Note the structure changes (everything is INSIDE .wrapper) and the Changes panel (far right) for CSS fixes. I was able to get it working just be dragging things in the inspector and tweaking CSS in the...
<main> is outside of the wrapper. Currently, nav will only stay stuck as long as wrapper is in the viewport. Since all the page content is outside of wrapper, it scrolls away.
Also, you don't need shouldn't have a height on the wrapper other than maybe 100vh (so you can force a footer to...
It would be easier with a link to inspect, but it sounds like the nav is not a child of the wrapper. Note the structure of my sample. The stuck element needs to be a child of the scroll-able wrapper. Scroll-able because of the amount of content.
Edit:
The stuck element has to be a child of a...
I'm not sure why you would define a height at all, unless there is no content on the page. .navbar height should be whatever height it needs for links and padding etc. You would rarely define a height on anything except images.
The container that you wish to have become stuck to the top of the viewport must be the container that gets position:sticky;. It looks to me like you have position:sticky; on the elements above your navbar. You would need something along these lines:
[topper]
[navigation...
I don't use bootstrap. And won't, if I can help it, but that's neither here nor there. If the sample code from @simong1993 works, then it appears you can add the necessary CSS for what you need in addition to BS. No?
That seems strange. Did you confirm that your new styles were being loaded? Are they being overridden somehow? Sounds to me that your new styles are being loaded/used on the page.
You seem to have made some effect as I am no longer seeing the arrows on this page on mobile or desktop:
https://www.ketoforindia.com/mediterranean-diet-meal-plan-food-list-indian/
The styles are listed as 'inline' so perhaps that can help you track it down? I am seeing some kind of utility...
So you don't have access to the code to remove the media query?
You can repeat the styles needed outside of any media query and the styles will be applied all the time. It will be duplicate code on mobile but it will work.
You can also add another media query:
@media only screen and...