Streaming live at 10am (PST)

Link block has a max-width of 100%


#1

A link block gets the class w-inline-block, which has both display:inline and max-width:100%. While the former can be overridden by setting a class and making it block, the latter cannot. In other words, the max-width property cannot be reset. Setting max-width to "none" does not seem possible.

Is there a valid reason for the the link block having a max-width?

Proposed solutions:

  1. Allow setting max-width value to "none" (would not break anything and should be possible anyways)
  2. Remove the max-width property from the class "w-inline-block"
  3. Do not apply the class w-inline-block to link blocks.

Would appreciate your comments @webflow


#2

"Setting max-width to "none" does not seem possible."

What about setting it to Auto?


#3

Good point @vincent, hadn't tried that one. Unfortunately, no help. Setting it to "auto" (or "Auto" for that matter) works exactly like setting it to "none"; first it seems to stick (although the capital letters change to normal) but in the export, nothing changes. Auto/none value remains in the ui until a change in selection, after which it is set to blank. I suppose max-X controls do not accept auto/none but whether they should, I don't know.


#4

Why do you need the link block to have a different max-width?

Nest your link block in a div and by sizing this div you're sizing the link block anyway.

HTML CSS does suffer from nesting, and it's often vain to try to find solution to make things work with a given structure, when you can easily solve most of the issues by altering the structure to begin with.


#5

It's not that I cannot devise a workaround, but rather that I don't understand why should the link block have different kind of defaults than any other so called "block". I don't see this issue arising from html/css, as anchors do not have max-width set to 100% unless I'm mistaken. Here, the issue is due to the class "w-inline-block" class, applied to link blocks.

Anyways, I don't feel understanding coming my way as @webflow does not seem to be listening.

Thanks a bunch @vincent, you're doing a good job here!


#6

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.