473,403 Members | 2,284 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

Div positioned under other div

Max
Let's say I've got an outer div container that is 1024 px wide. Now I'd like
to place two divs, each 600px wide, stacked one on top of the other. How is
this done? Or do I need another container around the two 600px divs? No
matter what I've tried to do with alignments/positioning, they always butt
up side-by-side.

Thanks,
Max
Sep 25 '05 #1
2 2274
Max

"Max" <ma*@max.com> wrote in message
news:xu******************@fe03.news.easynews.com.. .
Let's say I've got an outer div container that is 1024 px wide. Now I'd
like to place two divs, each 600px wide, stacked one on top of the other.
How is this done? Or do I need another container around the two 600px
divs? No matter what I've tried to do with alignments/positioning, they
always butt up side-by-side.


Oops, sorry. A simple <br> answered my question.

Thanks.
Sep 25 '05 #2
Els
Max wrote:
Let's say I've got an outer div container that is 1024 px wide. Now I'd like
to place two divs, each 600px wide, stacked one on top of the other. How is
this done? Or do I need another container around the two 600px divs? No
matter what I've tried to do with alignments/positioning, they always butt
up side-by-side.


Set their width to 600px, their right and left margins to auto, and
remove any position: or float: properties from their styles.

Result is two divs, one above the other, centered in your page.
If you want them 'left aligned', set margin-left to 0, and
margin-right to 1024-600=424px. (give or take a few depending on
border widths).

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Now playing: Phyllis Nelson - Move Closer
Sep 25 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Christopher | last post by:
This should be a quick one. URL: http://cfa-www.harvard.edu/~cpilman/Stuff/flush.html Code: ============================= <!DOCTYPE HTML Public "-//W3C//DTD HTML 4.01//EN">...
3
by: David Winter | last post by:
This is probably trivial, but I simply don't get it. I have a "position:absolute" type DIV with another one in it. I want the outer DIV to encompass the inner one. I.e., when the inner DIV...
7
by: Jonas Smithson | last post by:
Hello all, I have an absolute positioned parent div, and nested inside it is an absolute positioned child div -- I mean the div *code* is nested inside, but the child is physically positioned so...
8
by: Asad | last post by:
Hi, I am basically trying to accomplish drop down menus for navigation on a site. And I'm pretty much done except I am having one problem. The z-index is not working with relative positioning! ...
4
by: Philipp Lenssen | last post by:
Is it possible in IE6+NS7 to center-align a div of fixed width which itself contains elements which use "position: absolute"? Using "margin-left: auto" and "margin-right: auto" works well to center...
4
by: Luigi | last post by:
Hi, even if I have read more and more about the argoment (also in the W3C site), I still can't exactly position my boxes on the pages. I would to know what is the EXACT displacement between an...
3
by: Claude Schneegans | last post by:
Hi, The W3C says: "The 'z-index' property is used to specify the stacking order of positionable elements <#Positionable_Elements>." and it defines positionable elements as "Elements whose...
3
by: John A Grandy | last post by:
on my WebForm, Panel1 is positioned absolutely , with settings for Top , Left , Width , Height ... Panel1 contains various sub-panels: PanelA , PanelB , PanelC ... these sub-panels' content...
5
by: felipevaldez | last post by:
how can I put an element below another element, that's not absolutely positioned? so I have a n element, called X, and next to that, an element Y X Y XXXXXX
7
by: Cruelemort | last post by:
All, I have a div in my page that has a set width of 1000px, height of 200px, inside this i declare two more div's, both relatively positioned and floated left, the first is placed to the top...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.