Jump to content
  • 0

Расчет ширины блока в IE после float и его перенос


voyager
 Share

Question

Собственно, все, чего бы мне хотелось - это заставить IE отображать данный пример так же как это делают другие браузеры. Т.е., чтобы зеленый блок со ссылкой не уезжал под красный блок с float...

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<body>
<div style="width:300px; border:1px solid black;">
<div style="float:left; background: #f00; width:100px; height:100px; "></div>
<a href="" style="display:block; width:300px; background: #0f0;">TODO write content</a>
</div>
</body>
</html>

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Назначь зелёному блоку тоже "float:left"

поспешил

- Хотя в принципе всё верно Назначь зелёному блоку тоже "float:left", и ЕЩЁ КОЕ-ЧТО: ты хочешь поместить 400px хапихать в блок шириной 300px!!! ИСПРАВЬ!

Edited by PanSoul
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy