Diane Ross wrote:
>>> #main {overflow: hidden; margin: 0; }
>>> * html #main {overflow: visible; height: 1%; }
>>> * html #sidebar {overflow-x: hidden;}

> I'm not quite sure if I should remove clear from the hr and add a 
> clear class if needed or add the corrected css you suggested above. 
> Or do I really need hr in my style sheet?

I can't say what you need, since that's purely a design-choice. I most
often add a top or bottom border to a suitable element, or maybe a
padding with a background-image, as visual separator.
I always check that my designs/layouts makes sense when CSS is turned
off or not supported, and that affects my own design-decisions.

Since your page...
<http://www.test.entourage.mvps.org/atest/>
...is already broken in IE6, I suggest you add the extra css to the
bottom of your stylesheet - and both the clearing hr problem and IE6'
bugs will be gone. You can always remove those few lines later -
especially if you comment them clearly so you know why you put them
there and what they are supposed to achieve.

 From there you can keep on learning about things like...
- 'Block formatting contexts'
    <http://www.w3.org/TR/CSS21/visuren.html#q15>
- 'hasLayout'
    <http://www.satzansatz.de/cssd/onhavinglayout.html>
- 'Collapsing margins'
    <http://www.w3.org/TR/CSS21/box.html#collapsing-margins>
...and other factors that will regularly affect your layouts.

> Where I get myself into trouble is I use examples from another site 
> (I try to 'borrow" from the best) and I don't know enough to 
> understand all the attributes they have added to the style.

"Borrowed" code can be troublesome that way. It is often page/site
specific, and can contain properties that doesn't do any good in your cases.
Also: each designer has his/her own preferences, and may use, misuse and
abuse properties in a multitude of ways. May work fine for them and it
may even be perfectly in accordance with the W3C-specs, but it sure can
lead less experienced designers out on pretty thin ice at times.

There are also loads of articles and sites around with poorly tested,
incomplete, and also many completely wrong, solutions around.
Some articles and code-examples are just old - and may be excused as
long as one can sort them out.
Some designers may ignore both specs and many major browsers, and give
you something that only works in _their_ preferred browsers.
Add lack of, or weak, standards-support in all browsers - even the
latest versions, and a number of browser-specific bugs, and "borrowing"
can really create problems.


You'll really only learn in any depth when you create a number of your
own, smaller, test-cases/pages and run the "borrowed" code/examples
through its phases in all major browsers and learn how both code and
browsers work - instead of just plugging "borrowed" code into larger
layouts and hope you're lucky.


It is also important to check how each property _should_ be used, and
what it is _supposed_ to do (and if the one you "borrowed" from got it
right), by checking what the specs say about that property.

The 'CSS 2.1 Specification' covers the most essential parts...
<http://www.w3.org/TR/CSS21/>
...and you should take time to study the entire set of documents.
There's a lot to study, but you don't have to go through it all at once.
(I personally find it easier to read the specs, than I find most of the
articles that try to simplify the stuff.)

Here's a good place to start...
<http://www.w3.org/TR/CSS21/visuren.html>


> Is this OK?
> 
> .clear-both { clear: both; }

Sure - that is a normal clearing class.

As an example - I keep these classes in my stylesheets...
/* high specificity clearings */
.left {clear:left!important; }
.right {clear:right!important; }
.both {clear:both!important; }
.none {clear:none!important; }
...and add the suitable one when I need to add 'clear' to an element -
in cases where it isn't more naturally to add the 'clear' property to an
existing id or class for an element.
Needless to say that I don't need the exemplified classes all that
often, but once or twice in a page is quite normal.


regards
        Georg
-- 
http://www.gunlaug.no
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to