By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,879 Members | 1,809 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,879 IT Pros & Developers. It's quick & easy.

Preventing side-by-side divs from slipping under each other?

P: n/a
I know this is probably a dumb question so please be patient with me. I've
been doing HTML since 1994, but mostly for projects that had to be as
completely compatible as possible and mostly existing projects. So that
meant dealing with the traditional table layouts (i.e. using tables for
the entire structure of a page). I'm just not getting to use DIVs solely
for the layout of a page. The one problem I'm having is that I'm trying to
setup a side-by-side menu/content setup and if the user has a small
monitor or browser window the content slips beneath the sidemenu. Is there
any way to avoid this?

Preston
Jul 20 '05 #1
Share this Question
Share on Google+
9 Replies


P: n/a
"Preston Crawford" <me@REMOVESPAMBLOCKprestoncrawford.com> wrote in message
news:pa****************************@REMOVESPAMBLOC Kprestoncrawford.com...
I know this is probably a dumb question so please be patient with me. I've
been doing HTML since 1994, but mostly for projects that had to be as
completely compatible as possible and mostly existing projects. So that
meant dealing with the traditional table layouts (i.e. using tables for
the entire structure of a page). I'm just not getting to use DIVs solely
for the layout of a page. The one problem I'm having is that I'm trying to
setup a side-by-side menu/content setup and if the user has a small
monitor or browser window the content slips beneath the sidemenu. Is there
any way to avoid this?


Absolute positioning?

Regards,
Peter Foti
Jul 20 '05 #2

P: n/a
On Mon, 09 Feb 2004 14:09:28 -0500, Peter Foti wrote:
"Preston Crawford" <me@REMOVESPAMBLOCKprestoncrawford.com> wrote in message
news:pa****************************@REMOVESPAMBLOC Kprestoncrawford.com...
I know this is probably a dumb question so please be patient with me. I've
been doing HTML since 1994, but mostly for projects that had to be as
completely compatible as possible and mostly existing projects. So that
meant dealing with the traditional table layouts (i.e. using tables for
the entire structure of a page). I'm just not getting to use DIVs solely
for the layout of a page. The one problem I'm having is that I'm trying to
setup a side-by-side menu/content setup and if the user has a small
monitor or browser window the content slips beneath the sidemenu. Is there
any way to avoid this?


Absolute positioning?

Regards,
Peter Foti


Yeah, I thought there was a way to do this and still float them. And I
thought there was a problem with absolute positioning. I just can't
remember what it is anymore. :-)

Too much table layout.

Preston
Jul 20 '05 #3

P: n/a
On Mon, 09 Feb 2004 11:00:21 -0800, Preston Crawford
<me@REMOVESPAMBLOCKprestoncrawford.com> wrote:
I'm just not getting to use DIVs solely
for the layout of a page. The one problem I'm having is that I'm trying to
setup a side-by-side menu/content setup and if the user has a small
monitor or browser window the content slips beneath the sidemenu. Is there
any way to avoid this?


Why do you want to avoid this? It's one of the advantages of CSS.

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/
Jul 20 '05 #4

P: n/a
On Mon, 09 Feb 2004 21:00:10 +0100, Stephen Poley wrote:
On Mon, 09 Feb 2004 11:00:21 -0800, Preston Crawford
<me@REMOVESPAMBLOCKprestoncrawford.com> wrote:
I'm just not getting to use DIVs solely
for the layout of a page. The one problem I'm having is that I'm trying to
setup a side-by-side menu/content setup and if the user has a small
monitor or browser window the content slips beneath the sidemenu. Is there
any way to avoid this?


Why do you want to avoid this? It's one of the advantages of CSS.


I agree. My wife is getting people, though, who have their browser windows
below 800px wide apparently, and they're complaining about content
"disappearing". Ugh. So I have to make it scroll and not slip.

Preston
Jul 20 '05 #5

P: n/a
Els


Preston Crawford wrote:
On Mon, 09 Feb 2004 21:00:10 +0100, Stephen Poley wrote:

On Mon, 09 Feb 2004 11:00:21 -0800, Preston Crawford
<me@REMOVESPAMBLOCKprestoncrawford.com> wrote:

I'm just not getting to use DIVs solely
for the layout of a page. The one problem I'm having is that I'm trying to
setup a side-by-side menu/content setup and if the user has a small
monitor or browser window the content slips beneath the sidemenu. Is there
any way to avoid this?


Why do you want to avoid this? It's one of the advantages of CSS.


I agree. My wife is getting people, though, who have their browser windows
below 800px wide apparently, and they're complaining about content
"disappearing". Ugh. So I have to make it scroll and not slip.


I'd say, that if 'below 800px wide' makes the div slip, you
are having your div too wide :-)
You probably have the menu left, which i don't think would
be as much as 400px wide... So if the right side div doesn't
have a fixed width, it should be able to get very narrow
before slipping under the menu.
Well possible to have both, I think; no scrolling, and no
slipping.

--
Els

Mente humana é como pára-quedas; funciona melhor aberta.

Jul 20 '05 #6

P: n/a
On Mon, 9 Feb 2004, Preston Crawford wrote:
I agree. My wife is getting people, though, who have their browser windows
below 800px wide apparently, and they're complaining about content
"disappearing". Ugh. So I have to make it scroll and not slip.


I would take one of the other options.
Jul 20 '05 #7

P: n/a
On Mon, 09 Feb 2004 14:57:24 -0800, Preston Crawford
<me@REMOVESPAMBLOCKprestoncrawford.com> wrote:
My wife is getting people, though, who have their browser windows
below 800px wide apparently, and they're complaining about content
"disappearing". Ugh. So I have to make it scroll and not slip.


Have you been reading how I've been rolled through the coals? I don't mind
it at all if others learn from my mistakes... but please do!

If people complain about content being off the browser, adding the scroll
bar will apparently be like a bandaid on an axe wound. The more I look at
the new fluid design I implemented on my home page, the more I do agree
it's an improvement. So go with a squishy design that'll stretch to the
viewport size.

Jul 20 '05 #8

P: n/a
Preston Crawford <me@REMOVESPAMBLOCKprestoncrawford.com> wrote in
news:pa****************************@REMOVESPAMBLOC Kprestoncrawford.com:
I agree. My wife is getting people, though, who have their browser
windows below 800px wide apparently, and they're complaining about
content "disappearing". Ugh. So I have to make it scroll and not slip.


I think the problem here is that you're trying to fix the width of both the
menu and the content. I'd either size both in percentages (so that their
widths both scale, in the same proportion, as the viewport is resized), or
fix the size of the menu (in ems, not pixels, so that the width of the menu
adjusts according to the font size but not the viewport width) but not the
content, so that the content gets wider or narrower in relation to the menu
as the viewport is resized.

In the former case, the content won't go below the menu unless the viewport
is too small to accommodate both the longest word in the menu and the
longest word (or widest image) in the content. In the latter case, the
content won't go below the menu unless the viewport is too small to
accommodate both the (fixed) width of the menu and the longest word or
widest image in the content.

You might take a look at what I did on
<http://www.wayneengineering.com/products.php> where I used the former
technique.
Jul 20 '05 #9

P: n/a
On Mon, 09 Feb 2004 14:57:24 -0800, Preston Crawford
<me@REMOVESPAMBLOCKprestoncrawford.com> wrote:
On Mon, 09 Feb 2004 21:00:10 +0100, Stephen Poley wrote:
On Mon, 09 Feb 2004 11:00:21 -0800, Preston Crawford
<me@REMOVESPAMBLOCKprestoncrawford.com> wrote:
I'm just not getting to use DIVs solely
for the layout of a page. The one problem I'm having is that I'm trying to
setup a side-by-side menu/content setup and if the user has a small
monitor or browser window the content slips beneath the sidemenu. Is there
any way to avoid this?


Why do you want to avoid this? It's one of the advantages of CSS.


I agree. My wife is getting people, though, who have their browser windows
below 800px wide apparently, and they're complaining about content
"disappearing". Ugh. So I have to make it scroll and not slip.


If you give us the URL, we might be able to offer some better
suggestions.

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/
Jul 20 '05 #10

This discussion thread is closed

Replies have been disabled for this discussion.