Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Need help with bootstrap grid col-md

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #257246
    casioBH
    Participant

    Hello everyone,

    I am trying to make only one grid with “col-md-8” and “col-md-4” but the problem is that I got two rows with maximum width, but I want only one horizontal div, left to be width col-md-8 and right to be col-md-4

    I have no idea what could be wrong with my code, for me it is all correct.

    Thanks in advance!

    My code is:


    <div class="container"> <div class="row"> <div class="col-md-8"> <div class="left-side">Left part col-md-8</div> </div> <div class="col-md-4"> <div class="right-side">Right part col-md-4</div> </div> </div> </div>
    #257251
    Paulie_D
    Member

    Looks like it works to me:

    https://codepen.io/Paulie-D/pen/YxqgzW

    #257252
    casioBH
    Participant

    Yes, I got the sme result and look, but that is not what I want.

    I want only one box, for example this pink one, which left side would be width:col-md-8 and left width: col-md-4.

    Not two rows below each other…

    thanks

    #257253
    Lionel
    Participant

    Looks like the code is fine bro; take a look at the source, maybe you’re not calling bootstrap correctly into the page.

    #257254
    Lionel
    Participant

    Oh; wait… I think the result you’re experiencing is about screen size. If you open the code sent by Paulie in a new tab, in full screen, you’ll be able to see the result you want. But since you’re only using “col-md”, the columns will work only from an specific screen width.

    Try adding col-sm instead col-md.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘CSS’ is closed to new topics and replies.