Jump to content
  • 0

Ширина для линейных элементов


AltCtrlDel
 Share

Question

Доброго времени суток всем!

Мне нужно получить нечто вроде таблицы

8c90bf60bf23t.jpg

Но, если строки не будут влезать в окно по горизонтали, то они толжны переносится, вот так

bf2a202a9543t.jpg

Но так получается только на IE, и только без !DOCTYPE. В противном случае ширина не учитывается. Для примера привожу скриншот из оперы.

4e72311f6764t.jpg

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251" />
<style type="text/css">
p {
border-bottom: 1px solid #333333;
}
SPAN{
margin: 3px 8px 0 0;
white-space:nowrap;
width:120px;
}
</style>
</head>
<body>
<P><SPAN>A=1702.573</SPAN><SPAN>B=40.005</SPAN><SPAN>С=6.328</SPAN><SPAN>D=7890.2378</SPAN><SPAN>E=87724.739</SPAN></P>
<P><SPAN>A=2.573</SPAN><SPAN>B=34740.005</SPAN><SPAN>С=6796.328</SPAN><SPAN>D=90.2378</SPAN><SPAN>E=4.739</SPAN></P>
<P><SPAN>A=17.573</SPAN><SPAN>B=4560.005</SPAN><SPAN>С=634.328</SPAN><SPAN>D=17890.2378</SPAN><SPAN>E=2.739</SPAN></P>
</body>
</html>

"таблица" большая, указывать ширину в каждом элементе не желательно. Хотелось бы через CSS.

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

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