CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignCSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old April 7th, 2004, 05:32 AM
agmogg agmogg is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Posts: 202 agmogg User rank is Lance Corporal (50 - 100 Reputation Level)agmogg User rank is Lance Corporal (50 - 100 Reputation Level)agmogg User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Day 4 h 16 m 6 sec
Reputation Power: 6
Send a message via AIM to agmogg
CSS columns....please help

Hi

I am new to css and am trying to use the following code to make a page.

i cant seem to position the content on the right of the left nav. i want it so that the content div resizes and stays in the same position when the browser is resized but the leftnav stays in the same position and doesnt re size....any help would be appreciated.

third.css

body { /*sets properties for the body of the document*/
background-color:#ffffff;
margin:0px 0px 0px 0px;
}
#container {

margin-top: 50px;
margin-left: 50px;
margin-right: 50px;
margin-bottom: 50px;
padding: 0px;
background-color: orange;
width: 80%;
min-width: 181px;
}
#footer {
padding: 0px;
position: relative;
padding: 0px;
background-color: yellow;
width: 100%;
}

#content {
left:200px;
width:100%;
background-color: red;

}

#leftnav { /*sets properties for the left nav bar*/

background-color : #66ccff;

width: 180px;


}

third.html

<div id="container"> container
<div id="leftnav">left nav</div>

<div id="content">content content content content content content content content
content content content content content content content content content content
</div>
<div id="footer">footer</div>
</div>

Reply With Quote
  #2  
Old April 7th, 2004, 05:49 AM
Akh's Avatar
Akh Akh is offline
|<.+#f@#+.&.|
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Mar 2002
Location: norway
Posts: 2,685 Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level) 
Time spent in forums: 4 Weeks 6 h 6 m 4 sec
Reputation Power: 594
try this

Code:

#content {
	margin-left:180px;
	background-color: red;
}

#leftnav { /*sets properties for the left nav bar*/
	float:left;
	background-color : #66ccff;
	width: 180px;
}


Reply With Quote
  #3  
Old April 7th, 2004, 06:07 AM
agmogg agmogg is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Posts: 202 agmogg User rank is Lance Corporal (50 - 100 Reputation Level)agmogg User rank is Lance Corporal (50 - 100 Reputation Level)agmogg User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Day 4 h 16 m 6 sec
Reputation Power: 6
Send a message via AIM to agmogg
thanks that seems to work fine

Cheers
Andy

Reply With Quote
  #4  
Old April 7th, 2004, 06:16 AM
agmogg agmogg is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Posts: 202 agmogg User rank is Lance Corporal (50 - 100 Reputation Level)agmogg User rank is Lance Corporal (50 - 100 Reputation Level)agmogg User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Day 4 h 16 m 6 sec
Reputation Power: 6
Send a message via AIM to agmogg
actually when i resize it content sticks out of the end of the container, is there a way to stop this, footer stays the same as container all the time.


i have tried setting content to 100% - #leftnav which seems to work fine but i dont know if this is suitable or not...will it work all the time and in most browsers?

cheers
Andy

Last edited by agmogg : April 7th, 2004 at 06:32 AM.

Reply With Quote
  #5  
Old April 7th, 2004, 07:39 AM
Akh's Avatar
Akh Akh is offline
|<.+#f@#+.&.|
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Mar 2002
Location: norway
Posts: 2,685 Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level)Akh User rank is Colonel (50000 - 60000 Reputation Level) 
Time spent in forums: 4 Weeks 6 h 6 m 4 sec
Reputation Power: 594
not sure what you mean,

in which browser did this occure?

have tested this in mozilla, msie, opera and konqueror looked the a like in all of them.

there shouldn't be any need to specify the width for content as a block-level element it gets width 100% as default,

Reply With Quote
  #6  
Old April 7th, 2004, 09:42 AM
agmogg agmogg is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Posts: 202 agmogg User rank is Lance Corporal (50 - 100 Reputation Level)agmogg User rank is Lance Corporal (50 - 100 Reputation Level)agmogg User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Day 4 h 16 m 6 sec
Reputation Power: 6
Send a message via AIM to agmogg
i have fixed that now but i am having problems with the footer, i want to stick it to the bottom of the container but so it doest go over the left nav when resized .. if you run the code you will see what is happening.

any suggestions would be most apreciated.

css

body { /*sets properties for the body of the document*/
background-color:#ffffff;
margin:0px 0px 0px 0px;
}
#container {
margin-top: 50px;
margin-left: 50px;
margin-right: 50px;
margin-bottom: 50px;
padding: 0px;
background-color: #66ccff;
width: 80%;
min-width: 241px;
height:100% -#footer;
}

#footer {
padding: 0px;
position: relative;
padding: 0px;
background-color: yellow;
width: 100%;
}

#content {
margin-left:180px;
width:100% - #leftnav;
height: *%;
background-color: #66ccff;
align: right;
min-width: 50px;
min-height: 250px;
padding-left: 5px;
/*overflow:hidden; can also be set to visible this causes some silly problems*/
border-left:2px solid;
border-color:#663300;
}

#leftnav { /*sets properties for the left nav bar*/

float:left;
background-color : #66ccff;
width: 180px;
height:100% -#footer;
padding-top:30px;
}


#topleftspace {
position:absolute;
background-color: #66ccff;
width: 180px;
height:20px;
}

#toprightspace {
margin-left:180px;
background-color: #66ccff;
width:100% - #leftnav;
height:20px;
border-left:2px solid;
border-color:#663300;
padding-left:5px;
}

#topleftcorner {
text-align: left;
}

#toprightcorner {
text-align:right;
}

#topleftwhite {
position:absolute;
background-color: #FFFFFF;
width: 180px;
height:30px
}

#toprightwhite {
margin-left:180px;
background-color: #FFFFFF;
width:100% - #leftnav;
height:30px;
border-left:2px solid;
border-color:#663300;
padding-left:5px;
}

html


<div id="container"><div id="topleftwhite"></div><div id="toprightwhite"></div>

<div id="topleftspace"><div id="topleftcorner"><img src="images/t-left-corner.gif" width="20" height="20"</div></div>


<div id="leftnav"><img src="images/home-menu.gif" width="179" height="251"> left left left left left left left leftleft leftleft leftleft leftleft leftleft leftleft leftleft leftleft leftleft leftleft leftleft leftleft leftleft leftleft left</div>

<div id="toprightspace"><div id="toprightcorner"><img src="images/t-right-corner.gif" width="20" height="20"</div></div>
<div id="content"> content content content contentcontent contentcontent contentcontent contentcontent content
content contentcontent contentcontent contentcontent content
content contentcontent contentcontent content iam the man!Q!!!!!!! content content content contentcontent contentcontent contentcontent contentcontent content
content contentcontent contentcontent contentcontent content
content contentcontent contentcontent content iam the man!Q!!!!!!! content content content contentcontent contentcontent contentcontent contentcontent content
content contentcontent contentcontent contentcontent content
content contentcontent contentcontent content iam the man!</div>

<div id="footer"> temp</div>

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > CSS columns....please help


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT