-1

I'm trying to make a border on the right site of my div as a sort of break point, to start my content afterwards. However, the div takes up the whole width of the page, and I can't fix it. I've tried max-width, I've tried making it into a inline-block, nothing.

.15Info {
      display: inline-block;
      padding-top: 50px;
      height: auto;
      max-width: 100%;
    }
    .package {
      padding-left:70px;
      margin-top: 15px;
    }
    .monthlyPrice {
      padding-left:55px;
      font-size:52px;
      font-weight: bold;
      color: #277FD8;
    }
    .differentbandwidth {
      margin-left: 7px;
      text-align: center;
      padding: 15px;
      border-style: solid;
      border-color: #277FD8;
      border-width: 3px;
      border-radius: 8px;
      max-width: 270px;
    }
    .border {
      border-right: thick solid #277FD8;
    }
<div class="15Info border">
      <h1 class="package">Cable 15</h1>
      <h3 class="monthlyPrice">\$39.99</h3>
      <h3 class="differentbandwidth">\$69.99 for unlimited</h3>
    </div>
Ron van der Heijden
  • 14,803
  • 7
  • 58
  • 82
Thomas Hutton
  • 793
  • 5
  • 15
  • 34
  • why you should define a width at all? if you don't your div will just take the space defined by what is inside of it. Maybe you try to make another div to stay on the right of the first? Then you have to give both the float left property. The default behaviour is to put one below the other and not on the side – Lelio Faieta Jun 27 '16 at 13:42
  • @LelioFaieta Because it doesn't. When I take out width it still has the same issue. – Thomas Hutton Jun 27 '16 at 13:44
  • that is the expected behaviour – Lelio Faieta Jun 27 '16 at 13:45

2 Answers2

0

You can't use a number as the first letter in a class name.

Rob
  • 14,746
  • 28
  • 47
  • 65
0

This StackOverflow thread explains a bit more about CSS class names.

Your .15Info class is improperly named. CSS classes need to start with a letter, underscore, or hyphen.

Community
  • 1
  • 1
Thassa
  • 532
  • 8
  • 27