expandable CSS style?

w1z4rd

Karmic Sangoma
Joined
Jan 17, 2005
Messages
52,146
Reaction score
8,340
Location
127.0.0.1
I have this css style with something im working with:

Code:
.rss-box {
margin: 1em;
width: 250px;
height: 420px;
background-color: #FFFFFF;
border: 1px solid darkgrey;

Im using that as the box to display some rss feeds. How can I set the height to be change as per the text inside it? As some RSS feeds have less topics than others, and I need the box to wrap around text basicaly
 
Last edited:
try using position to place the box where you want it and dnt specify a height it will aadjust to what you put in.

Code:
 position:absolute;
 top:200px;
 right:0;
 width:250px;
 margin: 1em;

That will place it 200 pix from the top of the on the right had side of the page.
 
i personaly would use % instead of px then at least it should work more or less on other resolutions
 
Code:
.rss-box {
margin: 1em;
width: 250px;
height: auto;
background-color: #FFFFFF;
border: 1px solid darkgrey;
 
happy_noodle_boy said:
Code:
.rss-box {
margin: 1em;
width: 250px;
height: auto;
background-color: #FFFFFF;
border: 1px solid darkgrey;


Thanks, that worked.
 
Top
Sign up to the MyBroadband newsletter
X