This is a discussion on "css div" within the Web Page Design section. This forum, and the thread "css div are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
css div
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
css div
Hello,
I am new at css, however I am trying very hard to learn. It is a great tool! My navigation is a div id and my center paragraph is a div id. I would like to place my navigation on the left side of my screen margin-top: 10px; and place my center paragraph on the right side of the screen margin-top: 10px; However it is not letting me do it. How do I place both div id's equal height? Thank you Faygirl Last edited by faygirl; May 15th, 2006 at 18:54. |
|
|
|
#2
|
|||
|
|||
|
Re: css div
Unless I'm misunderstanding what you're trying to do, you should just be able to float both <div>s - one to the left, and one to the right.
For the nav div, e.g.:
|
|
#3
|
|||
|
|||
|
Re: css div
If you want to keep the width fluid, just float the left navigation. Then give the right-hand div a margin-left slightly larger that the width of the navigation without specifiying a width and it should just move up into whatever space there is.
Assuming nav has width of 150px and has top margin of 10px, then code style for right-hand div would be something like; div#right { margin: 10px 0 0 160px; } Leaves 10px gap between navigation and right-hand div. Edited left value of margin, had it at 130 and meant it to be 160. Last edited by ukgeoff; May 16th, 2006 at 09:39. |
|
#4
|
|||
|
|||
|
Re: css div
Thank you so much. I started to use float, however I thought it was for images with wrap around text.
Faygirl |
![]() |
| Tags |
| css, div |
| Thread Tools | |
|
|