Minimum Width (CSS)

I have a title (100% width) containing some links. When you resize the browser, links will be displayed below each other when there is not enough space. I know that I can use min-width for this problem, but I don’t know the exact space that the links will use, because they are dynamic. How can I solve this problem?

+4
source share
2 answers

If your code is like this

<div id="links"> <a href="#link">Link</a> <a href="#link">Link</a> <a href="#link">Link</a> </div> 

You can have this CSS:

 #links { white-space: nowrap; } 

This will prevent the wrapping of links to another line.

If your code does not like you should send it with your question.

+3
source

You did not ask a lot of details, but it seems to me that you need something to stop their packaging.

In this case, you can try the following:

 .parentelement { white-space:nowrap; } 

which applies to the container element of the fields that you want to keep in a row.

0
source

All Articles