开发者

Preferential break on float attribute

开发者 https://www.devze.com 2023-03-09 16:37 出处:网络
I\'m working on a project, and I need know how I can force breakline, giving preference to a float:right element.

I'm working on a project, and I need know how I can force breakline, giving preference to a float:right element.

See this picture:

Preferential break on float attribute

There are some CSS attribute that I can use to work开发者_StackOverflow中文版 with this case? I have tried clear: left, but nothing.

Code: jsFiddle

Out of script: what you think that have a better visual? :p


The easiest way is to move your element with float: right to before your other elements:

See: http://jsfiddle.net/G9UAR/1/

<div class="message">
    <ul>
        <li><a href="./User/options/Language">Alterar preferências de idioma</a></li>
        <li><a href="./User/options/Language">Alterar preferências de idioma</a></li>
    </ul>
    <strong>Informação:</strong>
    <span>A página não está disponível em seu idioma. O inglês está sendo usado.</span>
    <br />
</div>

It is (probably) possible to do without switching around the HTML, but that answer would be a lot more complicated.

0

精彩评论

暂无评论...
验证码 换一张
取 消