sign in | join about | help | sitemap
Connecting Tech Pros Worldwide
donpro's Avatar

How can I get the outer DIV to stretch horizontally


Question posted by: donpro (Guest) on August 13th, 2008 07:05 PM
Hi,

If you look at my test page on: http://www.program-it.ca/test.html and
look at the source, you'll see both the HTML and CSS code. My
question is as follows:

If I either increase the text size or shrink the window, the inner
DIVS start to wrap below each other. What I really want is the outer
DIV to stretch horizontally and the inner DIVS to remain next to each
other on the same row.

Can this be done?

Thanks,
Don
2 Answers Posted
Chris F.A. Johnson's Avatar
Chris F.A. Johnson August 13th, 2008 11:05 PM
Guest - n/a Posts
#2: Re: How can I get the outer DIV to stretch horizontally

On 2008-08-13, donpro wrote:
Quote:
Originally Posted by
Hi,
>
If you look at my test page on: http://www.program-it.ca/test.html and
look at the source, you'll see both the HTML and CSS code. My
question is as follows:
>
If I either increase the text size or shrink the window, the inner
DIVS start to wrap below each other. What I really want is the outer
DIV to stretch horizontally and the inner DIVS to remain next to each
other on the same row.


I haven't looked at your CSS or HTML in detail, but I would
make two suggestions:

First, fix your code so that it is valid HTML (preferably
4.01 strict) and CSS.

Second, simplify your HTML. You have far too many nested
DIVs.

--
Chris F.A. Johnson <http://cfaj.freeshell.org>
================================================== =================
Author:
Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
Johannes Koch's Avatar
Guest - n/a Posts
#3: Re: How can I get the outer DIV to stretch horizontally

donpro schrieb:
Quote:
Originally Posted by
If you look at my test page on: http://www.program-it.ca/test.html and
look at the source, you'll see both the HTML and CSS code.


I haven't looked at the code at all, but ...
Quote:
Originally Posted by
My
question is as follows:
>
If I either increase the text size or shrink the window, the inner
DIVS start to wrap below each other.


.... I assume you are using the float property. The effect you describe
is how a layout using float behaves.
Quote:
Originally Posted by
What I really want is the outer
DIV to stretch horizontally and the inner DIVS to remain next to each
other on the same row.


Then don't use float. What you want could be done with the CSS table
rendering model. See the corresponding section in the CSS specification.
But AFAIK it's not implemented in any version of IE yet.

--
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)
 
Not the answer you were looking for? Post your question . . .
197,039 members ready to help you find a solution.
Join Bytes.com

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 197,039 network members.
Post your question now . . .
It's fast and it's free

Popular Articles

Top Community Contributors