1

^^can use correct answer from the other post with just some changes to the css.^^

How to get the hover effect on a single line without breaking up the content.

I need to create a easy to read design for children and was thinking that underlining a row of text on hover would work well but the site has to be responsive so I don't know what the width the p will have.

I need a way to select a single line, one line at a time to add the hover to without breaking up the text into set a width with each line reaped in a span

crffty
  • 424
  • 1
  • 5
  • 16
  • 1
    How is hover going to work on a touch-dependent device? – Andy Nov 30 '17 at 20:06
  • 3
    I think you're asking how to get the hover effect on a single line *without* breaking up the content into separate spans for each line, is that correct? If so you probably want to rewrite the question to make that clearer, or you're going to get a lot of answers missing the point. – Daniel Beck Nov 30 '17 at 20:09
  • I'll append to the end of each line a button when its tapped the line will underline, this has the same problem as my question though that I don't know the width of the text. – crffty Nov 30 '17 at 20:14
  • 2
    I think you're much better off thinking in terms of concrete sentences rather than lines. If you're teaching kids with this complete sentences make much more sense than a sentence broken up onto separate lines. – Andy Nov 30 '17 at 20:16
  • The browser doesn't tell you about how inline content is actually laid out in the rendered HTML. – Pointy Nov 30 '17 at 20:16
  • Andy - yeah i think that might be a good idea, i could just have the sentence tap or hover to underline. My main thinking was with students with learning disabilities who find following a line of text tricky but highlighting a sentence would also help to minimize that problem. – crffty Nov 30 '17 at 20:24

0 Answers0