If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Variable width div to fill available space without wrapping

Hi,

I have a container div with 2 child elements (a <b> tag and a <p> tag). The container width is 100%, the <b> tag width is unknown as is the <p> tag. I have floated both child elements to the left but when the <p> tag overflows the entire <p> tag is placed underneath the <b> tag. How can I get it to always display on the same line?

Note: this works and appears correctly in Internet Explorer. The issue is only present in Firefox.

I have coded the page to work in such a way that if the text overflows, it scrolls into view on hover.

dont force your self too much nor javascript... Take the time to learn Jquery you will thank me after you under stand it. You will be able to this a lot smoother and easier with Jquery... dont reinvent the will... dont bother debugging this.

Thank you for the advice. I am researching how to implement a jquery solution at the moment. I generally prefer to make my own functions so that I can achieve exactly what I want with the minimal code but if you're confident that jquery can help me achieve what I want, then I am prepared to give it a bash.

Having played with jQuery, I agree that it is the better method for implementing a marquee. However, it wont help with the original issue which is that I have 2 text elements inside a container and need the one on the right to fill any available space left by the left element without wrapping onto a new line. I am hiding the overflow from the right text element which is a marquee and shall scroll on mouseover.

I dont know why you need it this... This text is not readable at all. I made a example for you, is alot smother a cleaner but still hard to read, check it out and tell me if that is what you want. Example