Forum Moderators: not2easy

Message Too Old, No Replies

Quick question about alignment and Books

         

Cyprus2003

8:48 pm on Jun 1, 2004 (gmt 0)

10+ Year Member



I am new to CSS and for a few weeks I have being doing some online tutorials to get familiar and practice in CSS. I am currently working on converting one of my existing html sites into CSS. I read in one of the previous posts that it is not good to nest <Div>. Why is this so? Just curious?

Also, when I look at my CSS in IE 6.0, everything looks great. In Firefox things are off slightly. Is this something I should be concerned about or nothing big? Before, everything looked a lot worse and this is what it looks like. I thought CSS was supposed to correct the browser differences?

-------- Text is aligned here in IE 6.0
-image -
-of pic- Text is aligned here in Firefox
- x x-
- ****-
--------

I checked the code with Dreamweaver MX and W3C and the code has no errors.

Books, what books would you suggest if I have done some stuff in CSS. I am looking for a book with content, rather than a history lesson why HTML is no longer the “standard.” I want to do some advanced things in CSS, replacing tables, etc.

Thank you in advance,

DrDoc

9:00 pm on Jun 1, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to Webmaster World!

There is technically nothing wrong with nesting divs. However, you don't want to add to the code bloat by nesting more elements than necessary. Many times, CSS lets you do what you want with less markup than first anticipated. However, that's a learning process, and will take some time to get a hang of. When you create the page, ask yourself if one or more of the elements could be omitted, especially if it just serves as a wrapper...

In Firefox things are off slightly
It's actually the other way around. If there is a difference between IE and Mozilla/Opera, IE is always wrong. That's not to say that you can't make it look the same. It is possible to create identical pages in IE/Mozilla/Opera... It just takes some time to learn how.

For a good start, check out the CSS FAQ [webmasterworld.com] section, as well as the CSS Crash Course [webmasterworld.com], both of which can be found in our CSS Forum Library [webmasterworld.com].