I developed a site in Laravel and I have categories being called from the database and they are going past the bottom of the screen which is making users scroll down to see them all.
If you look at the image, you will see the result I am after.
I have looked at examples and I can get the effect if I manually add the links, but they are being called from the db
It should not make any difference where the code comes from, if the resulting html is the same.
Is this a question about retrieving data and rendering to html or one of styling the html with css?
I want my dropdowns to look like example #2, but I cannot seem to get them horizontal. I tried mega menu but it would just call the first item and not the rest.
The HTML that you are showing isn’t valid HTML. I do not know what
@foreach($sections as $section)
is but it’s not HTML.
Perhaps Laravel php framework? If so, it should not appear “raw” within HTML. We need to see the “compiled” HTML after the php has been interpreted and turned into HTML for the browser to render.
Likewise, megamenu is not a Laravel component, so it needs to be coded outside of Laravel…( in case that’s what’s happening with megamenu.) Just guessing.
It also seems you are using bootstrap but not following the rules for the grid either which doesn’t help things along.
As Ron said we really need to see your live version or at least a fully rendered html and css working version before we can fix this. I can tell you that the code above is of no use to you and too broken to fix easily.
Or indeed you may be better off building the menu as a stand alone and get it working first before you add your scripts to it.