Cascading Style Sheet (CSS) is arguably the easiest language in web development; most of it has to do with the normal English language we speak and write everyday, e.g. font, transition, display, color etc. Are regular words we use in our everyday life. Despite the simple nature of CSS, one cannot deny a newbie the right to make some *relevant mistake that more often than not, influence the entire outcome of the style sheet.
To commemorate my 20th birthday today, we shall take a look at the compilation of the top 3 possible newbie CSS mistake that leaves its mark on the entire style sheet.
It is no longer a secret the float:center; is not a valid CSS property. As a newbie, it is a forgivable mistake if you try to position a particular element to the center by specifying a margin (either left or right) against the other in a calculated manner. Here is the correct way of centralizing an object.
This will fix the problem without any further modification.
object-id and object-class is the id and class of the object you want to hide. Note: Adding display:none !important; to any object CSS will prevent that object from rendering on the main page.
To get the object id or class of an element, simply right click on the element and click inspect element from a web browser.
The same is applicable for other properties aside the display property.
Indeed this should be 20 Key Questions Newbies Ask on CSS, but I can promise you that more is coming, for now, I have got a birthday party to attend. Subscribe to my newsletter to an email alert when new updates are published. For now, have fun!
Previous Previous post: Nirvana has to wait for the next 48hrs!
Next Next post: Some Secrets I Know about the Rich you probably don’t Know….