Craig A. Bourne
Craig A. Bourne
  • 44
  • 195 270
CSS Ellipsis - Handling overflow and long text
► An ellipsis is a punctuation type represented by three dots, which signify a pause or an intentional omission of a word sentence or a whole section from some text.
We can create an ellipsis in CSS if we have text that is too long or in danger of overflowing its container.
While techniques like text wrapping, breaking and hyphenation offer similar ways to handle overflowing text, they could leave unsightly gaps of whitespace or break words in unsuitable places. In these scenarios, the ellipsis is a good alternative to manage overflow while showing that there is more to read.
► Timestamps:
0:00 Start
0:27 The ellipsis
0:52 Use of the ellipsis on social media platforms
2:16 How we implement the ellipsis with text-overflow
4:23 Making hidden text viewable on hover
5:21 End
► Get the code:
CodePen Start: codepen.io/craigabourne/pen/WNmQZqw
CodePen End: codepen.io/craigabourne/pen/NWJGvLE
► Links used in the video:
Text overflow with CSS Ellipsis: developer.mozilla.org/en-US/docs/Web/CSS/text-overflow
CSS Text Wrapping, Breaking & Hyphens: ua-cam.com/video/GShZTwP0EF4/v-deo.html
► This video is part of the CSS for Absolute Beginners playlist: ua-cam.com/play/PL4cTxE4s2XIYwGURywyDlkfmhmRC5FaUR.html
► Social Media:
craigabourne
craigabourne
► Code & Projects:
github.com/craigabourne
codepen.io/craigabourne
Переглядів: 1 791

Відео

CSS Text Wrapping, Breaking & Hyphens
Переглядів 3,4 тис.Рік тому
► Timestamps: 0:00 Start 0:37 Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch 1:36 Managing overflow 2:22 Preventing overflow 3:30 Text wrapping with overflow-wrap 5:00 Breaking with word-break 6:01 The HTML Line Break Opportunity element 6:44 Hyphens 8:08 End ► Get the code: Start: codepen.io/craigabourne/pen/KKBaONb End: codepen.io/craigabourne/pen/mdjWbwv ► Useful links: CSS overf...
How to Use and Optimize Google Fonts
Переглядів 2,8 тис.2 роки тому
► When CSS2 became standard, it meant we could specify custom fonts, which changed how the web looked. But it was not until 2009 that custom fonts were widely supported by browsers. Today, websites can call on any font it has the right to use. If you have access to a font, then you can use it on your website. One option is to buy a license from a font marketplace. But this can get pretty expens...
CSS Text & Font Fundamentals
Переглядів 2,9 тис.2 роки тому
► One of the most common things you will do with CSS is work with text. The CSS properties we use to style text fall into one of two categories. These are Font Styles and Text Layout Styles. The Font style category concerns properties that affect a text's font. These include the font family that is applied, the font size and weight, and so on. Text layout styles affect the layout features of th...
vh, vw, vmin, vmax: How to use CSS Viewport Units
Переглядів 12 тис.2 роки тому
► We can define the viewport as the visible dimensions of the browser window in which your web page displays. Viewport units then, are those that size elements relative to the dimensions of the viewport. Viewport units include: - vw (viewport width) - vh (viewport height) - vmin (the viewport minimum) - vmax (the viewport maximum) ... and we will cover all of these in this video Viewport units ...
Ems & Rems: How to use CSS Units
Переглядів 2,5 тис.2 роки тому
► ems and rems are relative units. Properties with these units take their sizes from font sizes. Elements that have properties using the ems unit are sized relative to the parent element. Unless they are a non-typographic property like height, or width. Then they take their size from the font size of the element itself. ems are really useful for setting things like margins, padding, and border ...
Using CSS Units correctly: Pixels and Percentages
Переглядів 3,3 тис.2 роки тому
► Modern CSS units allow us to set the sizes of a whole host of CSS properties. There are a range of different measurement units like pixels, rems and ems, vh and vw, vmin, vmax, %, millimeters, inches, centimeters, points, quarter millimeters, and many others. There is no need to know all of these. Over the next few videos, we will look at which ones we should know, and in which circumstances ...
Mastering CSS Positioning Once and For All
Переглядів 9 тис.2 роки тому
► The CSS position property allows us to define where element boxes are going to reside on the webpage. This could be relative to their usual starting position, relative to parent element or ancestor elements, or relative to the viewport. The position property can have one of five main properties: - position: static; - position: relative; - position: absolute; - position: fixed; - position: sti...
Understanding the CSS Display Property - block, inline, & inline-block
Переглядів 8 тис.2 роки тому
► The display property is responsible for how an element appears on the page. The main display properties (which we will cover in this video) are: - block - inline - inline-block Elements with display: block occupy the horizontal space of their container, stretching the full width available to them. Their height is determined by what their content needs.They can accept height and width properti...
Mastering the CSS Box Model
Переглядів 4,1 тис.2 роки тому
► Every element on a web page is rendered by the browser as a box. Whether it's paragraph text, a heading, a button, a div, a span, a link, or an image, every single element on a web page is a box that is made up of several properties. To be able to create cohesive layouts, it is important to understand the properties associated with these boxes so we can manipulate them. We can make the boxes ...
CSS Specificity
Переглядів 2,1 тис.3 роки тому
► Specificity is how browsers decide which CSS property values are the most relevant to an element and will therefore be applied. If you have ever been in a situation where you have tried to apply a given style to an element and find that for some reason that it just won’t apply, it is most likely due to specificity. Somewhere in your stylesheet (or even in another stylesheet) you will have a m...
Understanding Inheritance in CSS
Переглядів 1,8 тис.3 роки тому
► Inheritance is the behavior through which some elements can inherit styles that are applied to ancestor elements, rather than directly to themselves. So if a font is applied to a div element, for example, then that same font is applied to all text inside the div. Including the text enclosed within child elements of that div. If we were unable to do this in CSS, and property values could not b...
How to Manipulate Content With CSS Pseudo-Elements
Переглядів 2,3 тис.3 роки тому
► Pseudo-elements insert phantom or fake elements into a document which allows us to achieve certain effects. They are added by attaching keywords to CSS selectors that we can then use to style specific parts of elements. We can create generated content and insert it before, or after the content of an element, or use pseudo-elements to style certain parts of the content of elements. Like the fi...
How to Use CSS Pseudo-Classes
Переглядів 1,8 тис.3 роки тому
► Pseudo-classes specify a unique state of the element that has been triggered due to user interaction. A common pseudo-class that we are all familiar with is the :hover. Our pages will usually be full of links and buttons for users to click, and we would ordinarily set separate styles that only come in to force when the user hovers their cursor over the element. This change in styles informs t...
Universal and Attribute Selectors in CSS
Переглядів 1,7 тис.3 роки тому
► In this video, we are going to look some more at advanced selectors by learning about attribute selectors and the universal selector The universal selector targets every element on the page from the body element down. The attribute selector targets elements based on attributes and values they possess. We can reference an attribute name like href, target, src, for example, or target elements w...
Adjacent and General Sibling Selectors in CSS
Переглядів 2,4 тис.3 роки тому
Adjacent and General Sibling Selectors in CSS
CSS Child and Descendant Selectors
Переглядів 2,7 тис.3 роки тому
CSS Child and Descendant Selectors
CSS Selector Basics - Element, Class, and ID
Переглядів 3,3 тис.3 роки тому
CSS Selector Basics - Element, Class, and ID
CSS Resets and Default Browser Styles
Переглядів 3,5 тис.3 роки тому
CSS Resets and Default Browser Styles
Inline vs Internal vs External CSS
Переглядів 3,1 тис.3 роки тому
Inline vs Internal vs External CSS
Introduction to CSS
Переглядів 2,6 тис.3 роки тому
Introduction to CSS
Project: Build a Landing Page (2/2)
Переглядів 2,2 тис.3 роки тому
Project: Build a Landing Page (2/2)
Project: Build a Landing Page (1/2)
Переглядів 4,9 тис.3 роки тому
Project: Build a Landing Page (1/2)
When to Use Semantic HTML Elements Instead of Divs
Переглядів 39 тис.3 роки тому
When to Use Semantic HTML Elements Instead of Divs
How to Use Classes and IDs Properly
Переглядів 3,4 тис.3 роки тому
How to Use Classes and IDs Properly
How and When to Use Divs and Spans
Переглядів 10 тис.3 роки тому
How and When to Use Divs and Spans
Add Video to Webpages with Video and iFrame Elements
Переглядів 13 тис.3 роки тому
Add Video to Webpages with Video and iFrame Elements
Build an HTML Form From Scratch
Переглядів 1,7 тис.3 роки тому
Build an HTML Form From Scratch
Form Inputs - Checkbox, Radio, and Submit Buttons
Переглядів 2,9 тис.3 роки тому
Form Inputs - Checkbox, Radio, and Submit Buttons
Form Inputs - Text, Email, and Password
Переглядів 2,2 тис.3 роки тому
Form Inputs - Text, Email, and Password

КОМЕНТАРІ

  • @MC_DarkMaster
    @MC_DarkMaster 25 днів тому

    The section tag is not semantic if it doesn't have a aria-labelledby attribute linking to the heading via id

    • @craigabourne
      @craigabourne 25 днів тому

      Mozilla say it is a semantic element: developer.mozilla.org/en-US/docs/Glossary/Semantics#semantic_elements

    • @MC_DarkMaster
      @MC_DarkMaster 25 днів тому

      ​ @craigabourne Yes, but it is always better to read the source: "w3 org WAI ARIA apg practices landmark-regions # htmlsectioningelements" (why am I not allowed to post links?). You can't argue that it is semantic and that helps improving the accessibility if it is not used correctly. Section is a "region when it has an accessible name using aria-labelledby or aria-label" otherwise it is treated exactly the same as a div => meaningless.

    • @craigabourne
      @craigabourne 25 днів тому

      ​@@MC_DarkMaster The video (and playlist) is aimed at complete beginners that are new to web development. Talking about ARIA authoring practices and associated attributes would be completely inappropriate for the context. Ironically, it would make the topic less accessible to newcomers.

    • @MC_DarkMaster
      @MC_DarkMaster 25 днів тому

      @craigabourne Well, I wrote it for other developers so that maybe someone would see it and pick it up so that the web would be more accessible to everyone

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

    I appreciate your help. I watched your previous video as well and I now feel confident with Text and Word wrapping. Thank you. 😊

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

    thank you so much

  • @mahamudmunna5000
    @mahamudmunna5000 3 місяці тому

    how are you doing that? 275 turning into 75 px ? how that is done....hope you reply

  • @josuelopez9098
    @josuelopez9098 5 місяців тому

    Uuuuu

  • @kaseycarr9130
    @kaseycarr9130 5 місяців тому

    Great video, I just subscribed, I'll definitely be checking out the channel for more

  • @mfh3847
    @mfh3847 5 місяців тому

    How about the css property text-wrap? I use text-wrap: balance , it's very helpful to arrange my paragraph nicely. But I think it has limits on number of lines.

  • @user-ze3jx9vw2i
    @user-ze3jx9vw2i 5 місяців тому

    Simply awesome

  • @HappyAzaleaFlower-mr9mt
    @HappyAzaleaFlower-mr9mt 5 місяців тому

    Hg😂🎉😢😅😅

  • @henrythomas7112
    @henrythomas7112 5 місяців тому

    Thank you so much for this video. Super helpful and well-presented. Your time and effort is most appreciated!

  • @user-yz8ir3cl2y
    @user-yz8ir3cl2y 6 місяців тому

    Thanks 😮😮

  • @marc-anthonysenat1008
    @marc-anthonysenat1008 6 місяців тому

    Craig, I created an E-portfolio website to work as an electronic résumé for myself. I'm trying to figure out how to embed a video that plays immediately when people visit the site and the place of my photo and when the video is over, it reverts back to a photo of me. do you know how to do that or can you direct me on how to code that?

  • @chillbro2275
    @chillbro2275 6 місяців тому

    Semantic

  • @chillbro2275
    @chillbro2275 6 місяців тому

    I would not want to be charged with maintaining that gmail code. 😬

  • @marcusnoe
    @marcusnoe 7 місяців тому

    Thanks Craig, good explanation

  • @marcusnoe
    @marcusnoe 7 місяців тому

    Can't describe how much your channel is helping me learn this stuff

    • @craigabourne
      @craigabourne 7 місяців тому

      Good to hear Marcus! DM in on IG or X if you have any web dev struggles

  • @marcusnoe
    @marcusnoe 7 місяців тому

    Commenting for support. Great channel!

  • @TsTheSeason
    @TsTheSeason 7 місяців тому

    Wow, I appreciate this lessons you are the best! God bless you!

  • @marcusnoe
    @marcusnoe 7 місяців тому

    Great series

    • @craigabourne
      @craigabourne 7 місяців тому

      Thanks! Appreciate the kind words!

  • @marcusnoe
    @marcusnoe 7 місяців тому

    Love it

  • @wandafish
    @wandafish 7 місяців тому

    100th like! 👍

  • @hainevidia8753
    @hainevidia8753 7 місяців тому

    bro i was looking for that for too long, it may seem easy but damn I choked so hard to find out. Thank you !

  • @mrfairycake4333
    @mrfairycake4333 7 місяців тому

    Great introduction Craig :)

  • @besjanaelezi
    @besjanaelezi 7 місяців тому

    Better than Udemy courses I've paid actual money for!

  • @leonardreveira
    @leonardreveira 7 місяців тому

    Superb mate 👍

    • @craigabourne
      @craigabourne 7 місяців тому

      Thanks! Really appreciate the kind words ❤️

  • @duhrayyy
    @duhrayyy 7 місяців тому

    Welcome back! I like your way of explaining things, so I was pretty bummed when you didn't update for a fairly long time. Looking forward to your JS teaching (after you're done with CSS, ofc)

  • @DesignCodeToken
    @DesignCodeToken 7 місяців тому

    Big WOO🎉❤😊

  • @jensdan4489
    @jensdan4489 7 місяців тому

    Do we apply the ellipsis direct to the link or to the container?

  • @somnarchaudhary
    @somnarchaudhary 7 місяців тому

    btw the channel is looking great with the new thumbnails 💅

  • @lilahbautista
    @lilahbautista 7 місяців тому

    The best explanations. When is JavaScript happening?

  • @kirillbrehzkov
    @kirillbrehzkov 7 місяців тому

    You're back! 😀

  • @craigabourne
    @craigabourne 7 місяців тому

    Learn CSS: ua-cam.com/play/PL4cTxE4s2XIYwGURywyDlkfmhmRC5FaUR.html

  • @user-cc1sq8kg6l
    @user-cc1sq8kg6l 8 місяців тому

    This tutorial is the most understanding i haver ever watched. very much simplified.

  • @DesignCodeToken
    @DesignCodeToken 8 місяців тому

    Hi Craig, when will you be back?

    • @craigabourne
      @craigabourne 8 місяців тому

      Imminently! Have just restarted so the first new videos will be out at the start of January

    • @DesignCodeToken
      @DesignCodeToken 8 місяців тому

      @@craigabourne Great, exciting. Can wait for 1 year, you content is the king.

  • @CypressLiu
    @CypressLiu 8 місяців тому

    This is very helpful, thank you

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

    thank you :)

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

    Brilliant tutorial with very clearly explained and demonstrated examples, very useful. This is the best tutorial on the subject I have seen and helped me greatly. Many thanks!

  • @webb-developer
    @webb-developer 9 місяців тому

  • @webb-developer
    @webb-developer 9 місяців тому

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

    I fell off for a bit and when I came back I couldn't find my Minim videos.. I started to panic, then realized you just changed to your name and let out a huge sigh of relief. Love your content bro and it's really been helping me learn html. Thank you for making this content, it's greatly appreciated! Finishing the burger webpage, then on to CSS!

  • @webb-developer
    @webb-developer 10 місяців тому

  • @webb-developer
    @webb-developer 11 місяців тому

  • @webb-developer
    @webb-developer Рік тому

  • @webb-developer
    @webb-developer Рік тому

    ☑ remaining : line height and letter and word spacing

  • @webb-developer
    @webb-developer Рік тому

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

    Great video 🙌🏻

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

    You just made my life easier.

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

    Nice can't wait for more