|
|
||||||
|
||||||
| Index Link To US Private Messages Archive FAQ RSS | ||||||
| Accessibility and Usability Forum Discuss topics related to website accessibility and usability. Subjects include; testing techniques, tutorials, guidelines and legal issues. |
Share Thread: & Tags
|
||||
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
I usually copy old templates, but thought i would code a clean page from scratch.
I'm a search engine nut, so wanted to have the content before the navigation. So I thought the standard approach was to put it all in a wrapper, have a top header, then the main section, with the menu floated left and content floated right, and then a footer. It looked ok in my old Crazybrowser, ok in IE, but Firefox is completely stuffing it up. Problem 1 is that my content extends down below the wrapper. Why is this? The code is clearly inside the wrapper. Problem 2 is the footer covers over the stuff above it. I thought this was a pretty basic page. I'm running Firefox 2.0.0.5. Any ideas? The test page is at Untitled Document |
|
||||
|
Hi OzChris,
Your problem sounds similar to one I had a while back. When I had a wrapper which contained several floated divs then the outer collapsed. Several suggestion were put forward but the following link should take you to the one I use. CSS Float Problem This comes from a Position Is Everything article Hope this helps |
|
|||
|
According to the CSS spec, floated containers don't actually take up space, so they have to be cleared after they end. The simplest way to do this is add "clear:both" to your footer's CSS. I just tried it and it worked great.
|
|
||||
|
An approach that might save you a LOT of time in future.
Layout Gala: a collection of 40 CSS layouts based on the same markup and ready for download! All of the layouts on that page are source ordered and work cross browser, and it pretty much represents most any layout you could possibly want, and with the added bonus of being able to update the layout via the css without changing the html down the road! The only thing I change is adding a main wrapper to make doing faux columns background treatment and centering easier, and I change doctype to xhtml strict. Now, to the specifics of your problem. Don't use the height attribute, since it won't allow text resizing, and it's a fake fix. Put this in your stylesheet: Code:
.clearA {
overflow: hidden;
clear:both;
height:0;
margin:0;
font-size: 1px;
line-height: 0;
width: auto
position: relative
}
Code:
<br class="clearA" /> Containing Floats (Complex Spiral Consulting) And here: Clearing elements |
|
|||
|
You guys are beautiful!
Thanks (I chose bj's solution of a break to clear the float.) Haven't uploaded it, but I'll use it on my new site. A fantastic link to layout gala. Cheers |
|
|||
|
further to the 'height:' usage on the div, firefox and IE 7 both support the use of 'min-height' which has a really similar effect to the 'height' attribute in IE 6, and allows for text resizing.
I have a tendancy to use height in IE 6 conditional commented stylesheet, and use min-height in the main stylesheets. |
|
||||
|
You're welcome!
Yeah, I love layout gala! Saves me a LOT of work figuring things out. |
|
|||
|
Hi guys,
Ok so I'm a little late to this discussion after my hols. Although there's a good fix above I'd prefer to sort out the source of the problem, which is this: div#content {float:right; Yes the nav needs to be floated left to take it out of the 'flow', but without any float spec the content will automatically snap into the right place with no clearing probs. Only extra that needs to be added is: margin:0 0 0 30%(or nav width); to stop it overflowing the nav, and it's also a good idea to add e.g. min-height:250px; _height:250px to the content div in case some content is shorter than the nav which will make the footer behave. More details here (I have no connection) 2 Column CSS Layout - TheVanBlog
__________________
Alex TJ Corsi di inglese per aziende - Milano Servizi di Traduzione Professionale |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Firefox hover problem | ozchris | Web Programming Discussion Forum | 4 | 01-29-2006 09:44 AM |
| Css display problem in Firefox | Spectur | Graphics & Design Discussion Forum | 3 | 11-22-2005 11:13 AM |
| RSS feed problem in Firefox? | Phiber | IT Discussion Forum | 0 | 08-29-2005 07:32 PM |
| FireFox Problem | jacobwissler | Graphics & Design Discussion Forum | 2 | 05-25-2005 05:40 PM |
| Firefox Problem? | splinter | The Castle Breakroom (General: Any Topic) | 12 | 07-18-2004 09:13 PM |
|
WebProWorld |
Advertise |
Contact Us |
About |
Forum Rules |
MVP's |
Archive |
Newsletter Archive |
Top |
WebProNews
WebProWorld is an iEntry, Inc. ® site - © 2010 All Rights Reserved Privacy Policy and Legal iEntry, Inc. 2549 Richmond Rd. Lexington KY, 40509 |