Top 10 css interview questions and answers

  Рет қаралды 401,270

techsith

techsith

Күн бұрын

Top 10 commonly asked CSS interview questions and possible answers for front-end programmers.
#css #interview #questions
For more interview questions checkout
*www.fullstack....
*My Udemy Courses
www.udemy.com/...
www.udemy.com/...
Follow me for technology updates
* / techsith
* / techsith
* / techsith1
* / 13677140
* / patelhemil
Help me translate this video.
* www.youtube.co...
Note: use translate.goog... to translate this video to your language. Let me know once you do that so i can give you credit. Thank you in advance.

Пікірлер: 258
@paullujan4719
@paullujan4719 4 жыл бұрын
0:40 - What is box model? 3:30 - What is specificity? 6:51 - How to align a block element inside another element? 10:11 - Difference between Static, Relative, Absolute and Fixed position? 13:28 - Difference between visibility:hidden; and display:none;
@Techsithtube
@Techsithtube 4 жыл бұрын
Thanks for the comment and detail break down.
@preethips1628
@preethips1628 3 жыл бұрын
I have attended one interview mostly they asked about javascript as ur teaching now.. This video helped me a lots guys highly recommended to this Sir all videos
@Techsithtube
@Techsithtube 3 жыл бұрын
I am glad it helped. Thaank you for watching!
@surajitdas6555
@surajitdas6555 5 жыл бұрын
Both visibility and display elements will be three at DOM. However, display none element will not take any space whereas visibility hidden will not be shown on the page but will keep it's space captured.
@nirajbhutada6308
@nirajbhutada6308 5 жыл бұрын
yes correct. Both will get rendered in page. but display none will not take any space and visibility hidden will take it
@RankMotion
@RankMotion 5 жыл бұрын
13:29 Difference between visibility:hidden; and display:none; I think that the best way to show the difference between this properties is creating a stack of three divs, for example: one two three div { margin: 20px; width: 200px; height: 50px; background-color: #4477FF; } Then play with the properties of div.two .two { visibility: hidden; /*display: none;*/ }
@KrishnaDasPC
@KrishnaDasPC 5 жыл бұрын
difference between inline and inline-block is also an important one.
@biyasbanerjee7288
@biyasbanerjee7288 4 жыл бұрын
I have seen quite a few videos from your site. The way you explained it's just fantastic. You are explain any topic step by step and they are easy to understand. Thank you:)
@Techsithtube
@Techsithtube 4 жыл бұрын
glad you like it. Thanks for watching.
@LiseFracalossi
@LiseFracalossi 4 жыл бұрын
If all you need to do is align the inner box *horizontally* (the most common use case), a much easier way to do it would be set the left and right margins to "auto."
@Techsithtube
@Techsithtube 4 жыл бұрын
yep that is the best way. thanks for sharing.
@jezykkk
@jezykkk 5 жыл бұрын
You've made a mistake with explaining how position absolute works. Position absolute is not relative to the parent but to closest ancestor with position relative or fixed, and that is super important.
@ganeshshetty8441
@ganeshshetty8441 3 жыл бұрын
at 2:59 box-sizing: border-box means it includes padding as well , so width becomes 40px , not 60px
@facundocorradini
@facundocorradini 6 жыл бұрын
Display:none elements still exists in the DOM, they just don't occupy space in the render
@jesuskraisnik
@jesuskraisnik 5 жыл бұрын
True.
@awekeningbro1207
@awekeningbro1207 5 жыл бұрын
Yeah but display:none doesn't exist in CSSOM
@davidcraft4909
@davidcraft4909 5 жыл бұрын
I really liked this video because I learned a few things and I already knew one of your questions which sort of boosted my confidence. I also had some general idea of most of it but I can't say I knew everything at all. great video
@dark-matter-tek
@dark-matter-tek 5 жыл бұрын
Great video! If possible, would you add timestamps for each question for other videos too? I can do it in comments, but it'd be helpful when I want to rewatch these videos. Thank you. 3:37 What is specificity?
@facundocorradini
@facundocorradini 6 жыл бұрын
For centering with even simpler CSS, you can use "top:0; left:0; bottom:0; right:0; margin:auto;" instead of translate.
@funanytime8843
@funanytime8843 6 жыл бұрын
thanks for this
@magburner
@magburner 5 жыл бұрын
margin: 0 auto; Is optimal.
@amaury_permer
@amaury_permer 5 жыл бұрын
@@magburner but only for horizontal centering and the element has to be displayed as block
@itech40
@itech40 5 жыл бұрын
Position: relative?
@amaury_permer
@amaury_permer 5 жыл бұрын
Absolute but parent's position as relative
@ruchirai5775
@ruchirai5775 4 жыл бұрын
@Techsith - Box-sizing includes only padding and border.Not margin.I think you said box-sizing will fix margin as well.Margin is never included in height and width of element.I tried this , please let me know if I am right.
@sergi3629
@sergi3629 5 жыл бұрын
Great video, it's fundamentals that we sometimes give for granted and after a while we kind of forget how to explain properly : ) also very informative for beginners.
@Techsithtube
@Techsithtube 5 жыл бұрын
Thanks for watching Sergi !
@shawnmofid7131
@shawnmofid7131 4 жыл бұрын
Could you list in the "show more" section what editor you use? I have been trying to put this in Brackets and do not get the green box, so I switched to codepen: .out { width: 400px; height: 400px; background-color:yellow; position: relative; } .in{ width: 100px; height: 100px; background-color: green; } But it would be great to know how to make it work in Brackets.
@ahmer9800
@ahmer9800 6 жыл бұрын
Dude you're literally helping me for my interview tomorrow. Thank you so much!!
@munirapatel6270
@munirapatel6270 5 жыл бұрын
DB were you asked any of this questions ?
@ozzyfromspace
@ozzyfromspace 5 жыл бұрын
I'm new to CSS (like 2 weeks old as of this writing) so I only got the first three questions right lol. Thank you for posting this! It shows me that I'm making progress, although I have a long way to go :) #iSubscribed
@Techsithtube
@Techsithtube 5 жыл бұрын
three questions for a newbie is pretty good. keep up the good work.
@abhinavtyagi7233
@abhinavtyagi7233 4 жыл бұрын
Greatest teacher ever with solid concepts
@Techsithtube
@Techsithtube 4 жыл бұрын
Abhinav thanks for an awesome comment!
@clydencube384
@clydencube384 6 жыл бұрын
Really precise and shading light off all the confusion. Thanks!
@Techsithtube
@Techsithtube 6 жыл бұрын
glad to help. Thanks for watching! I am planning to make more of such videos.
@flyingbirds4235
@flyingbirds4235 6 жыл бұрын
Sir bohat acha video hai. Very informative. Thanks
@Obyvvatel
@Obyvvatel 6 жыл бұрын
The common theme with interview questions seems to be "I already knew what this was, but I didn't know it was called this way, so I wouldn't be able to answer.".
@Techsithtube
@Techsithtube 6 жыл бұрын
Yes, sometimes its genuine sometimes it not. One time I was asked do you know SPA, and i said i don't what is it. And the interview said how can you call yourself a modern webdev without knowing SPA. Then i ask BTW what is SPA? and he said Single Page Application. I said ofcorse i know what that is. :)
@naruto5437
@naruto5437 5 жыл бұрын
awesome collection of interviews....going through actual interviews, these questions do come up
@mehtabmultani3194
@mehtabmultani3194 3 жыл бұрын
For centering a div inside a div, you can use two more simple methods: Note: css only apply for out div (parent div) 1. display: flex; justify-content: center; align-items: center; 2. display: grid; place-items: center;
@ManOnHorizon
@ManOnHorizon 4 жыл бұрын
9:39 - how come this "old, good CSS"? "transform" is supported in IE only since the 9th version. I know, I know, it was released about 9 years ago already, but I start to believe now that those older donkey versions are truly everlasting.
@mohideenasraf7837
@mohideenasraf7837 5 жыл бұрын
Hi, left:calc(50%-(width/2)); top:calc(50%-(height/2)); did the same thing instead of transform ??
@sten6160
@sten6160 5 жыл бұрын
But what if width or height is not fixed? such as width: 50%?
@MANISHSHARMA-xk1su
@MANISHSHARMA-xk1su 5 жыл бұрын
awesome video....
@VirtuozEd
@VirtuozEd 3 жыл бұрын
Such a great and valuable explanations. Thank you so much
@Techsithtube
@Techsithtube 3 жыл бұрын
Glad it was helpful!
@wandat6353
@wandat6353 6 жыл бұрын
Super helpful video, thank you!
@LuisDiaz-qg3eg
@LuisDiaz-qg3eg 6 жыл бұрын
You could have gotten away with relative positioning in that inner box and absolute (default) in the outer box. I just tested it.
@Techsithtube
@Techsithtube 6 жыл бұрын
Yep that is right. thanks for the suggestion! :)
@ganeshshetty8441
@ganeshshetty8441 3 жыл бұрын
Nice one Hemil Patel
@onkaryerawar99
@onkaryerawar99 6 жыл бұрын
Question 1 => Shouldn't the content be 40px*40px and not 60px×60px as there is also padding of 10px?
@dvnarxx
@dvnarxx 5 жыл бұрын
Yes, of course
@SaleemRaza1
@SaleemRaza1 4 жыл бұрын
Brother techsith is very smart and beautiful. I am really impressed by his videos. I was feeling love for him. As the song says, Jab kisi say pyaar kero tu phir izhaar keroo, (i.e. when you feel love for someone, show the love by kissing), sorry my english is poor. Thank you. Love for all.
@Techsithtube
@Techsithtube 4 жыл бұрын
Saleem, thanks for the kind comment. Love from techsith
@MrVisheshsingh
@MrVisheshsingh 7 жыл бұрын
Thank you very much for helping the community!
@Techsithtube
@Techsithtube 7 жыл бұрын
Thanks for watching!
@mstalcup
@mstalcup 6 жыл бұрын
Flexbox IS plain CSS.
@RaviShankar-so9xp
@RaviShankar-so9xp 6 жыл бұрын
While aligning div inside another div.. I have 2 question [1] Why you use display:relative in outer div and display:absolute in inner div... how outer div position property affect inner div position means how they are related to each other because in absolute box positioned wrt its parent. [2] what if we use only display:relative in inner div and is there any issue in using this ??
@Techsithtube
@Techsithtube 6 жыл бұрын
elements that are position absolute they need a reference point and by making the parent position relative you are providing that reference point. 2) you could use position relative for inner div but it would behave completely differently in lots of cases. becase position relative means relative to its original position no the parent . I have a tutorial on position property that you can check it out which explains all the position types in detail.
@RaviShankar-so9xp
@RaviShankar-so9xp 6 жыл бұрын
Thank You ... you are doing a great job
@hakanbakur
@hakanbakur 5 жыл бұрын
I think there is a mistake on the border box explanation: You said the border is part of the content in border-box modell... thats true but also the padding is part of the content: So your content is not 60px x 60px it is 40px x 40px because you have the padding left and right each of 10 pixels. Tell me if i am wrong
@Techsithtube
@Techsithtube 5 жыл бұрын
border-box allows you to not change the content. so your content stays the same while your border increasing. Padding is different. border-box only deals with borders and content.
@RajuYadav-ws2zy
@RajuYadav-ws2zy 5 жыл бұрын
Thank you, it's really nice video....
@tyler13923
@tyler13923 5 жыл бұрын
You're the best on the web
@Techsithtube
@Techsithtube 5 жыл бұрын
Thanks Tyler for watching and a nice comment :)
@hamzarahouti5147
@hamzarahouti5147 5 жыл бұрын
what is text editor you use
@lambar0
@lambar0 Жыл бұрын
Clear and comrehensive
@theartist8835
@theartist8835 4 жыл бұрын
/* centering 1/ position: relative // parent position: absolute; // child top: 0; right: 0; bottom: 0; left: 0; margin: auto; 2/ display: flex; // parent margin: auto; // child 3/ // parent display: flex; justify-content: center; align-items: center; 4/ // parent display: grid; place-items: center 5/ centering text width: 500px; // parent width and height (not necessarily) height: 500px; text-align: center; // child line-height: 500px; // line-height should be as high as the parent height 6/ position: relative; // parent position: absolute; // child left:50%; top:50%; transform: translate(-50%,-50%); */let's know how you center things !
@smoothbeak
@smoothbeak 5 жыл бұрын
Only a Sith Lord deals with absolute positioning.
@adilzamal3218
@adilzamal3218 5 жыл бұрын
will be awaiting for future lecture
@ryanmac4051
@ryanmac4051 4 жыл бұрын
btw, just liked this video because of the video picture alone. +1 for the memes XD
@sourishdutta9600
@sourishdutta9600 6 жыл бұрын
Sir will you please make a tutorial on accessibility in web.Please sir it will be so helpful.Thank you sir.You are awesome.
@MTGpackopeners
@MTGpackopeners 4 жыл бұрын
this is a good tutorial and funny as well thank you
@SushilYadav7
@SushilYadav7 4 жыл бұрын
I too forgot to mention border of the box model in my very first ui interview. 😅
@Techsithtube
@Techsithtube 4 жыл бұрын
Yes, that is a very common question for a junior front-end interview. I too did get that question .
@deepshikhasahni5190
@deepshikhasahni5190 6 жыл бұрын
awesome questions ...helped me v much..
@dodo9670
@dodo9670 5 жыл бұрын
You are the best indian guy on youtube
@zko5906
@zko5906 4 жыл бұрын
Qs 3: .out { display: flex; justify-content: center; align-items: center; }
@jackwright7014
@jackwright7014 4 жыл бұрын
Try place-items: center. Its a shorthand for justify-content and align-items. 😁
@AjayKumar-id7mb
@AjayKumar-id7mb 2 жыл бұрын
Which compiler he is using ??
@princejaiswal439
@princejaiswal439 5 жыл бұрын
Hello sir..Please make a tutorial on css flexbox..
@sanketatmaram
@sanketatmaram 4 жыл бұрын
Great Explaination.
4 жыл бұрын
Good content
@Billy011nb
@Billy011nb 4 жыл бұрын
Thanks this was super helpful!!
@Techsithtube
@Techsithtube 4 жыл бұрын
Julie, I am glad it was helpful. Thanks for watching!
@ibrahimshaikh3642
@ibrahimshaikh3642 5 жыл бұрын
Nice
@ChristianCanlubo
@ChristianCanlubo 5 жыл бұрын
Thanks for this :)
@gamer4lifetn366
@gamer4lifetn366 4 жыл бұрын
can you please tell me what is meta ??
@alexbrasovan
@alexbrasovan 6 жыл бұрын
Isn't absolute positioning relative to the first non-static positioned parent element?
@williamtitterton818
@williamtitterton818 5 жыл бұрын
by default absolute position is relative to the document body, but when a parent element has a position of relative then the absolute positioned element is position relative to that.
@tentx652
@tentx652 3 жыл бұрын
awesomeee
@Schlohmotion
@Schlohmotion 4 жыл бұрын
What software has he put on the display at 0:39 ?
@Techsithtube
@Techsithtube 4 жыл бұрын
That is JS fiddle.
@yaolegoleynik
@yaolegoleynik 5 жыл бұрын
Thank you
@naveennaidu8285
@naveennaidu8285 6 жыл бұрын
Useful video
@bhaskardharamsoth7043
@bhaskardharamsoth7043 Жыл бұрын
great
@invisiblestar6146
@invisiblestar6146 5 жыл бұрын
Which editor is it???
@Techsithtube
@Techsithtube 5 жыл бұрын
This is JS Fiddle
@swamyrakurthi
@swamyrakurthi 5 жыл бұрын
which editor are you using, please tell me any one
@MadhurjyaBora
@MadhurjyaBora 5 жыл бұрын
looks like jsfiddle. it's an online editor
@SoorajJose1
@SoorajJose1 6 жыл бұрын
Very useful
@vijayalakshmi6028
@vijayalakshmi6028 6 жыл бұрын
what's the editor used to explain the examples?
@Techsithtube
@Techsithtube 6 жыл бұрын
I usually use jsfiddle
@OliverJoshuaJacob
@OliverJoshuaJacob 5 жыл бұрын
Do you have a Udemy course too
@Techsithtube
@Techsithtube 5 жыл бұрын
Oliver, I am going to create a udemy course in the first part of the 2019 . Will announce it . Thanks for watching!
@vismitha_world_
@vismitha_world_ 5 жыл бұрын
@@Techsithtube is your udemy course up ? do you have any udemy course for angular also ?
@mexs8378
@mexs8378 3 жыл бұрын
What's that ide?
@LawZist
@LawZist 7 жыл бұрын
very good tuts!
@Techsithtube
@Techsithtube 7 жыл бұрын
Thanks for watching! :)
@vijayu707
@vijayu707 6 жыл бұрын
Good Video
@Techsithtube
@Techsithtube 6 жыл бұрын
Thanks fro watching! :)
@ganeshshetty8441
@ganeshshetty8441 2 жыл бұрын
display:none , With this elements will still be there at DOM, Its just that it does not take the space
@kandysman86
@kandysman86 5 жыл бұрын
I feel im ready for html css. Maybe not js yet
@dvnarxx
@dvnarxx 5 жыл бұрын
If you think you know html and css, you don't know html and css
@theabhishekmittal
@theabhishekmittal 6 жыл бұрын
your editor is very nice.. whats the name?
@dheeraj9179
@dheeraj9179 5 жыл бұрын
abhishek mittal code pen also does great
@avr9066
@avr9066 6 жыл бұрын
it helped :)
@Techsithtube
@Techsithtube 6 жыл бұрын
Thanks for watching :)
@DaveCollison
@DaveCollison 5 жыл бұрын
When making videos about CSS, please use a de-esser on your audio lol
@Techsithtube
@Techsithtube 5 жыл бұрын
lol point noted!
@wyattlastname477
@wyattlastname477 5 жыл бұрын
The ads are relentless. 2 minutes, 35 seconds, can't be skipped at all. Cut down on those, your videos are great otherwise, but the hefty ads make it so I don't even think I can finish the whole thing. They're cutting into the middle of the video too.
@Techsithtube
@Techsithtube 5 жыл бұрын
the Ads I cant control. I think youtube has gone bit far in putting longer ads on my channel .
@abdullahkhushi9006
@abdullahkhushi9006 5 жыл бұрын
Name of IDE that you use in your video.
@Techsithtube
@Techsithtube 5 жыл бұрын
I use JS FIddle.
@gajanandkumar7274
@gajanandkumar7274 5 жыл бұрын
Sublime text editor
@soultouchingsongs
@soultouchingsongs 6 жыл бұрын
Very useful.. 👍
@Techsithtube
@Techsithtube 6 жыл бұрын
thanks for watching! :)
@alfredaidoo4081
@alfredaidoo4081 6 жыл бұрын
Please what is the name of this text editor?
@Techsithtube
@Techsithtube 6 жыл бұрын
Its not a text editor. its jsfiddle an online code playground.
@alfredaidoo4081
@alfredaidoo4081 6 жыл бұрын
Thank you
@hotshots149
@hotshots149 5 жыл бұрын
Babe of the text editor?
@munachimarcel869
@munachimarcel869 4 жыл бұрын
how can i get job with html and css
@Techsithtube
@Techsithtube 4 жыл бұрын
these days you can become designer/component developer, that is the best way to get job in html css.
@gerardbautista7586
@gerardbautista7586 4 жыл бұрын
Interviewer: asks tgose questions Me thinking: ooohhh...yea.....I thought he was just gonna ask me to tell something about myself, I'm dead
@Techsithtube
@Techsithtube 4 жыл бұрын
:)
@joyandlove7710
@joyandlove7710 6 жыл бұрын
It is a great way to focus on these important problems after all kinds of practices myself. Thank you!
@divyanshugarg4376
@divyanshugarg4376 5 жыл бұрын
Thank you nice video, really helpful. Appreciate!
@MagiCityProductions
@MagiCityProductions 5 жыл бұрын
This is a very good tutorial. Although I've doing this for years, answering these questions in an interview can be difficult. Thanks!
@xiazhai8337
@xiazhai8337 5 жыл бұрын
Even if the element is set as display:none, the element is still in DOM because the clone() can make effects.
@harshshah2675
@harshshah2675 3 жыл бұрын
Why dont college's have a professor like u ?
@jogindervskiller
@jogindervskiller 5 жыл бұрын
regarding middle of any element you can use margin : -boxHeight/2 with absolute property rather then translate
@narangarig6434
@narangarig6434 5 жыл бұрын
.out { display: flex; width: 400px; height: 400px; background-color: #000; justify-content: center; align-items:center } .inner { width: 100px; height: 100px; background-color: #ccc; }
@arthur6892
@arthur6892 6 жыл бұрын
One thing might need to point out is a position:relative element might not always targets its "parent element", instead it targets the first parent element which is not position:static.
@thatoneuser8600
@thatoneuser8600 2 жыл бұрын
Why is this comment liked so much, it is wrong...
@surajgulhane6112
@surajgulhane6112 4 жыл бұрын
Nice video
@sanchit5764
@sanchit5764 3 жыл бұрын
Getting refreshed for the interview got easy
@Techsithtube
@Techsithtube 3 жыл бұрын
Thanks for watching!
@ga7853
@ga7853 6 жыл бұрын
Thank you, Greatly knowledgeable instructor, and clear very useful tutorial, Thank so much for taking the time to help others.
@Techsithtube
@Techsithtube 6 жыл бұрын
I am glad that it helped. Thanks for watching!
@azeemrahman3509
@azeemrahman3509 3 жыл бұрын
Which code editing tool/editor are you on sir
@kkch980
@kkch980 3 жыл бұрын
can i know what app you are using? thanks
@Primeto
@Primeto 2 жыл бұрын
no yes
@beautieshelp5973
@beautieshelp5973 Жыл бұрын
Wonderful teaching
Top 10 css interview questions and answers ( Part -2 )
10:27
techsith
Рет қаралды 124 М.
Tricky JavaScript Interview Questions and Answers
16:35
techsith
Рет қаралды 457 М.
Every parent is like this ❤️💚💚💜💙
00:10
Like Asiya
Рет қаралды 12 МЛН
Spongebob ate Michael Jackson 😱 #meme #spongebob #gmod
00:14
Mr. LoLo
Рет қаралды 9 МЛН
Пришёл к другу на ночёвку 😂
01:00
Cadrol&Fatich
Рет қаралды 11 МЛН
Tricky CSS Interview Questions and Answers
13:09
techsith
Рет қаралды 43 М.
Z-index CSS Tutorial ( Position and Stacking Order )
11:13
techsith
Рет қаралды 62 М.
What a REAL web developer interview is like (Front End)
19:59
Joshua Fluke
Рет қаралды 1,4 МЛН
These CSS PRO Tips & Tricks Will Blow Your Mind!
8:48
Coding2GO
Рет қаралды 340 М.
Top 25 Microservice Interview Questions Answered - Java Brains
39:54
Mock Technical Interview - Javascript Developer Entry Level
1:36:22
Tech with Nader
Рет қаралды 501 М.
Top Tricky JavaScript Interview Questions and Answers
15:42
techsith
Рет қаралды 82 М.
40+ MOST COMMONLY Asked Questions [JS, CSS, HTML]
16:17
A Software Engineer
Рет қаралды 41 М.
5 Front End Interview Questions That Every NEW Developer Should Know
9:01
Every parent is like this ❤️💚💚💜💙
00:10
Like Asiya
Рет қаралды 12 МЛН