You are here: Liquid widths « HTML « IT news, forums, messages
Liquid widths

Posted by Yehuda Katz on 11/16/71 11:39

I need a way to have the width of a div automatically equal the inner
content.

My HTML:

<div class="botstrip" id="aboutstrip" style="display: none;">
<a href="#">About 1</a><p>|</p><a href="#">About 2</a><p>|</p><a
href="#">About 3</a></div>

My CSS:

div#pagewrapper div.botstrip a {
padding-left: 10px;
padding-right: 5px;
color: #091A86;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
font-weight: normal;
text-decoration: none;
}

div#pagewrapper div.botstrip p {
padding: 0;
margin: 0;
display: inline;
}

I set the display: none because I will unhide it later.

In Firefox, it works perfectly, and the <div> is only as wide as the
containing elements. In Internet Explorer, the <div> expands to the
width of the container.When I try to set width: 0px, which would
normally work, it breaks up the containing elements onto separate
lines.

Thoughts?

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация