April 1, 201214 yr Hello together, I have no idea what the heck goes wrong. I put a "read more" button inside a text. Wishing to float right so thats at the end of the text but also inside it. After I puting the floating element inside it, i see a problem with the last line. The height seems to be 2-4px heigher than the rest. Maybe someone here can solve it. CSS: .mehr { float:right; font-family: 'Homenaje', sans-serif; /* google @fontface */ font-size: 16px; padding:5px; font-weight:400; background:#000000; color:#FFFFFF; display:inline; /* text an bg anpassung */ } html: <p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diamdolore magna aliquyam et dolore magna aliquyame sed diam nonumy eirmod tempor<div class="mehr">mehr lesen</div> labore et dolore magna aliquyam</p> Edited April 1, 201214 yr by .dark .negativ .antisocial
April 1, 201214 yr The problem isn't with the code in your post. Look at the parent elements. Did you set a line-height? Is it in pixels or ems?
April 2, 201214 yr Author The problem isn't with the code in your post. Look at the parent elements. Did you set a line-height? Is it in pixels or ems? Thanks for your thoughts. The problem was with the paragraph <p> and you´re right. Set-up of lineheight in <p> and the floating div didn´t match. Seriously I went crazy and then it was just that silly <p> :-D
Create an account or sign in to comment