2 Replies - 1234 Views - Last Post: 14 February 2017 - 06:22 AM

#1 fearfulsc2  Icon User is offline

  • D.I.C Head

Reputation: 9
  • View blog
  • Posts: 169
  • Joined: 25-May 16

LayoutPage Bootstrap Controller Problem

Posted 13 February 2017 - 11:50 AM

Hey Everyone, I am trying to have a banner at the bottom of the page for each page

So I created a layout page that had a navbar at the top and a footer with the banner at the bottom.

I decided to bootstrap it up to give it some styling. Everything is great so far.

When you run the application and go to the default http://localhost:0000/

You will see the navbar and the banner at the bottom working and have the nice style from bootstrap.

However, if I use the controller which is the same exact page, the banner loses its styling.

What could be the cause for this? The /home/index is defaulted to /
but if I type in /home/index at the end, the banner loses its styling.

Is This A Good Question/Topic? 0
  • +

Replies To: LayoutPage Bootstrap Controller Problem

#2 andrewsw  Icon User is online

  • the case is sol-ved
  • member icon

Reputation: 6376
  • View blog
  • Posts: 25,763
  • Joined: 12-December 12

Re: LayoutPage Bootstrap Controller Problem

Posted 13 February 2017 - 12:14 PM

Presumably this is for ASP.NET MVC?

That localhost address is of no use to us.

You need to work out which layout page is being used and why, presumably, it isn't including the stylesheet. Inspecting the page in your browser will also allow you to confirm whether the stylesheet is attached or not (which is the most likely reason for styling to be lost).

Another reason to consider is that it referring to a different layout page that doesn't include the Bootstrap classes that you applied. The browser developer tools will also confirm whether these classes have been added or not.

View Postfearfulsc2, on 13 February 2017 - 06:50 PM, said:

What could be the cause for this? The /home/index is defaulted to /
but if I type in /home/index at the end, the banner loses its styling.

Sounds like the routing needs to be checked as well.
Was This Post Helpful? 1
  • +
  • -

#3 fearfulsc2  Icon User is offline

  • D.I.C Head

Reputation: 9
  • View blog
  • Posts: 169
  • Joined: 25-May 16

Re: LayoutPage Bootstrap Controller Problem

Posted 14 February 2017 - 06:22 AM

Figured out the problem. THe person I inherited the code from was using relative path for the bootstrap and other files when we needed to use absolute path.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1