Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 20th, 2005, 11:40 PM
Pamel
Guest
 
Posts: n/a
Default Positioning of DIVs

To start off, I am trying to get a page to do this with divs.
http://commo.de/lotsadivs.png

There is a navigation bar at the top. Then there is a big DIV that contains
three other DIVs that contain text and/or pictures. textdiv1 is dropped from
the top maybe 50 pixels. All of the textdivs are centered and expand to fit the
size of the page. textdiv1 and 2 are of arbitrary height, but textdiv3 is
supposed to be right under whichever drops down further.

Right now I am using things like:

..textdiv1 {
position: absolute;
right: 51%;
top: 280px;
width: 40%;
}

This works fine except for when textdiv3 gets added in. If I set it for an
absolute position then it will overlap if the person increases the font size.

With this problem I can see that I am making a basic design error by using the
absolute positioning, but I was completely inept at getting the DIVs to position
otherwise. If there is a page that is already doing this type of layout that I
could look at I am sure I could figure it out. Or if there is some other
direction I should be taking here... I would appreciate any input.


Paul


  #2  
Old July 20th, 2005, 11:40 PM
Gus Richter
Guest
 
Posts: n/a
Default Re: Positioning of DIVs

Pamel wrote:[color=blue]
> To start off, I am trying to get a page to do this with divs.
> http://commo.de/lotsadivs.png
>
> There is a navigation bar at the top. Then there is a big DIV that contains
> three other DIVs that contain text and/or pictures. textdiv1 is dropped from
> the top maybe 50 pixels. All of the textdivs are centered and expand to fit the
> size of the page. textdiv1 and 2 are of arbitrary height, but textdiv3 is
> supposed to be right under whichever drops down further.
>
> Right now I am using things like:
>
> .textdiv1 {
> position: absolute;
> right: 51%;
> top: 280px;
> width: 40%;
> }
>
> This works fine except for when textdiv3 gets added in. If I set it for an
> absolute position then it will overlap if the person increases the font size.
>
> With this problem I can see that I am making a basic design error by using the
> absolute positioning, but I was completely inept at getting the DIVs to position
> otherwise. If there is a page that is already doing this type of layout that I
> could look at I am sure I could figure it out. Or if there is some other
> direction I should be taking here... I would appreciate any input.
>
>
> Paul
>[/color]

Perhaps this will help:
http://www.sitepoint.com/article/1213

--
Gus
  #3  
Old July 20th, 2005, 11:40 PM
Pamel
Guest
 
Posts: n/a
Default Re: Positioning of DIVs

"Gus Richter" wrote...[color=blue]
> Pamel wrote:[color=green]
> > If there is a page that is already doing this type of layout that I
> > could look at I am sure I could figure it out. Or if there is some other
> > direction I should be taking here... I would appreciate any input.[/color]
>
> Perhaps this will help:
> http://www.sitepoint.com/article/1213
>[/color]
Muchos Gracias! That got me started on the right path. I changed them to
floats like Egon Pasztor did and it seemed to work. (Had to fiddle with getting
settings that looked the same in IE and FireFox, but it seems good.


Paul


 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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 network members.
Post your question now . . .
It's fast and it's free

Popular Articles