From the course: CSS: Advanced Typographic Techniques

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Using generated content

Using generated content - jQuery Tutorial

From the course: CSS: Advanced Typographic Techniques

Start my 1-month free trial

Using generated content

While I would love to be able to take a single word and split it in half as I mentioned earlier the truth is that CSS just doesn't let us do that. So we're going to have to have two copies of the work, we're going to clip them so they each appear as like the top and the bottom half. And then we're going to join them together. Now rather than adding additional markup to our HTML, we want to keep it as simple poss, as possible. We're going to use generated content to add the second copy of the word. So here I have the submerge.htm file open in the 04_03 directory. As you can see, it's kind of the same thing we had before. Not a whole lot going on within the CSS right now. We have some defined widths happening in the section and the the text file itself. Or, or the text div tag I should say. But not a whole lot else going on. Okay. So at the very bottom of this, I'm going to go ahead and create a new selector and I'm going to target that empty div tag with the class of top. So I'm going…

Contents