Skip to main content
Participant
July 19, 2017
Answered

Dreamweaver CC2017 navigation bar.

  • July 19, 2017
  • 2 replies
  • 885 views

Hi guys,

I downloaded dreamweaver cc which is the latest version and also installed bootstrap with it. Just want to know if anyone knows how to centre the whole navigation bar from bootstrap component. I have tried to put in properties but it does not work at all, also tried adjusted the margin also does not work. Can someone guide me on this?

This topic has been closed for replies.
Correct answer BenPleysier

Add the following to the bottom of the style sheet (CSS)

@media (min-width: 768px) {

     .navbar .navbar-nav {

          display: inline-block;

          float: none;

     }

     .navbar .navbar-collapse {

          text-align: center;

     }

}

This will center a not-collapsed navbar. See Edit fiddle - JSFiddle

2 replies

BenPleysier
Community Expert
BenPleysierCommunity ExpertCorrect answer
Community Expert
July 19, 2017

Add the following to the bottom of the style sheet (CSS)

@media (min-width: 768px) {

     .navbar .navbar-nav {

          display: inline-block;

          float: none;

     }

     .navbar .navbar-collapse {

          text-align: center;

     }

}

This will center a not-collapsed navbar. See Edit fiddle - JSFiddle

Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!
Legend
July 19, 2017

What do you mean by 'centre' - centre the components within the navbar or centre the actual navbar itself, with equal space left and right?