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 01-10-2012, 12:10 PM   PM User | #1
gingerbread
New Coder

 
Join Date: Jan 2012
Posts: 36
Thanks: 1
Thanked 0 Times in 0 Posts
gingerbread is an unknown quantity at this point
CSS/HTML Why are my divs colliding?

Hello!

For some reason, me footer is colliding with content in a previous div.

HTML:

Code:
<p class="dividertext">latest blog posts</p>
<div id="blogfeed></div>

<br />

<div class="footer">
<ul class="foot">
  <li><a class="foot" href="http://url.com/terms.html">terms and conditions</a></li>
  <li><a class="foot" href="http://url.com/privacy.html">privacy policy</a></li>
  <li><a class="foot" href="http://url.com/disclaimer.html">disclaimer</a></li>
  <li><a class="foot" href="http://url.com/contact.html">contact us</a></li>
</ul>



<div id="copyright"><p>copyright 2011  | marketing (pty) ltd. </p></div>
</div>

CSS:

Code:
.footer, .push {
height: 10em;
background-color: black;
color: #808080;
font-family: "Lucida Sans Unicode", Tahoma, sans-serif;
font-weight: bold;
font-size: 0.82em;
    border-top-style: dotted;  
    border-width: 0.5px;
    border-color: #1a1a1a;
}

a.foot:link {color: #808080; text-decoration: none;}
a.foot:visited {color: #808080; text-decoration: none;}
a.foot:hover {color: #00dbdb; text-decoration: underline;}
a.foot:active {color: #808080; text-decoration: none;}

 ul.foot {
    	list-style-type: none;
    	display: inline;
	max-width: 945px;
   	 padding-left: 0px;
   	 padding-top: 15px;
   	 margin-top: 2em;
   	 margin-left: 0px;
   	 margin-bottom: 25px;
   	 font-size: 0.82em;
   	 color: #808080;
   	 font-family: "Lucida Sans Unicode", Tahoma, sans-serif;
	font-weight: bold;
}
 
  ul.foot li {
    	margin-top: 0.5em;
	display: inline;
	max-width: 945px;
}

#blogfeed {
	background-color: #171717;
	width: 245px;
	height: 255px;
	margin-bottom: 2em;
}

This is what firebug shows:

Code:
<div id="blogfeed></div> <br /> <div class=" footer"="">
They are on the same line for some reason.

Any ideas or help would be immensly appreciated!!!

Thank you.
gingerbread is offline   Reply With Quote
Old 01-10-2012, 12:22 PM   PM User | #2
VIPStephan
The fat guy next door


 
VIPStephan's Avatar
 
Join Date: Jan 2006
Location: Halle (Saale), Germany
Posts: 7,608
Thanks: 5
Thanked 865 Times in 842 Posts
VIPStephan is a jewel in the roughVIPStephan is a jewel in the roughVIPStephan is a jewel in the rough
If Firebug shows HTML like this then there’s clearly something wrong. Look at the attributes in the footer div. And I already see where it’s coming from: you forgot the closing quote on the blogfeed div’s ID attribute.
__________________
Don’t click this link!
VIPStephan is offline   Reply With Quote
Old 01-10-2012, 03:18 PM   PM User | #3
gingerbread
New Coder

 
Join Date: Jan 2012
Posts: 36
Thanks: 1
Thanked 0 Times in 0 Posts
gingerbread is an unknown quantity at this point
Quote:
Originally Posted by VIPStephan View Post
If Firebug shows HTML like this then there’s clearly something wrong. Look at the attributes in the footer div. And I already see where it’s coming from: you forgot the closing quote on the blogfeed div’s ID attribute.
Hello, thank you for the reply.

I did include it:

HTML:

Code:
<p class="dividertext">latest blog posts</p>
<div id="blogfeed></div>
firebug:

Code:
div id="blogfeed></div> <br /> <div class=" footer"="">
I've validate my css - no problems.

Last edited by gingerbread; 01-10-2012 at 03:20 PM.. Reason: extra info
gingerbread is offline   Reply With Quote
Old 01-10-2012, 03:59 PM   PM User | #4
VIPStephan
The fat guy next door


 
VIPStephan's Avatar
 
Join Date: Jan 2006
Location: Halle (Saale), Germany
Posts: 7,608
Thanks: 5
Thanked 865 Times in 842 Posts
VIPStephan is a jewel in the roughVIPStephan is a jewel in the roughVIPStephan is a jewel in the rough
No, your error is:
Code:
<div id="blogfeed"></div>
__________________
Don’t click this link!
VIPStephan is offline   Reply With Quote
Old 01-10-2012, 04:24 PM   PM User | #5
Excavator
Master Coder


 
Excavator's Avatar
 
Join Date: Dec 2006
Location: Alaska
Posts: 9,410
Thanks: 22
Thanked 1,765 Times in 1,749 Posts
Excavator has a spectacular aura aboutExcavator has a spectacular aura aboutExcavator has a spectacular aura about
Hello gingerbread,
I couldn't help but notice your statement that you validated -
Quote:
I've validate my css - no problems.
There is also a validator for your markup that would catch your missing ".
__________________
Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad
Excavator is offline   Reply With Quote
Old 01-10-2012, 04:28 PM   PM User | #6
gingerbread
New Coder

 
Join Date: Jan 2012
Posts: 36
Thanks: 1
Thanked 0 Times in 0 Posts
gingerbread is an unknown quantity at this point
Quote:
Originally Posted by Excavator View Post
Hello gingerbread,
I couldn't help but notice your statement that you validated -

There is also a validator for your markup that would catch your missing ".
Many thanks to you as well as VIPStephan. I will make it a habit of validating my mark up.

Thanks!!!!!
gingerbread is offline   Reply With Quote
Reply

Bookmarks

Tags
colliding, css, divs, html, overlapping

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 03:12 PM.


Advertisement
Log in to turn off these ads.