Giter VIP home page Giter VIP logo

css_display_position_zindex_exercise's Introduction

CSS Display, Position, and Z-Index

1. Add CSS to improve index.html

  • Make a CSS file and import it into your HTML. Feel free to adjust your HTML or CSS as needed.

  • Frequently, we'd like to make our navigation bar (navbar) always visible so that we don't have to scroll all the way to the top to access the links. We can do this by using the fixed position value.

  • Observe and utilize the classes given to the HTML elements that constitute a 'project card'. Those are project_card, project_description, project_image.

    • Make all the project images the same width and height keeping their 16:9 aspect ratio.

    • Give each project a solid border of 2px

    • Give the project description a semi-transparent background in a color of your liking;

    • Change the text color to contrast nicely with your background color making your text pleasant to read. In my case this is White.

    • Utilizing position: absolute; for .project_description, lay it over you project image. You will also need to give the parent element a position otherwise the position: absolute; given to the child will be relative to the body. Given that you have a semi-transparent background color this will give a nice effect.

      Hint

      Read about position: absolute;

    • Once you have all the above you may have a bug. If you scroll down over your projects you may find that your navbar may be going under the project cards. The navbar should always be on top of everything. Fix this using the z-index;

  • Using position, visually arrange the Skills section lists into steps. Each one in increments of 10% from the left side; A suggestion maybe to wrap your list and corresponding header in a div to make this easier.

  • Using either flex or grid for the Contact Me section make all the information appear in one line/row rather than a column. It will serve us as a footer. Make sure your items have some space in between.

  • Make the 'Back to top' button appear always visible on the bottom right corner of the window no matter where the user has scrolled to.

  • Let's shed some light on the situation. Place this image in the upper-right hand corner of the screen. Give it position: absolute so it stays there, and make sure it has a z-index so that nothing ever covers it.

Demo

styled pages demonstration

Here you will also find a pdf with a static image of what your page should look like.

2. [Bonus] Style it better

css_display_position_zindex_exercise's People

Contributors

alejo4373 avatar benstone1 avatar coreyladovsky avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.