Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-21-2005, 11:03 PM   PM User | #1
ascend
New Coder

 
Join Date: May 2004
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
ascend is an unknown quantity at this point
Simple CSS Prob - Setting Cloumns inside DIV

I'm just entering the realm of CSS layout -- getting away from tables, and I'm trying to accomplish a pretty simple layout technique. Basically I've created a box with a grey background with an id of this code:

Code:
#info {
	background-color: #BFBFBF;
	height: 180px;
	width: 764px;
	margin-top: 10px;
}
Then, I want to put one column of one Image (a section head ), then right under that, another image (a project title head) -- both of which are identical width, and their heights add up to the height of the box mentioned above. This is the CSS for that section:

Code:
#sectionhead {
	position: relative;
	left: 20px;
	top: 0px;
	margin: 0px;
	padding: 0px;
	height: 180px;
	width: 248px;
}
Then, within the same box, I want a sized text box 74px to the right of the images and 402px x 121px, again here's the CSS:

Code:
#textcontent {
	position:relative;
	left: 342px;
	top: 49px;
	width: 402px;
	height: 121px;
}
And here's how I've organized the DIV tages:

Code:
<div align="left" id="info">
		<div align="left" id="sectionhead">
		<img src="images/section_about.gif" width="248" height="49" /><br />
		<img src="images/title_project_placehold.gif" width="248" height="131" /></div>
		<div id="textcontent"><p>Lorem ipsum sit dolor amet... </p></div>
	</div>
I've nested both the column tags inside the box tag, so I assumed it would position everything relative to that, but that hasn't been the case. The 'sectionhead' positions fine, but then the 'textcontent' seems to position relative to the 'sectionhead'. So I guess my question is, what's the best way to organize this correctly? If I can in the right direction, should I just use a negative number to position the top part of the textcontent? Thanks for any help and here's a link to it's display in a browser...

http://www.ascendvisual.com/fromdavy...layout_css.php
ascend is offline   Reply With Quote
Old 05-22-2005, 12:54 AM   PM User | #2
_Aerospace_Eng_
Supreme Master coder!


 
_Aerospace_Eng_'s Avatar
 
Join Date: Dec 2004
Location: In a place far, far away...
Posts: 19,292
Thanks: 2
Thanked 1,044 Times in 1,020 Posts
_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light
Can you like draw a picture of you what you want? Even just a rough sketch, like in mspaint will be fine? With the picture, I can probably work something up that you can use. I am a visual learner.
_Aerospace_Eng_ is offline   Reply With Quote
Old 05-22-2005, 02:58 AM   PM User | #3
ascend
New Coder

 
Join Date: May 2004
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
ascend is an unknown quantity at this point
Hey, thanks for your response. I've attached a GIF of the layout of the site. Hopefully this will help, thanks again...
Attached Thumbnails
Click image for larger version

Name:	fromdavy_screenshot.gif
Views:	154
Size:	17.2 KB
ID:	3445  
ascend is offline   Reply With Quote
Old 05-22-2005, 04:14 AM   PM User | #4
_Aerospace_Eng_
Supreme Master coder!


 
_Aerospace_Eng_'s Avatar
 
Join Date: Dec 2004
Location: In a place far, far away...
Posts: 19,292
Thanks: 2
Thanked 1,044 Times in 1,020 Posts
_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light
Here you go, I think you should be able to work with this. You might only have to use one image. I used absolute urls to your images on your server. They all line up now like they should.

Last edited by _Aerospace_Eng_; 05-22-2005 at 04:33 AM..
_Aerospace_Eng_ is offline   Reply With Quote
Old 05-22-2005, 04:32 AM   PM User | #5
ascend
New Coder

 
Join Date: May 2004
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
ascend is an unknown quantity at this point
Wow, thanks a lot! I appreciate this so much, I should be able to adapt it perfectly! Thanks again...
ascend is offline   Reply With Quote
Old 05-22-2005, 04:34 AM   PM User | #6
_Aerospace_Eng_
Supreme Master coder!


 
_Aerospace_Eng_'s Avatar
 
Join Date: Dec 2004
Location: In a place far, far away...
Posts: 19,292
Thanks: 2
Thanked 1,044 Times in 1,020 Posts
_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light
Down load the newer one, it has your images lined up as well.
_Aerospace_Eng_ is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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 On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:41 AM.


Advertisement
Log in to turn off these ads.