tags:

views:

251

answers:

4

I want the following code to display only 1 line of text. How can I get rid of the break between the span and the ul?

<div id="twitter_div">
<span class="talenthouse">@twittername: </span>
 <ul id="twitter_update_list">

 </ul>
</div>

With the following CSS:

*{
 margin: 0;
 padding: 0;
}

#twitter_div{
 font-family:"lucida grande",tahoma,arial,sans-serif;
 color: #999999;
 font-size: 71%;
 background: url(images/twitter_bg.gif) top left no-repeat;
 width: 965px;
 height: 48px;
 overflow: auto;
 padding: 15px 0 0 85px;
}

.talenthouse{
 font-family: "Helvetica Neue", "lucida grande",tahoma,arial,sans-serif;
 color: #80c242;
 font-weight: bold;
 font-size: 135%;
 display: inline;

}

ul#twitter_update_list{
 list-style: none;
 width: 780px;
 height: 15px;
 display: inline;
}
A: 

I believe this should work:

#twitter_div span { float: left; }
#twitter_update_list { float: left; margin: 0; }

EDIT: I just added the margin: 0 which brings the list up to the same level as the span.

Steve Wortham
She wants everything to display on one line. margin and float are not going to help with that.
ithcy
Does she want the list items on the same line? That's what everyone else assumed. But I'm not so sure since she didn't include list items in the markup.
Steve Wortham
+2  A: 

Try this CSS.

<style type="text/css">
    ul, li, ol{display:inline}
</style>
Robin Hood
A: 

Try to use a reset sheet to remove all paddings/margins from the elements. Google for 'eric meyer reset sheet'.

Then put the list an the content to display:inline;

Tammo
A: 

Short answer: put this in your CSS.

ul#twitter_update_list, ul#twitter_update_list li { display: inline; }
ithcy