Mininum width

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

    Mininum width

    Hi i got the following Layout Css:


    | | | |
    | | | |
    | box1 | box2 | box3 |
    | | | |
    | | | |
    | | | |
    ----------------------
    box 4
    ----------------------

    body{
    margin : 0px;
    padding:100px;
    }


    ..box1, .box2, .box3{
    float:left;
    width:33.3%;
    height:400px;
    margin:0;
    padding:0;}

    ..box2{
    width:350px;
    }
    ..box4{
    width:100%;
    }

    Now i want to get box2 with a fixed width of 250 px.
    When i make it like that, the break for box 4 is gone away and box 4 starts in the same row.
  • Markus Ernst

    #2
    Re: Mininum width

    Wilhelm Kutting wrote:[color=blue]
    > Hi i got the following Layout Css:
    >
    >[color=green]
    >> | | |
    >> | | |
    >> box1 | box2 | box3 |
    >> | | |
    >> | | |
    >> | | |[/color]
    > ----------------------
    > box 4
    > ----------------------
    >
    > body{
    > margin : 0px;
    > padding:100px;
    > }
    >
    >
    > .box1, .box2, .box3{
    > float:left;
    > width:33.3%;
    > height:400px;
    > margin:0;
    > padding:0;}
    >
    > .box2{
    > width:350px;
    > }
    > .box4{
    > width:100%;
    > }
    >
    > Now i want to get box2 with a fixed width of 250 px.
    > When i make it like that, the break for box 4 is gone away and box 4
    > starts in the same row.[/color]

    ..box4 { clear:left; }

    HTH
    Markus


    Comment

    • Steve Pugh

      #3
      Re: Mininum width

      On Tue, 21 Dec 2004 12:26:17 +0100, Wilhelm Kutting
      <wkutting@arcor .de> wrote:

      [color=blue]
      >.box1, .box2, .box3{
      >float:left;
      >width:33.3%;
      >height:400px ;
      >margin:0;
      >padding:0;}
      >
      >.box2{
      >width:350px;
      >}
      >.box4{
      > width:100%;
      >}
      >
      >Now i want to get box2 with a fixed width of 250 px.
      >When i make it like that, the break for box 4 is gone away and box 4 starts in the same row.[/color]

      Add clear: left to the styles for box4.

      Also consider giving your classes more descriptive names. What are
      these boxes? Navigation? Logos? Advertising? Class names that reflect
      the nature of the element are more useful in the long run.

      Steve

      Comment

      Working...