CMS Development

JWharton
Contributor

Weird link text wrapping on mobile

SOLVE

Just using the Rich Text module.

 

Rather than the link text wrapping, it gets put on a separate line, breaking it away from the preceding text.

 

If the link text exceeds the width, it then wraps, but is separated from the following text (which starts on a new line).

 

IMG_962A3B9C0CB8-1.jpeg

 

What do I want? I want the link text to display in line and wrap just like normal text.

 

See example at http://5056899.hs-sites.com/about

 

Thanks in advance!

0 Upvotes
1 Accepted solution
Chris-M
Solution
Contributor

Weird link text wrapping on mobile

SOLVE

Hi @JWharton,

 

your links have:

a {
display: inline-block;
}

Which causes the breaking.

 

It also breaks on body text.

For example:

linkWrapper.PNG

 

If you don't want that at all, change a links to the following:

a {
 display: inline;
}

Or else, create a cusom class on a parent element and use the following code. Which only works for enumerations

.yourCustomClass li a {
 display: inline;
}

- Chris

View solution in original post

2 Replies 2
Chris-M
Solution
Contributor

Weird link text wrapping on mobile

SOLVE

Hi @JWharton,

 

your links have:

a {
display: inline-block;
}

Which causes the breaking.

 

It also breaks on body text.

For example:

linkWrapper.PNG

 

If you don't want that at all, change a links to the following:

a {
 display: inline;
}

Or else, create a cusom class on a parent element and use the following code. Which only works for enumerations

.yourCustomClass li a {
 display: inline;
}

- Chris

JWharton
Contributor

Weird link text wrapping on mobile

SOLVE

That did it. @Chris-M you rock! Thanks.

0 Upvotes