开发者

Strange behavior of html

开发者 https://www.devze.com 2023-04-06 13:54 出处:网络
I don\'t know why but when i have html i this order: <!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"

I don't know why but when i have html i this order:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

    <div id="header" style="width: 1020px; height: 50px; vertical-align: sub; margin: 0 auto; text-align: left; background-color: white;">    
        {% if user.is_authenticated %}
            <span><a class="header_urls"  href="{{ URL }}/accounts/profile/">Profile</a>&nbsp;&nbsp;&nbsp;</span>
            <span style="float: left; color: blue; vertical-align: sub开发者_Go百科"><a class="header_urls" href="{{ URL }}/blog/">Blog</a>&nbsp;&nbsp;&nbsp;</span>
            <span style="float: left; color: blue; vertical-align: sub"><a class="header_urls" href="{{ URL }}/gallery/newest/1">Something</a>&nbsp;&nbsp;&nbsp;</span>

        {% endif %}
    </div>
</html>

Outpu is: Blog, Somthing, Profile. and in chrome code spectrator code is in this order, it display this things in other order. Why could it be?


If the items are in different order you probably have float: right on them

0

精彩评论

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

关注公众号