3 replies [Last post]
bubs
Offline
Regular
Last seen: 14 years 48 weeks ago
Timezone: GMT-5
Joined: 2006-05-22
Posts: 15
Points: 0

ok I feel dumb asking this BUT... How do I make a list and a paragraph display side by side?

here is the code that I tried so far. this is only the most recent attempt at it and I've tried many other things.

my site


.body {
display:inline;
}
#wrapper {
margin:auto;
width:400px;
}
#menu {
left:-2.4em;
list-style-type:none;
margin:10px;

}
#text {

}





my site






Some text to fill up the page. ha ha. la la. text





I would like to keep it as a list. but if there is another way to get the items to stack without using the break tag I'll try it.

but what I want is to display the list. then on the same line as the start on the list "home" I want the paragraph to start. I also don't want to make it another column because when the text gets below the list I want it to wrap underneath the list and span the entire 400px

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 7 years 2 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

Take the ul out of the

Take the ul out of the paragraph placing it before the paragraph in the html flow then apply float left to it and a width, the paragraph then will extend behind it with the text shifted away from the float right edge, if and when the text exceeds the height of the floated element it will wrap below it and to the extreme left edge of the two elements parent.

Hugo.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

bubs
Offline
Regular
Last seen: 14 years 48 weeks ago
Timezone: GMT-5
Joined: 2006-05-22
Posts: 15
Points: 0

Aww

WOW... I was so close in an earlier attempt but all I needed was the width attribute. DAMN

thanks Hugo

thepineapplehead
thepineapplehead's picture
Offline
Guru
Last seen: 1 week 22 hours ago
Joined: 2004-06-30
Posts: 9679
Points: 815

Don't forget the doctype!

Don't forget the doctype!

Verschwindende wrote:
  • CSS doesn't make pies