Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Div dissappears when I remove text
Old 04-25-2010, 11:52 AM Div dissappears when I remove text
Novice Talker

Posts: 5
Trades: 0
I have been working on this for literally hours, so I thought some fresh eyes could solve my problem. I have a footer div that I want at the very bottom of my page (which is always 100%). I have a complex page with a lot of images so to get the footer like I needed, I had to add a lot of containers to make everything work. Anyway, when I put text in the div it works just like I want. But, when I remove the text, the div dissappers. The div has a height and a width, so I'm stumped. Oh, and its in IE and FF, so I must be doing something wrong.

I removed all my images and some code to make it easier to see.

http://ratchetmedia.com/dev/index.htm < footer div shows up
http://ratchetmedia.com/dev/index2.htm < footer div is gone (just took out the text)

Here's my style.css page:
Code:
html,
body{
	margin:0;
	padding:0;
	height:100%;
}

#container {
	min-height:100%;
	position:relative;
	background:lightblue;
}

	
#main{
	width:980px;
	margin:0 auto;
	padding-bottom:25px;
}

#header{
	width:978px;
	height:106px;
	position:relative;
	z-index:100;
	background:lightgreen;
}

.page{
	width:980px;
	float:left;
}

#footcontainer{
	position:absolute;
	bottom:0;
	margin:0px auto;
	padding:0;
	height:25;
	width:100%;
}

#footer{
	bottom:0;
	margin:0px auto;
	padding:0;
	width:980px;
	height:25;
	background:gray;
}
Thanks!
sweetandsoft is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 04-25-2010, 01:56 PM Re: Div dissappears when I remove text
Super Spam Talker

Posts: 755
Name: Barry O' Brien
Location: Ireland
Trades: 0
you are missing the px in the css

Quote:
#footer{
bottom:0;
margin:0px auto;
padding:0;
width:980px;
height:25;
background:gray;
}
Try this

#footer{
bottom:0;
margin:0px auto;
padding:0;
width:980px;
height:25px;
min-height:25px; (optional)
background:gray;
}
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
audiomad is offline
Reply With Quote
View Public Profile Visit audiomad's homepage!
 
Old 04-25-2010, 02:01 PM Re: Div dissappears when I remove text
Novice Talker

Posts: 5
Trades: 0
Wow went over that line by line no telling how many times and never caught that. That fixed it. Thanks!
sweetandsoft is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Div dissappears when I remove text
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.19423 seconds with 12 queries