DIVs fix!

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Henk

    DIVs fix!

    Hi,

    I am a beginner at CSS and think there is a big disadvantage using
    DIVs in combination with CSS.

    What I see happening, on sites like CSS Zen Garden etc is the
    following. People claim that CSS really make up your page-layout. But
    I think it doesn't. The reason is the DIV's that are used. They
    actually FIX the layout on a page as they get marked up in the
    ..html-file, and dus not maintained in the central .css-file. The
    nesting of DIV's is a way of FIXING the layout, so this is bad I
    guess.

    I am tending to have one big .html-file with all DIV's unnsted placed
    in one line. Can any-one explain?

    Henk
  • Evertjan.

    #2
    Re: DIVs fix!

    Henk wrote on 11 apr 2005 in comp.infosystem s.www.authoring.stylesheets:[color=blue]
    > I am a beginner at CSS and think there is a big disadvantage using
    > DIVs in combination with CSS.
    >[/color]

    Disadvantage to what?

    Using DIVs without CSS? Perhaps for beginners?

    --
    Evertjan.
    The Netherlands.
    (Replace all crosses with dots in my emailaddress)

    Comment

    • Jeff North

      #3
      Re: DIVs fix!

      On 11 Apr 2005 04:06:49 -0700, in
      comp.infosystem s.www.authoring.stylesheets oortm@gmx.net (Henk) wrote:
      [color=blue]
      >| Hi,
      >|
      >| I am a beginner at CSS and think there is a big disadvantage using
      >| DIVs in combination with CSS.
      >|
      >| What I see happening, on sites like CSS Zen Garden etc is the
      >| following. People claim that CSS really make up your page-layout. But
      >| I think it doesn't. The reason is the DIV's that are used. They
      >| actually FIX the layout on a page as they get marked up in the
      >| .html-file, and dus not maintained in the central .css-file. The
      >| nesting of DIV's is a way of FIXING the layout, so this is bad I
      >| guess.
      >|
      >| I am tending to have one big .html-file with all DIV's unnsted placed
      >| in one line. Can any-one explain?[/color]

      Think of a DIV as a container. It can be as simple as:
      <DIV id=one>
      ....some text
      </DIV>

      to more complicated
      <DIV id=WholePage>
      <DIV id=leftColumn>
      <DIV id=Menu>
      ...menu Items
      </DIV>
      </DIV>
      <DIV id=rightColumn>
      <DIV id=Contents>
      ...some text
      </DIV>
      </DIV>
      </DIV>

      A table uses TRs and TDs to position the data.

      CSS: on the Zen Garden site people submit their pages. This way they
      only have to upload a single (and complete) file.

      Normally I have an external stylesheet that controls the main format
      of the site. But there are instances where I want to have specific
      formating on an individual page, therefore I have and internal (as
      well as the external) style defined.
      ---------------------------------------------------------------
      jnorthau@yourpa ntsyahoo.com.au : Remove your pants to reply
      ---------------------------------------------------------------

      Comment

      • Henk

        #4
        Re: DIVs fix!

        Ah great, an example! I had to think of that (I was too lazy also).
        Your second example shows exactly what I call the stupidity of CSS.
        What I think is the problem here is that while nesting the DIVs you are
        trying to create some kind of structure. So That example is intending
        to be more than just a container. It is a structure in wich I think you
        are bounding the page for drastic layout changes in the future.
        Ofcourse I know there will be a work-around to get the nested Menu-DIV
        out of the nest and do something drastic but the case is that you have
        to use work-arounds to do so.

        So my point is: example two is defining a layout-structure. But CSS
        told me it would take care of the layout. All the layout that is.

        ?

        Comment

        Working...