Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
11-01-2009, 11:28 AM #1
- Join Date
- May 2009
- Woodbridge, VA
- Thanked 0 Times in 0 Posts
Trying to insert an ad beneath text and having issues spacing them apart
I'm trying to put advertisements beneath text on some of my dictionary pages and I'm having trouble putting space between the end of the text and the ad. To put an ad at the bottom of the page this page I had to put the padding-top at 900px and put in 16 <br>'s (the padding-top wasn't doing it by itself) just to put in about about a half inch of space between the end of the text and the top of the ad.
I'm using the current version of Mozilla Firefox and I'll put the full text of the above page's coding at the end of the post. I'm not sure how to fix the issue and looking for a little help.
11-01-2009, 11:42 AM #2
- Join Date
- Feb 2009
- Ilkley, West Yorkshire, UK
- Thanked 724 Times in 718 Posts
It's because all the <dt> and <dd> elements within dl.table-display are floated. Consequently the dl element does not not extend to contain all the floated elements, and the padding and <br/> tags you have added are bringing the top of .ad down from right at the top of the table.
The solution here is to add overflow:auto to dl.table-display - which will clear the floats at the end of the element and hence dl-table-display will be much taller.
This is easy to see in Firebug.