Can the length of the URL affect the layout?
This is really a weird problem. So we have an existing navigation that goes like this:
<div class="tab">
<a href="URL1/file.php" target="_top">HOME</a>
<a href="URL2/file.php" class="active" target="_top">NAV2</a>
<a href="URL3/file.php" target="_top">NAV3</a>
<a href="URL4/file.php" target="_top">NAV4</a>
<a href="URL5/file.php" target="_top">NAV5</a>
</div>
Thing is once we change the URLs to something longer (开发者_运维百科cause the web address of the live site is longer than the test site), the layout of the header goes awry (the items should be in one horizontal line but when we make the URLs longer, some of the text goes to the next line).
Why is that so? I mean it's not the text on the URL, it's the URL itself which shouldn't affect how things are displayed.
Has anybody encountered this weird problem? Happens on all browsers.
This sounds impossible. The only two ways I can see this happening are:
- you've got some javascript which manipulates the DOM depending on the value of those href=""
- you've got css content property outputing some content based on the value of those href=""
Is it any of those two?
Also, have you tried validating the html source using http://validator.w3.org/?
精彩评论