Aligning Divs Side by Side CSS & HTML tutorial
HTML-код
- Опубликовано: 1 дек 2020
- in this video, I will show you how to place three DIVS beside each other using HTML AND CSS. It is easy to accomplish that, and you need to pay attention to the percentages of the width. All divs by default are 100%. if you divide it by three, the results will be 33.33% Set the width of each div to 33.33%. Float the left Div to left. float: left; float the right DIV to right float:right; and to center the middle div, just add margin: 0 auto; This way the divs should be placed next to each other smoothly. Also, if you want to add more width to a specific DIV, basically, decrease the percentage from one Div and add it to the other DIV.
#webDesign #CSS #html - Хобби
this is exactly what i was searching for thank you.
Glad I could help! Thanks for watching
same
Me tooooooo🎉🎉🎉
i usually dont leave a comment on videos but you dont know how happy this made me feel, watching my website for a school project fall into place as i learn tables can go into divs, i have been making it all in tables and this video was what i was looking for. its been like 3 weeks of being stuck slow process but now i can finish it.
again, thank you greatly "the wheelchair guy"
Thank you for watching. Please subscribe to learn more about html and css ✌️
make sure that you include this property in the middle div if the divs are not aligning properly:
display:inline-block;
Or give display:flex to wrapper div and give flex:1
You made it so easy for someone who hasn't used CSS/HTML in over a decade. You earned my sub.
I am so happy. Thanks for watching
Thank you so much, you helped me figure out my first css task at my first job 😀
Thank you very much for the intel. I've been struggling since yesterday with the div tags, until I found this video.
Perfectly explained. Thank you.
Thank you so very much for this, sir! This is what I'm looking for. God bless you
Glad it helped!
thank you so much, if this didnt work i was about to do like a million non-breaking spaces until it was on the right side
this is gold i spent lots of time looking for such a simple explanation the calculator bit didn't cross my mind lol
rank = big PP
Not just that you made it really easy to understand, but you made me proud too coming from the same country, Thank you for this video!
Thanks bro for watching ✌️🇮🇶
Thank you Sir.... I was able to enhance my current knowledge through this video.
Thank you so much! This video helped out a lot getting my website together!
Ty soo much bro after finding it soo long i finally got the thing i want and you showed everything and concept was also clear 🎉
Your delivery is very clear, thank you
Glad you think so!
Thanks a lot, I've been struggling with this forever but you explained it in 6mins :)
Glad it helped! I’m happy to hear that
i really appreciate this tutorial! Thank you!!!!
You are a legend!
Thank you so much!
thanks alot i was spending hours understanding some issue but this video give me idea to fix it mine is totaly different issue but your video just showed me a way to fix my problem
this is so clear and concise thank you so much
Glad it was helpful! I hope that you like and subscribe
Thq you so much sir. I was in great confusion of how to do this. But you made me understand.
Thank you very much. Highly appreciate this video.
this video is awesome. helped me to save a ton of time. thank you.
This helped me and the keyboard sound so satisfying
Thanks for watching
Thank you very very much , this is what I'm looking for
This is exactly what I needed. Thanks!
You're so welcome!
Thanks a lot..my head was hang..your video make me happy
Glad to hear that
Mate that helped so much! Thank you!
Glad to hear it!
Your video was really very helpful, to the point and no time wasting. Thank you so much ❤
Thanks for watching. I am glad to hear that
To the point video. Awesome!
Glad you think so!
Thank you sir for the tutorial.
THANKS I AM HAVING THIS PROBLEM FROM MORE THAN 5 DAYS THANKS FOR SOLVING MY PROBLEM!
You’re welcome please sub
Thanks man, helped a lot
Glad to hear it!
Thank you very much, Sir! Helped a lot!
Glad it helped!
Very helpful. Thanks!
Anytime
Thank u soo much.I've been struggling since yesterday.
Omg what a relief😊😊
You’re welcome. Please sub
Thank you. Keep posting.!!
Thank you, I will
Well done man , keep up the good work .
Thanks for watching :D
Thanks man save my day☺🤗
bro you helped me so much! I was trying to copy the google translate site to improve my skills, but i couldn't do the header, cuz the hamburger menu didn't behave...
Very good my bro . thanks .
Love and support from india..thank you for this
Thanks for watching
Thank you very much! Helped a lot
I’m happy to hear that
Thank you so much sir it really helped me I really need this
Best video I've found thank you!
I’m glad it helped you. Please subscribe to my channel
@@TheWheelchairGuy I already did :)
@@jackychan8539 ty
Thankyou so much!
Thank you very much 100x I'm new to code I just finished learning Html but I still have a lot to learn
You’re doing great. Keep it up
You are Rock bro now i can move my div thanks a lot good bless you thanks for tis video
You’re welcome. Please sub
I LOVE IT THANK YOU SO MUCH
I'm glad!
thanks a lot💙
This video saved me.. Thank you sir
You are most welcome
thank you so much sir!
Same to you!
thanks, god bless you
Good understand
Thank you you solved my great problem
I’m glad to hear that. I hope you like and subscribe
I like this guy....
Thank you sir. Your video helped me. God bless you.
Thanks for watching
God Bless you Sir Thanks
Thank you for watching
thank you so much!! i subscribed your channel sir!
Thanks for watching and subscribing
actually you helped me a lot :)!
I’m happy to hear that
thank youuu so muchhh, this is the one i'm looking for to complete my assignment,thank you so much❤️❤️😭
You’re welcome. Please if you need any tutorials, you can let me know. Once again, thanks for watching
@@TheWheelchairGuy what to do if i'm doing the css in the different file? how to call it?
@@suhailahzawawi you have to include place it in the head tag. Once it is linked, you can test it by changing the background color
@@TheWheelchairGuy thank youuu sir, thank you so much i really appreciate that❤️😭
Thank you!!
Thank you soo much🥰🥰
After many videos....finally you cleared my doubt🙏
Glad to hear that
@@TheWheelchairGuywelcome sir
❤🙏
Really nice video!
Thanks for watching. Please sub
my guy MASHING that keyboard
😂
this helped me soo much thank you
Glad to hear that. Watch my latest tutorial, you might like it. ruclips.net/video/cSon4PW-tiE/видео.html
Wow!
Thank you !!!
You're welcome!
great thanks : )
Great presentation. You could achieve the same thing without calculations by using this on the .container class:
justify-content: space-between;
display: flex;
That’s if you’re using flex. You’re right 😍
Bro thank you sooooooooooooooooooooo much you help me a lot
Thanks. Please subscribe bro
this partially fixed my problem
Hello, what are you trying to accomplish? Let me know, and I’ll help
thanks for this sir.
Most welcome
Thank you for your video
Thanks for watching!
Thank you sir!
Thank you for watching. Please check out my latest tutorial ruclips.net/video/bMYFhl0KCnU/видео.html
Thank you :)
You're welcome!
Thank you!
You're welcome!
I liked it but I have a question, that how the middle div got on top between other two divs with float left? I mean I tried a lot with margin to get the div2 in the middle but it didn’t had any movement. Thanks
Your middle div did not go to the middle because you have to set the width of the div and you have to set a display to it. For instance, display:block; then, you set margin left and right to auto.
useful video
Glad to hear that
Thanku so much
good
thank you
Thank you sir
All the best
Watch my latest video about aligning DIVS Side By Side ruclips.net/video/Jstq1otuHAI/видео.html
I've created a system where there are fields where u can input data and it will send the data to the data base once submit button is pressed. Then i saw your vid im planning to add more fields but im having trouble on how can i make all that three div in one submit button. Do u have a tutorial about something like that?
Could you please explain it more a little bit, so I can tell you what to do? Thanks
Thank you, i am practicing making a blog-type of web page, could you please tell me how to make div middle (which i put at 200px height, its a headline) go across the whole page horizontally overriding other divs?? thanks again
You can use z-index to make a div go over the other divs
Good
Thanks
so lets say I want to make ONE div and space out the text inside that one div like you did with %'s. How could I go about it?
Basically use padding: 10%; or something like that
Hi, my 'float-right' does not seem to align, meaning when all of the above is done it sits much like your centre piece one lower than the other 2 divs. Please help
Make sure you set the display of all to to display: inline-block;
Thanks bro😘
Welcome
Thanks.. just need to watch this and done.. problem solved
I’m glad it worked. Please like and subscribe
Tjgkg
thanks
Just wonder why the listing of divs was somewhat random, right, left, middle. Why not left, middle, right? Or I am thinking or this in terms of language syntax vs CSS coding?
You could do that and it’s more proper, but I was l just showing you that it doesn’t really matter
Thanks❤
You're welcome 😊
❤❤
Thanks
🙏
THANKS
You're welcome!
What are you using to write the code, i cant seem to find an editor or something like that
Vs code
@@TheWheelchairGuy thanks very much!
@@TheWheelchairGuy btw, is it an app i can get on mac?
@@proalgcuber198 yes. Here is the link code.visualstudio.com/download
@@TheWheelchairGuy thanks man, im watching a tutorial right now to see how to use it, thanks very much, im also going to watch a lot of your videos to get better at what i am doing
if i want to scroll the middle div while my left and right div remains fixed like facebook then what i have to do???. need youir help
You can simply add position: fixed; to the elements you want to stay on the screen.
Tnx bor
so i have aligned a text at left side and a button at the right side, but they arent in same line. I want them in same line how do i do it i dont get it
set the display to inline block for both elements
display: inline-block;
@@TheWheelchairGuy thanks it worked