开发者

Why my layout is screwed ? (2) [duplicate]

This question already has an answer here: Closed 12 years ago.

Possible Duplicate:

Why my layout / css is screwed ?

Ok, fixing the error reported by W3C did not fixed the broken layout.

the page where the css is 'broken' : messy layout

the same page, but with a another text in it shows the result as excepted : good layout

If with your lynx 开发者_开发问答eye you spot the error, thank you in advance ;)


.logoteam has a width of 20%.

the 20% is derived from the width of .bloc-level, its parent element.

  • puls page has a width of 695 px. 20% of 695 = 139px
  • jango has a width of 421 px. 20% of = 81px

So to work around this you can

  • a) set a width of 695px on .float1 so 20% of 695px is always 139px
  • b) set a width on span.logoteam to be 139px


Set a width on the span surrounding the the image.

<span class="floatl logoteam" style="width: 130px;">
                    <img height="100" width="100" class="border_white" alt="general.jpg" src="/uploads/logo_player/general.jpg">
                </span>


If you fix the width of the "presentation" class you will be fine as well. It looks like the design establishes a fixed width for this regardless, so it might be a good thing to enforce it on the CSS. It'll let you align the centered "Do you want to know :" section with the "reveal this offer" button too.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜