0

please click for updated imageCurrently, my webpage looks like this:

enter image description here

But I want the bottom box to fit right under the top one while keeping the box on the right in the same place.

This is what i have now

#intro-chemistry{
    background-color: #C7C7C7;
    border-top: 7px solid rgb(177, 177, 177);
    width: 242px;
    height: 103px;
    padding: 13.75px;
    margin: 13.75px 13.75px;
    text-align: left;
    float: left;
}

#intro-physics{
    background-color: #C7C7C7;
    border-top: 7px solid rgb(177, 177, 177);
    width: 238px;
    height: 285px;
    padding: 13.75px;
    margin: 13.75px 13.75px;
    text-align: 10, 10, 10, 10;
    float: left;
}

#intro-classic{
    background-color: #C7C7C7;
    border-top: 7px solid rgb(177, 177, 177);
    width: 242px;
    height: 103px;
    padding: 13.75px;
    margin: 13.75px 13.75px;
    text-align: left;
    float: left;
}

I'm trying to get the box "classic" to fit right under the box "chemistry' whilst the box 'physics' stays put.

1 Answers1

2

You have to change your HTML structure.

HTML

<div class="col-left">
  <div id="intro-chemistry">
    Chemistry
  </div>
  <div id="intro-classic">
    Classic
  </div>
</div>

<div class="col-right">
  <div id="intro-physics">
    Physics 
  </div>
</div>

CSS

.col-left{
  float: left;
  width: 242px;
}
.col-right{
  float: right;
}
Anoop John
  • 464
  • 3
  • 8