|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Page layout with multiple divs
I am trying to learn page creation as I go and have been hand coding most of it. I've used dreamweaver some during the process but it seems faster to just code as you go. My problem is with div tags and how to use them properly. I have a page with a header and below that a content box and directly to the right of it a navigation box. problem is the nav box doesn't want to go where i want it. Following is my html and css:
Code:
<div id="top_image"><img src="Images/TopImage1.gif" alt="top_image" width="650" height="108" />
</div>
<div id="main_content"><h1>Lorem ipsum</h1><p>dolor sit amet........</p>
</div>
<div id="navigation">
<ul>
<li><a href="this.html">This</a></li>
<li><a href="that.html">That</a></li>
<li><a href="theOther.html">The Other</a></li>
</ul>
</div>
CSS: Code:
#top_image {
position: absolute;
top: 0%;
width: 650px;
height: 108px;
border-right-color: #CCCCCC;
border-right-style: solid;
border-right-width: 5px;
border-left-color: #CCCCCC;
border-left-style: solid;
border-left-width: 5px;
border-bottom-color: #cccccc;
border-bottom-width: 5px;
border-bottom-style: solid;
left: 20%;
}
#main_content {
position: absolute;
top: 113px;
height: 325px;
width: 450px;
border-right-color: #CCCCCC;
border-right-style: solid;
border-right-width: 5px;
border-left-color: #CCCCCC;
border-left-style: solid;
border-left-width: 5px;
border-bottom-color: #cccccc;
border-bottom-style: solid;
border-bottom-width: 5px;
background-image: url(Images/PageBackground2.gif);
left: 20%;
}
#navigation {
position: relative;
top: 113px;
right: 650px;
width: 195px;
height: 325px;
border-right-color: #CCCCCC;
border-right-style: solid;
border-right-width: 5px;
border-left-color: #CCCCCC;
border-left-style: solid;
border-left-width: 5px;
}
If anyone can give me some pointers or direct me to some good websites that explain this, I'd appreciate it. I tried w3c tutorials and others but they don't get in to multiple divs that I have found. Thanks!! Last edited by edwinbrains : October 21st, 2004 at 11:32 AM. |
|
#2
|
||||
|
||||
|
Quote:
www.bluerobot.com type css tutorials in google ![]() |
|
#3
|
|||
|
|||
|
Quote:
Thanks for the URL. I've been searching google and others quite a bit and haven't had a lot of luck. I did find some things late lastnight that helped. Thanks again. |
|
#4
|
||||
|
||||
|
I haven't tested your code, but maybe you need to make the nav bar position:absolute too....(?)
|
|
#5
|
||||
|
||||
|
I've edited your post to include [ code ] tags. It just makes the code easier to read.
|
|
#6
|
|||
|
|||
|
Quote:
Ah, thank you. I'll do that in the future. |
|
#7
|
|||
|
|||
|
maybe if you let the navigation bar float right it will help?
float:right; width:200px; etc. You must set the margin for the content then on margin-left:210px; so it won't be under or over the navigation bar. In the html the navigation comes first to the content I believe..I hope this will do the trick...I haven't looked that well at your coding... It worked out well for me!! |
![]() |
| Viewing: Dev Shed Forums > Web Design > Web Design Help > Page layout with multiple divs |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|