...

View Full Version : usual way to align divs?



cyborg360
12-31-2009, 03:32 AM
moving away from tables... to get divs when you want them do you typically just use a bunch of <br />'s and &nbsp;'s and/or other empty div's...or maybe by just applying {position: absolute; top: Xpx; right: Ypx; }? link to a page explaining the best strategy?

tomws
12-31-2009, 04:09 AM
No, that's not how to do it. A simple source view on well-designed sites would tell you that much. There are some free template sites around. Download some and see how they do it.

One is http://www.oswd.org/, but it's being a bit slow for me at the moment.

cyborg360
12-31-2009, 04:28 AM
haven't been able to load that aforementioned site...been trying over 15 minutes.

abduraooft
12-31-2009, 09:28 AM
moving away from tables... to get divs when you want them do you typically just use a bunch of <br />'s and &nbsp;'s and/or other empty div's...or maybe by just applying {position: absolute; top: Xpx; right: Ypx; }? link to a page explaining the best strategy?
What type of layout you have in mind?

cyborg360
12-31-2009, 09:31 AM
What type of layout you have in mind?

just want to have the freedom to place divs anywhere. For example, I

might
....like
......to
.......place
.........them
............like
..............this.

(omit periods)

abduraooft
12-31-2009, 09:40 AM
just want to have the freedom to place divs anywhere. For example, I

might
....like
......to
.......place
.........them
............like
..............this.

(omit periods)Umm.. then absolute position will be the best choice. But, you need to take care of overlapping of elements/texts when the user use the zoom option from their browser.

Daybreak0
12-31-2009, 10:50 AM
just want to have the freedom to place divs anywhere. For example, I

might
....like
......to
.......place
.........them
............like
..............this.

(omit periods)
or a
margin-left: 0px
....margin-left: 20px
etc

Which leaves the divs free to move if content is larger or zoomed

cyborg360
01-06-2010, 06:54 AM
thanks for the replies.

I'm still trying to resolve a simple issue.

I see now how to cascade divs with the margin-left: ??px like I was trying to do earlier.

But, can you place a div directly to the right of another div without floating left the first div or placing both divs within one master div? :confused:

abduraooft
01-06-2010, 08:07 AM
But, can you place a div directly to the right of another div without floating left the first div or placing both divs within one master div? A float or absolute position will b e required to effectively place two divs/"block level elements" side by side.

cyborg360
01-06-2010, 08:20 AM
A float or absolute position will b e required to effectively place two divs/"block level elements" side by side.


thanks for clearing that up.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum