🚨 Ebook Launch 🚨
Thank you everyone for voting & helping me select a topic for my first Ebook!!
Bringing to you
" Simplifying CSS Box Model "
Grab your copy for free👇
⚡️Adding Favicon to Website
▪️Favicon is added via <link> tag.
▪️Just add the <link> tag below the <title> inside <head> with the path to the favicon.
⬇️
⚡️How to create a Favicon?
▪️Any image can work but it should be small & simple with high contrast.
▪️Normally preferred sizes are 16 x 16 and 32 x 32.
▪️You can also create & download a favicon using below sites →
• https://favicon.cc
• https://favicon.io/favicon-generator/…⬇️
🔺Favicon is a small image that appears beside the website name.
🔺It is known by many names like tab icon, bookmark icon because it is displayed on a browser's tab, bookmark bar etc.
🔺Most famous & widely used format for favicon is .ico
⬇️
Hey everyone!!
I am planning to write my first Ebook but not really able to decide on a good topic.
I have only 3 topics in mind. Which one should I write on?
If you have any other CSS/HTML related topic, please mention in the comments!!
Note : "type" attribute is used in <input> tags to mention the type of form element.
It can take values like file, email, password, radio,
checkbox etc.
⬇️
⚡️Values
▪️ "accept" can take any one of the following values
• file extension : like .gif , .jpg , .png etc.
• audio/* : means user can select all sound files
• video/* : user can select all video files
• image/* : user can select any image file
⬇️
5. Adding ":checked" pseudo class
▪️ with :checked class we can easily style elements
when a checkbox is clicked by pairing them up with
appropriate selectors.
▪️ I've increased width to 100% for ::before of checkbox input tag
⬇️
4. Styling "toggle-text"
▪️ pointer-events:none prevents <span> from obstructing the click event on checkbox input tag.
▪️ ::before of <span> is used to write "OFF" which
changes to "ON" when toggle is clicked.
⬇️
3. Styling checkbox input tag
▪️ apperance:none removes default styling
of checkbox.
▪️ ::before pseudo element is used to add that reddish
brown background when toggle button is clicked
▪️ z-index is -1 for ::before so that it appears behind
the text written in <span>
⬇️
2. Styling <label> tag
▪️ position:relative is used because checkbox tag
and span are placed relative to this <label> tag.
▪️inline-block is used so that I can add width & height
to <label> tag
⬇️
🔸Project Alert : Toggle Button Generator🔸
I will be adding many more toggle button designs here.
You can easily copy their code & use in your projects!!
Feedbacks are welcome!!😊
Live link : https://toggle-button-generator.vercel.app
(GitHub link👇)
4. Styling <span> tag
▪️position: relative is used because z-index property doesn't work without position property.
▪️z-index is set as 2 which is higher than ::before so that this text appears on top of stripes pattern.
▪️on hover text color is changed to white
⬇️
3. Styling ::before
▪️left is set as 50% to start the transition from middle
▪️linear-gradient() is used to make stripes
▪️z-index is set to 1 so that this background appears below the text written inside <span>
▪️on hover, width is transitioned to 100%
⬇️
12. checkCount() & resetValues()
▪when a backspace is pressed, checkCount() is called to check for count variable values & accordingly remove the "checked" class from <li>
▪resetValues() resets the variables & styling of <li> tags.
⬇️