need help with CSS layout ... see code

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

    need help with CSS layout ... see code

    Ok,

    I did spend tons of time now (as a beginner in css stylecoding) (but making
    html pags for many years), to get this right.
    But I am overseeing something.

    At this link you find a drawing of my wanted layout:



    description:

    -a left column in which I want to put some artwork only (jpg with repeat-y
    over the whole heigth of the page!).
    -the obvious header
    -a MainContent block (in which I now floated my "menu" div and a first
    content "cont1" div (- I also tried to take the menu outside the content
    block))
    -a footer

    Whatever I do, I keep getting strange things.
    At the moment, for instance, the content and menu texts go through my footer
    and go on below it. That is my main problem now.
    But some other problems, having to do with absolute and relative positioning
    I guess(?), also show up sometimes.

    The footer problem, I tried to solve with this concept:

    But somehow, I loose my footer completely than!?!?!

    I did go through several internet courses on how to work with css layouts,
    but mostly they work with the concept of a fixed width content. And that is
    not what I want. I want to desing for 800x600 minimum. And content should be
    adapting to larger resolutions/screens.

    Maybe you people can have a look below?

    thx
    Ron

    Here is the rough code I use at the moment (sorry for notepad not
    structuring this text):

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt d">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>blabla </title>
    <style type="text/css">
    <!--
    body {
    text-align: center;
    }
    #Wrapper {
    text-align: left;
    }
    #Header {
    position:absolu te;
    left:7%;
    top:0px;
    width:93%;
    height:100px;
    z-index:1;
    background-color: #00FF00;
    text-align: left;
    }
    #MainContent {
    position:absolu te;
    top:102px;
    width:93%;
    z-index:1;
    background-color: #FFFF00;
    left: 7%;
    text-align: left;
    }
    #cont1 {
    float: left;
    width: 70%;
    }
    #Menu {
    top:102px;
    width:20%;
    z-index:2;
    background-color: #00FFFF;
    bottom: 102px;
    left: 80%;
    text-align: left;
    float: right;
    }
    #Footer {
    position:absolu te;
    left:7%;
    width:93%;
    height:100px;
    z-index:1;
    background-color: #FF0000;
    bottom: 0px;
    }
    #LeftPixAchter {
    position:absolu te;
    left:0px;
    width:7%;
    z-index:5;
    background-color: #FFFFFF;
    background-image: url(pix/achter.jpg);
    background-repeat: repeat-y;
    top: 0px;
    height: 100%;
    float: left;
    }
    -->
    </style>
    </head>
    <body>
    <div id="Wrapper">

    <div id="Header"></div>

    <div id="MainContent ">

    <div id="Menu">
    test<br />
    test<br />
    </div>

    <div id="cont1">
    <p>
    Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy
    nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut
    wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper

    suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel
    eum iriure dolor in hendrerit in vulputate velit esse molestie consequat,
    vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et

    iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis
    dolore te feugait nulla facilisi.</p>
    </p>
    </div>

    </div>

    <div id="Footer"></div>
    <div id="LeftPixAcht er"></div>

    </div>
    </div>

    </body>
    </html>


  • dorayme

    #2
    Re: need help with CSS layout ... see code

    In article <86d12$4870acdd $541e3344$8782@ cache2.tilbu1.n b.home.nl>,
    "Ronny" <anonymous@disc ussions.microso ft.comwrote:
    Ok,
    >
    I did spend tons of time now (as a beginner in css stylecoding) (but making
    html pags for many years), to get this right.
    But I am overseeing something.
    >
    At this link you find a drawing of my wanted layout:
    >
    http://img356.imageshack.us/img356/3...hdesignfc1.jpg
    This the sort of thing you want?

    <http://dorayme.890m.co m/alt/ronny.html>

    --
    dorayme

    Comment

    • Ronny

      #3
      Re: need help with CSS layout ... see code

      Hey thx!

      Will study your code tonight and try to understand were i did go wrong!
      Thx again!

      Hans

      "dorayme" <doraymeRidThis @optusnet.com.a uschreef in bericht
      news:doraymeRid This-This the sort of thing you want?
      >
      <http://dorayme.890m.co m/alt/ronny.html>
      >
      --
      dorayme

      Comment

      • Ronny

        #4
        Re: need help with CSS layout ... see code

        Dorayme,

        except for the #wrapper you ignore any position declaration.

        How is a browser handle it than? Does it standard handle it as 'absolute'?
        Or?

        thx for your patience!


        Comment

        • Ronny

          #5
          Re: need help with CSS layout ... see code

          Hi Dorayme,

          I copied your complete code and filled content and menu with text.
          If the menulist that I put in menu is longer than the content text, I get
          this:



          ???
          I think something is still wrong in the code.

          Question, why is the heigth of menu set to 100%? It should keep the same
          height as content?


          This the sort of thing you want?
          >
          <http://dorayme.890m.co m/alt/ronny.html>
          >
          --
          dorayme

          Comment

          • Ronny

            #6
            Re: need help with CSS layout ... see code

            Floated content left
            Floated menu right
            Set a width for both
            I added a 'clear both' to the footer.

            So I believe i did get rid of the problem from the below picture.
            Other suggestions?


            Comment

            • dorayme

              #7
              Re: need help with CSS layout ... see code

              In article <60412$4872651a $541e3344$4204@ cache2.tilbu1.n b.home.nl>,
              "Ronny" <anonymous@disc ussions.microso ft.comwrote:
              Hi Dorayme,
              >
              I copied your complete code and filled content and menu with text.
              If the menulist that I put in menu is longer than the content text, I get
              this:
              >

              >
              ???
              I think something is still wrong in the code.
              >
              Question, why is the heigth of menu set to 100%? It should keep the same
              height as content?
              >
              >
              >
              This the sort of thing you want?

              <http://dorayme.890m.co m/alt/ronny.html>

              It was just some ideas for you to play with that would do you if your
              content is a certain way. To get a truly robust template for this sort
              of thing that will work cross browser for every combination of menu and
              content and footer and left side text and pics etc is a much much more
              daunting challenge and for that you might look at such well titled
              articles as:

              <http://www.alistapart. com/articles/holygrail>

              In my experience, for one's own sites, a lot of questions arise only
              merely hypothetically. In other words, if you know that your menu items
              are five or six list items deep and you are sure to have a decent amount
              of text in the content col, that means nothing is wrong *in the
              circimstances* with a template that might well break in other
              circumstances.

              If you said more about the actual site you are making, perhaps we might
              make other suggestions.

              --
              dorayme

              Comment

              • Ronny

                #8
                Re: need help with CSS layout ... see code

                dorayme,

                I will go over the pagelink you suggested.
                For the rest, from your example, I now have a more or less working
                'template'.

                I am rebuilding my site (personal homepage) from the old HTML coding (with
                tables and some basic css) to a css/divs based one. Setting up my page
                further will ceratinly reveil more problems. And I will see how I deal with
                that. For now I try to make an exact copy of my old index.html to the new
                one (just as a practice.... after that I will make more design alterations).
                Practice is everything I believe.

                My old pages are all written out of the bare head with just notepad and it
                would never pass any w3 test. Promise me not to laugh about the code and you
                may see it ... ;-)
                ww2propaganda.e u

                I recently did some help working on a history book. For that I made a
                separate part of my homepage with some information. Others pointed out to me
                that, although working perfect in IE, it sometimes sucked in safari and
                firefox.
                If you said more about the actual site you are making, perhaps we might
                make other suggestions.
                >
                --
                dorayme
                thx


                Comment

                • Ronny

                  #9
                  Re: need help with CSS layout ... see code

                  daunting challenge and for that you might look at such well titled
                  articles as:
                  >
                  <http://www.alistapart. com/articles/holygrail>
                  >
                  Indeed a good article that might help me a little further..thx


                  Comment

                  • dorayme

                    #10
                    Re: need help with CSS layout ... see code

                    In article <a8c9c$4872f5ae $541e3344$18802 @cache4.tilbu1. nb.home.nl>,
                    "Ronny" <anonymous@disc ussions.microso ft.comwrote:
                    Promise me not to laugh about the code and you
                    may see it ... ;-)
                    ww2propaganda.e u
                    I did not laugh at it. I like all that stuff oddly enough... but no time
                    to examine html/css just now... <g>

                    --
                    dorayme

                    Comment

                    Working...