My webpage isn't responding to some of the properties I have set in my CSS file
when i gave the property of position as
fixed
it worked but it's not working for the value sticky
20 Replies
What behaviour are you expecting? What behaviour are you getting?
"It's not working" doesn't tell us anything
sticky also needs to know which edge to have a size on it. e.g. top:0px;
i wanted the h1 tag to stay in the top of the page even when i scroll down, that's what happen when we used
fixed
right?yes, fixed will pin the element to a set position on the page no matter the scroll degree.
sticky can produce a similar effect once you properly configure/set the CSS properties on it.
this might be the issue let me check
it's working now
great, please mark this 'question' as 'SOLVED' (when you can)
i also tried to change the width of image and it wasn't working so I thought there was some other big issue messing the whole thing up
I'll do it, also can i dm you for another general question I have
If you have another question please make a new post. Don’t randomly DM server members
there is a prime use-case for position:sticky, more for elements that are initially lower on the page before scrolling, then rises only as far up as, say, the top edge of the page, then parks there remaining in view as the page continues to scroll down.
I wouldn't randomly send them dms. I was asking permission first, but I'll try to do what you said tho from now on
it benefits the group when you share your questions as posts so others may review and get support for an already covered topic. (that's the point of having shared question posts)
I feel like burdening others when I ask some questions, like I'm asking something dumb
If you have a question, you make a post. That way:
* Others who have the same issue later can learn from it
* Those who can help will, when they can
* You're allowing everyone in the server the chance to help, and not rely on only one person (who might not even be in the same timezone as you)
The only dumb question is the unasked question
And you're not a burden. We've all been new to something and had to ask for help. Most of us are here to either learn from others, pass on our knowledge, or both
nice, thanks for the help and supportive words @13eck @ProdJuan
Heck, one of the reasons I don’t ask many questions is that over the past (almost) decade I’ve learned how to search and read MDN. It’s an acquired skill that you’ll learn
oh nice, so that's one thing I should learn
I'll keep this in mind. Looks like a useful skill
Almost all front-end stuff can be found there. It’s like The Docs™️ of HTML, CSS, and JS
I see, I thought they were limited and might not have some edge cases. also I'm at the starting stage and I have no idea what's wrong, so I think after I learn things a bit I'll be able to use MDN and figure out my doubts
MDN -> https://developer.mozilla.org/en-US/docs/Web/CSS (the CSS focused content but they have several other topics)
as @13eck just explained, we all started somewhere, and learning how to leverage the 'search' features for both this server and the MDN and other resources can streamline both the learning process and the development effort.
thanks for the link
thanks I'll ask my questions in the server then