--> Skip to main content

Featured

Steps to Create a Project on GitHub

Steps to create a project on GitHub:  1.   Start a repo on GitHub 2.   Make a README.md file 3.   Open vs code – new folder – new terminal – git clone http:…. (from the repo). 4.   In terminal – cd theprojectname   à move into the project file 5.   Ls -la is for showing hidden file à not working for me ???? 6.   Make some changes to README file, in terminal git status à shows all the changes on the file 7.   To add all changes update to the folder à git add . (the dot . means all changes to be added) 8.   Add a new file index.html, in terminal à git commit -m “title of commit” -m “description of commit” 9.   Then git push origin master 10.                 ****Initial a repo in local text editor à git init 11.                 After use git add . etc, when pus...

CSS max-width together with width property, what will happen?

The max-width CSS property sets the maximum width of an element. It prevents the width property's value from becoming larger than the value specified by max-width . That is to say that max-width value overrides width value if width value extends beyond the max-width. This may happen when the screen is stretched from mobile to large desktop screen e.g. Therefore it is sometimes safe to set both max-width and width values for the web page to determine the exact width at different screen sizes.

One scenario to use both can be when you set the max-width to be 800px; and width to be 90%, so that width won't go larger than 800px in big screens, and will shrink to fit the smaller screens, but meantime, the width=90%; will make sure the element always take 90% of the element width allowed. After testing out, I found that to switch the values around will work out the same result, which means with max-width: 90%; width: 800px;, you can achieve the same result.

Popular Posts