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 July 8th, 2004, 10:32 AM
ralphuk100's Avatar
ralphuk100 ralphuk100 is offline
meester luva luva
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Mar 2003
Posts: 2,654 ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 1 Week 4 Days 21 h 16 m 56 sec
Number of bans: 1
Reputation Power: 19
Send a message via MSN to ralphuk100
Get div to appear below another (Positioning. Not layer order)

I am trying to get the footer DIV to appear directly below the content div on the page. Cant get it to work. CSS and DIV code is below if anyone can offer some advice? Thanks.

Code:
#page_footer {
	background-color: #ff0000;
	width: 729px;
	height: 30px;
	position:relative;	
	bottom: 0px;
	left: 35px;
	font-family: arial, tahoma, times new roman;
	font-size: 11px;
	font-weight: normal;
	color: #5A5A5A;
}

	<!-- // MANDATORY PAGE CONTENT HOLDER // -->

	<div id="page_content_holder_sizing">

		<div id="page_content_section_name"><?=str_replace("::", "-", $page_title)?></div>
		<div id="page_content_top_stroke"><img src="/site_images/pre_load/spacer.gif" width="729" height="4"></div>
		<div id="page_content_bottom_stroke"><img src="/site_images/pre_load/spacer.gif" width="729" height="4"></div>

		<!-- // CONTENT TEMPLATE // -->



		<!-- // END CONTENT TEMPLATE // -->

	</div>

	<!-- // MANDATORY PAGE FOOTER // -->

	<div id="page_footer">

	 footer goes here

	</div>

	<!-- // END MANDATORY PAGE FOOTER // -->

	<!-- // END MANDATORY PAGE CONTENT HOLDER // -->

Reply With Quote
  #2  
Old July 8th, 2004, 11:17 AM
TheJim01's Avatar
TheJim01 TheJim01 is offline
Coconuts migrate?
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Feb 2004
Location: http://middle.nowhere.com
Posts: 1,895 TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)  Folding Points: 70160 Folding Title: Intermediate FolderFolding Points: 70160 Folding Title: Intermediate FolderFolding Points: 70160 Folding Title: Intermediate FolderFolding Points: 70160 Folding Title: Intermediate Folder
Time spent in forums: 2 Weeks 5 Days 11 h 8 m 20 sec
Reputation Power: 1176
Try adding clear: both; to your footer's class:
PHP Code:
#page_footer {
    
background-color#ff0000;
    
width729px;
    
height30px;
    
position:relative;    
    
bottom0px;
    
left35px;
    
font-familyarialtahomatimes new roman;
    
font-size11px;
    
font-weightnormal;
    
color#5A5A5A;
  
clearboth;

__________________

Proud member of the T.S.N.B.U.F.L (tables should not be used for layout) alliance.

"Only use elements for their intended purpose. You wouldn't try to make coffee with a telephone, would you?" -Me

Reply With Quote
  #3  
Old July 8th, 2004, 11:18 AM
ralphuk100's Avatar
ralphuk100 ralphuk100 is offline
meester luva luva
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Mar 2003
Posts: 2,654 ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 1 Week 4 Days 21 h 16 m 56 sec
Number of bans: 1
Reputation Power: 19
Send a message via MSN to ralphuk100
Thanks, I tried that and the footer just sticks itself right at the top of the page.

Reply With Quote
  #4  
Old July 8th, 2004, 12:26 PM
TheJim01's Avatar
TheJim01 TheJim01 is offline
Coconuts migrate?
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Feb 2004
Location: http://middle.nowhere.com
Posts: 1,895 TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)  Folding Points: 70160 Folding Title: Intermediate FolderFolding Points: 70160 Folding Title: Intermediate FolderFolding Points: 70160 Folding Title: Intermediate FolderFolding Points: 70160 Folding Title: Intermediate Folder
Time spent in forums: 2 Weeks 5 Days 11 h 8 m 20 sec
Reputation Power: 1176
That's odd... What positioning are you using for your content div?

Reply With Quote
  #5  
Old July 8th, 2004, 12:28 PM
ralphuk100's Avatar
ralphuk100 ralphuk100 is offline
meester luva luva
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Mar 2003
Posts: 2,654 ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 1 Week 4 Days 21 h 16 m 56 sec
Number of bans: 1
Reputation Power: 19
Send a message via MSN to ralphuk100
Absolute. All my div's are absolute. Code is below:

#page_content_holder_sizing {
background-image: url(/site_images/pre_load/page_content_background.gif);
background-color: #ffffff;
width: 729px;
height: 559px;
min-height: 559px;
position: absolute;
top: 140px;
left: 35px;
padding-left: 150px;
padding-right: 24px;
padding-top: 45px;
padding-bottom: 20px;
text-align: justify;
font-family: arial, tahoma, times new roman;
font-size: 11px;
font-weight: normal;
color: #5A5A5A;
z-index: -1;
}

Reply With Quote
  #6  
Old July 8th, 2004, 12:33 PM
TheJim01's Avatar
TheJim01 TheJim01 is offline
Coconuts migrate?
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Feb 2004
Location: http://middle.nowhere.com
Posts: 1,895 TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)TheJim01 User rank is General 3rd Grade (Above 100000 Reputation Level)  Folding Points: 70160 Folding Title: Intermediate FolderFolding Points: 70160 Folding Title: Intermediate FolderFolding Points: 70160 Folding Title: Intermediate FolderFolding Points: 70160 Folding Title: Intermediate Folder
Time spent in forums: 2 Weeks 5 Days 11 h 8 m 20 sec
Reputation Power: 1176
They all use absolute... except the footer. You used relative positioning for the footer, which won't work because relative is "relative" to it's normal place in the flow. Take out the relative positioning from the footer, or try making it absolute like the rest of the page. Let me know how that turns out.

Reply With Quote
  #7  
Old July 8th, 2004, 01:27 PM
kk5st's Avatar
kk5st kk5st is offline
Thanks Johnny Hart (BC) R.I.P.
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: May 2003
Location: Dallas
Posts: 4,674 kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level) 
Time spent in forums: 1 Month 3 Days 15 h 15 m 50 sec
Reputation Power: 687
Is there compelling reason to use AP? From what I've seen, static or relative should do as well.
Code:
container
    section-name
    top
    bottom
    footer
/container


cheers,

gary
__________________
There are those who manage to build a web site without knowing what they're doing; thereby proving to themselves they do, indeed, know what they're doing.

My html and css workshop, demos and tutorials.
Ask a better question, get a better answer.

Reply With Quote
  #8  
Old July 13th, 2004, 03:53 AM
ralphuk100's Avatar
ralphuk100 ralphuk100 is offline
meester luva luva
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Mar 2003
Posts: 2,654 ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 1 Week 4 Days 21 h 16 m 56 sec
Number of bans: 1
Reputation Power: 19
Send a message via MSN to ralphuk100
OK - have source...

Could someone please have a look at www.milleniumhygiene.co.uk and view the page source and give me a clue as to where my footer should be to get the clear:both to work? The source code is commented and you will find the footer at the bottom of the source. Thanks! I need this to work and I cant get it to work :-(

Reply With Quote
  #9  
Old July 15th, 2004, 10:39 AM
ralphuk100's Avatar
ralphuk100 ralphuk100 is offline
meester luva luva
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Mar 2003
Posts: 2,654 ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 1 Week 4 Days 21 h 16 m 56 sec
Number of bans: 1
Reputation Power: 19
Send a message via MSN to ralphuk100
Sorry to bump but I cant get this working and I cant put the site live without it...anyone?

Reply With Quote
  #10  
Old July 15th, 2004, 12:58 PM
kk5st's Avatar
kk5st kk5st is offline
Thanks Johnny Hart (BC) R.I.P.
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: May 2003
Location: Dallas
Posts: 4,674 kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level) 
Time spent in forums: 1 Month 3 Days 15 h 15 m 50 sec
Reputation Power: 687
For whatever reason, the main content area of the page does not render for me in Moz or Firefox. You might want to see if that is reproducable, especially with the expected migration from IE. I was also unable to find the footer in the source.

The {clear: } attribute determines whether a block element will appear at the same level as a float element. It is designed to avoid conflicts where elements might overlap. It does not, to my knowledge, apply to AP ({position: absolute;}) elements. Since everything else is AP, I would expect a {float: right} element to be at the top right of the page. However, you have confused the issue by giving the same footer element AP {bottom: 0; left: 35px;} which would suggest that it's at the bottom of the page 35 px from the left edge.

Your design is wonderfully clean and attractive, especially for so mundane a commercial service. It is obvious that you are a skilled graphic designer. You're waiting for the "but," aren't you? Here it comes. But, the coding shows a lack of understanding of the semantic and structural nature of html. The css illustrates the tyro's infatuation with absolute positioning and a poor grasp of the concept of flow.

This page could and should be refactored to use semantic and structured html. The display properties should be coded using no AP elements (well, maybe one small one), which among other things will facilitate resizing and variable content. That means more code is re-usable.

I'm sure that's not the answer you wanted, but it's the best I can do for you.

cheers,

gary

Reply With Quote
  #11  
Old July 16th, 2004, 05:51 AM
kk5st's Avatar
kk5st kk5st is offline
Thanks Johnny Hart (BC) R.I.P.
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: May 2003
Location: Dallas
Posts: 4,674 kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level) 
Time spent in forums: 1 Month 3 Days 15 h 15 m 50 sec
Reputation Power: 687
Rereading my last post, I seem a bit smart a——ed. Here is what I'm talking about, a refactoring and the stylesheet.

cheers,

gary

Reply With Quote
  #12  
Old July 16th, 2004, 05:52 AM
ralphuk100's Avatar
ralphuk100 ralphuk100 is offline
meester luva luva
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Mar 2003
Posts: 2,654 ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 1 Week 4 Days 21 h 16 m 56 sec
Number of bans: 1
Reputation Power: 19
Send a message via MSN to ralphuk100
No its fine Its the first site I have attemtped to layout solely in CSS - although the content frame still had to have tables so still getting to grips with it...the PHP is sound behind it though lol.

Reply With Quote