Web Design and Development Forums

[SOLVED] simple div problem

This is a discussion on "[SOLVED] simple div problem" within the HTML Forum section. This forum, and the thread "[SOLVED] simple div problem are both part of the Design Your Website category.


Go Back   Webforumz.com > Design Your Website > HTML Forum

Welcome to Webforumz.com.
Register Now Register now!

Reply
 
LinkBack Thread Tools Rate Thread
Old Apr 4th, 2008, 09:44   #1 (permalink)
New Member
 
Join Date: Mar 2007
Location: uk
Posts: 7
[SOLVED] simple div problem

Hi, I am currently updating an existing subsite for my company which I did not originally make.

I have mainly just changed the css but in order to apply a white border around the site I have added two new divs. IE displays the site fine but in Firefox the border around the container div stops just below the banner instead of encompassing the site.

This is no doubt a very simple problem but one I am unable to fix so any help would be greatly appreciated.

The link is http://interactive-learning.info/productstest/

Cheers
hhelen is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Apr 4th, 2008, 09:58   #2 (permalink)
Chief Moderator
 
aso186's Avatar
 
Join Date: Oct 2007
Location: UK
Posts: 701
Blog Entries: 2
Send a message via Skype™ to aso186
Re: simple div problem

Add this to your CSS;
Code: Select all
#container:after {
    content:".";
    display:block;
    height:0;
    clear:both;
    visibility:hidden;
}
__________________

aso186 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Apr 4th, 2008, 11:35   #3 (permalink)
New Member
 
Join Date: Mar 2007
Location: uk
Posts: 7
Re: simple div problem

Thank you, you're an absolute star!
hhelen is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Apr 4th, 2008, 14:10   #4 (permalink)
Section Manager - WOTM
Assistant Editor - LZ
 
Jack Franklin's Avatar
 
Join Date: May 2007
Location: Cornwall, England
Posts: 1,101
Blog Entries: 5
Re: [SOLVED] simple div problem

aso,

Do you mind explaining quite what the content:'.'; bit is all about?
__________________
Section Manager (WOTM)

My Weblog & E-Portfolio
Catch me daily on: Twitter | Digg | Flickr
Jack Franklin is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Apr 4th, 2008, 14:49   #5 (permalink)
Chief Moderator
 
aso186's Avatar
 
Join Date: Oct 2007
Location: UK
Posts: 701
Blog Entries: 2
Send a message via Skype™ to aso186
Re: [SOLVED] simple div problem

This technique enables designers to clear floats without having to add unnecessary source markup.

The :after pseudo allows content to be inserted after the element in question. Although IE does not understand it, we needn't worry since IE clears floats by itself anyway (incorrectly).

The content is simply a dot (.), which is then hidden and set to display:block.

However, the important line is clear:both. This clears any floats within the element itself, forcing it to fully encase them.



Full details of solution: Clearing floats without source markup.

Details of :after pseudo at W3Schools.
__________________

aso186 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Apr 4th, 2008, 14:56   #6 (permalink)
Section Manager - WOTM
Assistant Editor - LZ
 
Jack Franklin's Avatar
 
Join Date: May 2007
Location: Cornwall, England
Posts: 1,101
Blog Entries: 5
Re: [SOLVED] simple div problem

Thanks Alex, all sorted. What an amazingly easy method
__________________
Section Manager (WOTM)

My Weblog & E-Portfolio
Catch me daily on: Twitter | Digg | Flickr
Jack Franklin is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Simple Php Code Problem longstand PHP Forum 3 Oct 17th, 2007 21:02
Simple Problem Please Help! bthomson82 JavaScript Forum 3 Jun 22nd, 2007 02:59
Simple problem that i cant figure out!! robukni Flash & Multimedia Forum 2 Apr 26th, 2007 23:25
Really simple positioning problem :( camcool21 CSS Forum 4 Dec 30th, 2006 18:25



Latest Updates

All Points SEO Security Advisory - CHECK YOUR SITE NOW!

Creative Coding :: February 2008

Webforumz is sponsored by: WESH UK Web Hosting
All times are GMT. The time now is 10:03.

Sleep Study Scoring :: Free Bet :: Website Templates :: Online Betting :: Bookmakers :: Funny Quotes :: Internet Recruitment Software :: Microsoft CRM Experts :: Online Casino :: Decorated Christmas Trees :: Midwife Forums :: Football Betting :: Ecommerce Software :: Web Hosting :: Football Stats :: Dry Cleaning Collection :: xtreme wales - extreme clothing :: Apuestas :: Sharepoint Consultants :: Website Optimisation :: Office Clearance London :: Sharepoint Experts :: Sports Betting :: Casino :: Website Templates :: Web Design Development India :: Online Gambling

Powered by: vBulletin Version 3.7, Copyright ©2000 - 2008, Jelsoft Enterprises Limited.
© 2003-2008 Webforumz.com : All Rights Reserved
Search Engine Friendly URLs by vBSEO 3.2.0 RC6


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59