Wrap text around any image or shape that you want with shape-outside and shape-margin

Поділитися
Вставка
  • Опубліковано 10 лис 2024

КОМЕНТАРІ • 139

  • @KevinPowell
    @KevinPowell  3 роки тому +13

    The first 1000 people to use the link will get a free trial of Skillshare Premium Membership: skl.sh/kevinpowell03211

    • @kuntaldas2843
      @kuntaldas2843 3 роки тому

      what the... Kevin using time machine

    • @rohitbisht5457
      @rohitbisht5457 3 роки тому

      A very nice video sir u r the best. A quick request, can u make a video about a parent div element who is smaller in size compare to its child div element and has overflow hidden . And the objective is to have a moving animation of parent div over its child div without moving its child div during animation
      Thank you

  • @marcod.643
    @marcod.643 3 роки тому +23

    Interesting video as always and... nice T-Shirt 🤣🤣🤣

  • @Morrile1
    @Morrile1 3 роки тому +3

    Whilst this is something I don't think I would use (yet) it does highlight that web designing is very fluid and ever changing. Many thanks Kevin for the Skillshare Premium membership :-)))

  • @FieryHammer
    @FieryHammer 3 роки тому +6

    I have found your channel during the weekend and I am watching since. I could already use some stuff you show in your videos and have marked a lot to see later. I have also added your course on my ToDo list. You are one of the few people who make me understand CSS and be actually excited about doing things with it :)

  • @scheimong
    @scheimong 3 роки тому +7

    Love it. Wish I had known about it when I was writing code for my custom multi-line ellipsis. I had so much trouble that I eventually gave up. This auto-wrap trick would basically make that trivial.

  • @shivanshshalabh
    @shivanshshalabh 3 роки тому +3

    I was just going to search for a video on this topic. Thanks a lot for putting up this video 'CSS KING'

  • @guillermoandradaFSD
    @guillermoandradaFSD 3 роки тому +1

    The most desirable content I found on the Internet about this subject. Thanks Kev for teaching like that.

  • @cintron3d
    @cintron3d 3 роки тому +1

    Ok that url trick is dope. Many thanks for sharing all these tips!

  • @timbittins
    @timbittins 3 роки тому +1

    Wonderful! Now I can wrap text around images like I wrap my head around CSS. Thanks Mr. P!

  • @harishst202
    @harishst202 3 роки тому +1

    Awesome as always! Thanks for sharing!

  • @JimGarns
    @JimGarns 3 роки тому +11

    It annoys me how much I have to question the amount I know about CSS after watching every one of your videos!! Thanks for this, added to my snippet catalogue

  • @techtipsuk
    @techtipsuk 3 роки тому

    Flow root, you learn something new every day

  • @Pfoffie
    @Pfoffie 3 роки тому +2

    Thanks for float-root 🥰😍❣️

    • @KevinPowell
      @KevinPowell  3 роки тому +1

      I just wish we had it 5+ years ago 😅

    • @Pfoffie
      @Pfoffie 3 роки тому

      @@KevinPowell i so agree haha

  • @joandmello660
    @joandmello660 3 роки тому

    You are simply awesome Kevin

  • @harounach
    @harounach 3 роки тому +1

    Thanks Kevin this is pretty awesome

    • @KevinPowell
      @KevinPowell  3 роки тому

      Thanks, glad you enjoyed it :D

  • @sulaimandev
    @sulaimandev 3 роки тому +1

    Most needed video

  • @djordjek3916
    @djordjek3916 3 роки тому +2

    Thank you very much for everything you do Kevin. I always learn something new from watching your videos. Liked.

  • @SouravTechLabs
    @SouravTechLabs 9 місяців тому

    Great tip, watched this 2 years back, but using it now! The real challenge however comes when the image, in my case it's a doughnut chart from vue-chart, needs to be in the middle!

  • @anb1142
    @anb1142 3 роки тому

    I've been stuck at this problem for hours
    You're a godsend

  • @VladimirJanjic02
    @VladimirJanjic02 3 роки тому

    I started so far with videos and i am going to watch every video u made in last month also, so far i can say you are getting better and better and your content is much better every time, so i am glad u are making progress and continue like that, big support for you work! :)

  • @jsthaut
    @jsthaut 3 роки тому +1

    Thank you so much you don't know how much i needed this tutorial

  • @MyIreallydontcare
    @MyIreallydontcare 3 роки тому

    Kevin, I bloody love your videos.

  • @harshjain8345
    @harshjain8345 3 роки тому +1

    Wow...great And unique css property..🙌🙌

  • @celeis100
    @celeis100 3 роки тому

    This has definitely made my portfolio better looking, thank you so much!

  • @0xbitbybit
    @0xbitbybit 3 роки тому +1

    Awesome, such useful videos, cheers mate!

  • @GergelyCsermely
    @GergelyCsermely 3 роки тому +1

    Thank You!

  • @ginaGale
    @ginaGale 4 дні тому

    Thanks, this is just what I needed.

  • @AlanWagoner
    @AlanWagoner 3 роки тому

    Great video and I liked the shirt!

  • @abdelmonemnaceur7776
    @abdelmonemnaceur7776 3 роки тому +1

    Who else is waiting for new videos notifications from Kevin's channel! Interesting :D!

  • @ortania
    @ortania 3 роки тому +1

    By the way, In Chrome there is CSS Shapes Editor extension for dev tools, that works in a similar way as in Firefox

  • @sirjohn2924
    @sirjohn2924 3 роки тому +1

    Vaov!!, it was very interesting to learn that, Thanks Kevin

  • @galiprandi
    @galiprandi 3 роки тому

    Great t-shirt and great video! 👏

  • @jatinkhatri9650
    @jatinkhatri9650 Рік тому

    struggling for this thing for one day. Thanks a lot. You made my day.😇

  • @tessamactaggart5822
    @tessamactaggart5822 2 роки тому

    Just wow.. and so well explained! Thank you.

  • @ahsath
    @ahsath 3 роки тому +3

    That's new, I remember a while ago I wanted the create a wave couldn't do it, but with path() oh boy

  • @BigBadTubaDudeCRA
    @BigBadTubaDudeCRA 3 роки тому

    This blew my mind . I'm making a website for Basics of Web Development class and it's a presidential campaign page for Saitama from one punch man. I wrapped the bio text around OPM and my teacher said he didn't know how I did that so it blew his mind too!

  • @yupii1997
    @yupii1997 3 роки тому +2

    Educational and great video as always Kevin as a self thaught(still learning) developer your videos help me so much

  • @iiviigames
    @iiviigames 2 роки тому

    If I had watched this when I woke up this morning, I would have saved myself 10 hours of rage and I'd still have a 2 monitor setup.

  • @maelstrom57
    @maelstrom57 3 роки тому

    I'm so using on my next project, thanks Kev

  • @thevonmunchies9213
    @thevonmunchies9213 2 роки тому

    Super useful! Thank you!

  • @MohammadAbdulHyeShaon
    @MohammadAbdulHyeShaon 3 роки тому +1

    Awesome....Go Ahead

  • @ari_archer
    @ari_archer 3 роки тому

    this content is underrated

  • @franciscomagalhaes7457
    @franciscomagalhaes7457 3 роки тому +1

    Hey Kevin, if you made a lil demo exemplifying how to draw a path (maybe in figma) and tie it to an image to get this effect, maintaining responsiveness, that would be really valuable. Thanks a bunch for the great tidbits you keep offering without all the "You need to know this to be a web developer" clickbait!

  • @vishsingh7235
    @vishsingh7235 3 роки тому

    OMG Kevin. I need that shirt!

  • @ahmadhassan5680
    @ahmadhassan5680 3 роки тому

    thank you kevin.

  • @Astras-Stargate
    @Astras-Stargate 3 роки тому

    Thanks Kevin!

  • @AntoniKrokodyl
    @AntoniKrokodyl Рік тому

    Great video, love the t shirt.

  • @peteharrison3241
    @peteharrison3241 10 місяців тому

    Great tutorial Kevin, thanks. I found this example of creating hexagon/polygon grids, can you use similar techniques you've used to wrap text around the image to shape text inside the hexagons ?

  • @davispeixoto
    @davispeixoto 3 роки тому

    This is awesome! Thanks

  • @pandabike3826
    @pandabike3826 3 роки тому

    Amazing! Thank you!

  • @Mathemarius
    @Mathemarius 3 роки тому +1

    5:42 The reason why this wasn't working as you expected is that you put all points on the diagonal (same x and y value).

  • @jenniferward6821
    @jenniferward6821 3 роки тому

    my hero

  • @wolfenrico
    @wolfenrico Рік тому

    This is great!!!! Thanks!

  • @DenisTRUFFAUT
    @DenisTRUFFAUT 2 роки тому

    Awesome !

  • @shayanfaghihi
    @shayanfaghihi 3 роки тому

    You are amazing Kevin. What's the application you use for recording your desktop?

  • @brummyninja
    @brummyninja 2 роки тому

    I stumbled across this after pondering how to do something similar with images

  • @kuntaldas2843
    @kuntaldas2843 3 роки тому +17

    totally forgot "float" still exists

    • @dankierson
      @dankierson 3 роки тому

      Try making a price list without float.

    • @dankierson
      @dankierson 3 роки тому

      @Danny Kirkham One with varying amounts of periods between each item and its price, with the prices all aligned in one vertical line like here www.speediwash.ie/prices.html ? If you have a link to an example of this, please provide it.

  • @Beat0X
    @Beat0X 3 роки тому

    You can see the shape-outside of url type in chrome devtools ça simply hovering over the element that has the property in the elements tab

  • @manthkumar1094
    @manthkumar1094 3 роки тому

    really amazing video.

  • @js-swift
    @js-swift 3 роки тому +1

    Thanks a lot Sir because you always update me to become better in css 🍔 🍔 🍔 🍔 🍔

  • @travezripley
    @travezripley 3 роки тому

    Thank kev!!

  • @JamesCoyle95
    @JamesCoyle95 3 роки тому +2

    With your last example, if the text is taller than the image, how do you get the image to stick to the bottom right of the container?

  • @rkd-me
    @rkd-me 3 роки тому

    Woah, didnt know about flow root, would use clearfix instead, thanks!

  • @snakemanluffy7645
    @snakemanluffy7645 3 роки тому

    wow cool property :D

  • @ayoreis
    @ayoreis 3 роки тому +3

    Ha ha ha 😀
    I use that plant image as my desktop background.

  • @pallavisinghchandansingh9203
    @pallavisinghchandansingh9203 2 роки тому

    Thank you very much sir I am a child and you really helped me

  • @dankierson
    @dankierson 3 роки тому

    Floats without clearfix, welcome aboard!

  • @utkarshagrawal3640
    @utkarshagrawal3640 3 роки тому +1

    According to u what is the best way of showing a drop-down list ??

  • @aminedev_07
    @aminedev_07 3 роки тому +2

    hey! i hope the next video would be designing a thumbnail with css

    • @KevinPowell
      @KevinPowell  3 роки тому

      Like my YT thumbnails? I still use Photoshop for that 😅

    • @aminedev_07
      @aminedev_07 3 роки тому

      @@KevinPowell ik just like a new idea or smth

  • @chhavimanichoubey9437
    @chhavimanichoubey9437 3 роки тому

    woah latest magic tricks

  • @rathernotdisclose8064
    @rathernotdisclose8064 3 роки тому

    Awesome

  • @joaomatos1144
    @joaomatos1144 3 роки тому

    API by Day
    IPA by Night
    hahah, nice once!

  • @craigmillerer
    @craigmillerer 3 роки тому +1

    Can you animate/transition shape-outside?

  • @Ostap1974
    @Ostap1974 3 роки тому +1

    interesting that it includes margin in the playground.

    • @KevinPowell
      @KevinPowell  3 роки тому

      I was pleasantly surprised when I discovered that :)

  • @somnvm37
    @somnvm37 3 роки тому +1

    0:57 soup image, of a lemon, right?

  • @francescotagliavento8081
    @francescotagliavento8081 3 роки тому +1

    when are you going to do a video about positing?

  • @ColinPittendrigh
    @ColinPittendrigh 3 роки тому

    What you do so well--that other css hot rods do not--is illustrate the normal intuitive thought process, illustrating likely pitfalls along the way. That way the reader (the viewer) gets the long context WHY rather than a short but complex and inexplicable HOW.

  • @techtipsuk
    @techtipsuk 3 роки тому

    Could just add some white space in your image to get around that constrain.

  • @thedacian123
    @thedacian123 2 роки тому

    Why you did not get rid of 'float:left'?

  • @pijusmilinis2260
    @pijusmilinis2260 3 роки тому

    Any idea, why shape-outside is not working particularly on chrome if the text has a property of display flex?

  • @mohammadnoushadsiddiqui4786
    @mohammadnoushadsiddiqui4786 3 роки тому +1

    Which IDE is best for html css and JS right now m using vs code m thinking to switch to webstorm coz vs code lags sometime when there is lot of Sass files there

    • @KevinPowell
      @KevinPowell  3 роки тому +1

      What are you using to compile the Sass? I've never run into an issue myself.

    • @mohammadnoushadsiddiqui4786
      @mohammadnoushadsiddiqui4786 3 роки тому

      @@KevinPowell live Sass compiler extension sir after the latest update of vs I encountered this problem sir 😅

  • @JOEL-nn8fk
    @JOEL-nn8fk 3 роки тому

    Can't seem to get the shape-outside: url('path'); to work -- it still wraps like an old school float. Help....

  • @tomvoltz7506
    @tomvoltz7506 3 роки тому

    Hi Kevin, I have a multicolumn p-tag (margin: 0 auto; column-width: 20em;) Unfortunately wrapping the text on a circular image won't work with that. Is there a work around? Thanks

  • @saadamehdi2848
    @saadamehdi2848 Рік тому

    There's a big issue. How does this work witih a figure element (I need figcaptions) ? It doesn't... shape-outside only applies to img

  • @KeyObserver1
    @KeyObserver1 Рік тому

    Hello Kevin. Your video is really helpful. I have managed to use the "shape-outside: circle ();" command in my CSS file on Notepad. However, when I used the "shape-outside: url();" command, nothing changed, that is, my text is still not wrapping around my irregular image. Any suggestions?

  • @janemig
    @janemig 3 роки тому

    Hi Kevin, Does it only work with webp images? I'm using a png with a transparent bkgd but it's not working. Thanks!

  • @arunsp767
    @arunsp767 3 роки тому

    So shape-outside works only inside?

  • @r-i-ch
    @r-i-ch 3 роки тому +1

    I always wonder why you don't use clip-paths/shapes in your CSS Battles.

    • @KevinPowell
      @KevinPowell  3 роки тому

      Writing them out and getting the right shape in under 10 minutes wouldn't work well for me 😅

  • @GlennPhilp
    @GlennPhilp 3 роки тому

    How would you go about implementing this for a CMS? The struggle is to implement something like this requires developer skills as each image can be different in size and shape. For developer pages it is fun and relatively easy.

  • @chang112x
    @chang112x 3 роки тому

    This is black magick.

  • @MightyHuff
    @MightyHuff 2 місяці тому

    Is there a maximum number of lines of text for this to work as I managed to get one to float right with shape but when I try to float left it either does nothing or just move the subsequent lines of text away. Any idea as to why this is?

  • @98toxic1
    @98toxic1 3 роки тому +1

    Where can I buy that shirt?

    • @KevinPowell
      @KevinPowell  3 роки тому +1

      The store I bought it from has closed sadly, but if you do a search for it, it looks like it's all over the place anyway :)

  • @josvelema2362
    @josvelema2362 3 роки тому +1

    Sorcery! great stuff just don't use IE .. no support according to caniuse.

  • @Jaseinatl
    @Jaseinatl 2 роки тому

    Can you only do this with image elements or could you use the shape features to wrap around, say a headline?

    • @KevinPowell
      @KevinPowell  2 роки тому

      Pretty sure it only works with images that have transparency. You can do it with SVGs as well, or provide it with a different clip path, say, based on an SVG, so you could simulate it for text, but seems like a lot of work.

  • @DevTeacher
    @DevTeacher 3 роки тому

    First of all, your content is great and you are making it very easy to understand the main concept of subject that you are showing. But I can’t get my old and grumpy dev head around that your are using class on all html element and don’t use ID on single / unique elements. Is it just being lazy or a bad habit that I see more and more devs user here on UA-cam ?
    Let’s teach new developers that correct way of doing things and not use wrong definitions just because CSS don’t care.
    Cheers

  • @haythamkenway1561
    @haythamkenway1561 3 роки тому

    Hey Kevin do you have tutorial about API ?

    • @KevinPowell
      @KevinPowell  3 роки тому +1

      No, I don't. Anything specific you're after? There is one on FreeCodeCamp's channel that is awesome.

    • @haythamkenway1561
      @haythamkenway1561 3 роки тому

      @@KevinPowell I was looking for some API Lesson because I heard just front end and html , css , js , etc ... is not enough.
      some people told me that I must learn about something like RestAPI.
      what do you think about that? is it real?

  • @itzikca
    @itzikca 3 роки тому

    You dont have that in chrome (the visualization thing) ? Because i usually develop in chrome...

    • @KevinPowell
      @KevinPowell  3 роки тому +3

      I'd strongly suggest Firefox for CSS work. Much better dev tools when it comes to CSS.

  • @rannyarcher29
    @rannyarcher29 3 роки тому +1

    plz we want how to put a border to inormal shapes 😄😄

    • @ayoreis
      @ayoreis 3 роки тому +2

      Use a filter whit the drop-shadow() CSS function whit no blur and spread

    • @josvelema2362
      @josvelema2362 3 роки тому +1

      @@ayoreis nice one 1 combined it with a box shadow and turned a div into a neon sign :O :D

  • @huaweitrainingsafrica3742
    @huaweitrainingsafrica3742 Рік тому

    For this to work, I think the image has to be the first child. I was working with a design that required the image to be second child (that is after the text) and wasn't working. Until I moved the image before the text. Then gave my image "float:right;" style. If anyone has an alternative workaround, please help. DISCLAIMER; I am not really good with floats.

  • @anb1142
    @anb1142 3 роки тому

    What's "IPA"