For your .aboutWrapper, you can just add a negative margin-top and a padding on the top and bottom of the #about section. Or you can try it using position: absolute with a negative top.
About the .image-overlay class, I think the problem is the line height of you h1, you could try to change that property and adjust any further detail.
No, but line-height use a value relative to the font-size, so it will be at a certain point a responsive value.
You can add one more div nested with a class name like .aboutOverlay and do those changes:
.aboutWrapper {
position: relative; // set .aboutWrapper to relative
width: 70%; // maintain the older width
margin: auto; // center the block
}
.aboutOverlay {
position: absolute; // makes this class absolute relative to .aboutWrapper
width: 100%; // occupy all the available area (70% set in .aboutWrapper)
top: -50px; // negative top position which will do the overlay for you
background-color: white; // from here, you have all you design properties who were in .aboutWrapper class
border: 1px solid black;
box-shadow: 2px 2px 5px;
height: 300px;
}
You have a few issues with your CSS, i know it’s a WIP but i just wanted to point them out.
.nav-list {
wrap: wrap; // Unknown property name
flex-wrap: wrap; // I think this is what you are looking for
}
.nav-logo {
height: relative; // Invalid property value
}
.image-overlay {
heght: 100%; // should be height
background: auto; // Invalid property value
overflow: auto; // You don't want this
width: relative; // Invalid property value
}
.image-overlay > h1 {
line-height: 100px; // Most likely you want to use a value that is unitless line-height: 1.1;
}
If you are blurring the div, it will blur all of the content inside of that div. If you want to blur a specific piece of content, a more specific selector should help.
Notice how i removed the background properties from the container and added a div with a class of .background-image to put all of the background related things. Then added position relative to the #waterBannerImage so that you can use position absolute with the new .background-image div. Then gave the div a position of absolute, top 0, left 0 and gave width and height of 100%, now it covers the whole container, add the previous background properties and added the filter.
Also, i encourage you to use this-kind-of-naming-convention for HTML and CSS. For JavaScript, camelCaseForTheWin!
Yes because it’s a background image on the container you have the text inside. There are a few ways of fixing it.
Use a different container for the text, as you are not really relying on the text to be inside the image container you can just move it out. It would be different if the container was using position relative and the text was nested inside using position absolute.
You don’t have to use a CSS background image to achieve the full width layout, it can also be achieved using a normal img element. That would let you target just the img for the blur.
Wow thanks so much, i didn’t know about this method until know (putting image as a separate container) and it works great. I will be using that a lot more now.
How can i prevent my about section (.aboutWrapper) from blurring when over the div?
You don’t have to use a CSS background image
I use background image so i can use the fixed attachment affect.
I’m so glad that it helped, it has also made my life so much better!
Yes, i understand why you use a background image, sometimes it is just the way to go, and in your case it is definitely the best thing to do, no need for position images here.
In regards to the blurriness, lol this is quite funny, i was about to try something out it just got fixed. Add a position: relative to your .aboutWrapper. I can’t tell you why it works, but it does!
Also, if you have 10-15 bucks you are not using, i highly encourage you to get this course:
I am not related in any way with the creator of the course, i mean, look at his last name! It is just that this course is extremely high quality, it really teaches amazing techniques with CSS and the instructor is really good at explaining things. Also, with what you know you are ready to take it. In regards to the price, maybe it costs more than $15 now, but in Udemy courses are pretty much always at $10 up to $15 so you could wait a bit.
Thanks, and btw this was for a science project. Basically we were given the option to write a 1 page min/max paper or a webpage/ 3D project on creating a pseudo scientific idea (like infinite strength water).
Udemy is something i have heard of, but i didn’t know if it was worth the money.
Don’t worry, i don’t see you as ‘spamming or adverting.’ FCC is great for teaching basics but this is more advanced, which is great. Judging by some research they have sales constantly (no idea from experience however). So if i miss this one ill just do the next one, or this
If you really want the course just use an incognito tab or clear cookies and you will get the 10$ deal again. They store cookies that see if you’ve ‘seen’ the sale ‘expire’ and increase the price for the new sale for just you.
How did you learn coding? You seem very good at it.