Found this content helpful? Log in or sign up to leave a like!
Dynamic buttons and banner in rich content editor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Iām trying to build a homepage for a course without using tables and Iām having trouble getting the banner and buttons to line up. For reference it's a banner with 4 thin buttons beneath it⦠I need everything to span the entire page and line up both when accessed by clicking āpagesā and when accessed by clicking āhomeā. What is happening is I can get everything the way itās supposed to be for one and not the other.
Here is the page when accessed by clicking āHomeā (screenshot 1 - everything looks correct), and here is the page when accessed by clicking āPagesā (screenshot 2 - the banner hangs over the end of the 4th button and there is a visible gap). This is with banner dimensions at width="100%" height="100%" and button dimensions at width="24.5%" height="24%"
If I fix it so it looks correct when accessed by clicking āPagesā (banner the same, buttons at width="24.6%" height="24%" ) then it hangs the 4th button out below in the next row when accessed by clicking āHomeā (screenshot 3).
Iāve tried every combination of banner and button size I can think of to try and make this work and no matter what I do it looks wrong when accessing the page one of the two ways. I canāt mark this project as done until it looks correct when accessed both ways and Iām really tired of working on it. Please help, what do I do?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Have you considered using the Flexbox Grid system? I think using something like this for the buttons should do it:
<div class="content-box">
<div class="grid-row">
<div class="col-sm-12
col-md-6
col-lg-3
col-xl-3">
<div class="styleguide-section__grid-demo-element"><p>Button 1</p>
</div>
</div>
<div class="col-sm-12
col-md-6
col-lg-3
col-xl-3">
<div class="styleguide-section__grid-demo-element"><p>Button 2</p>
</div>
</div>
<div class="col-sm-12
col-md-6
col-lg-3
col-xl-3">
<div class="styleguide-section__grid-demo-element"><p>Button 3</p>
</div>
</div>
<div class="col-sm-12
col-md-6
col-lg-3
col-xl-3">
<div class="styleguide-section__grid-demo-element"><p>Button 4</p>
</div>
</div>
</div>
</div>
(you'll have to fill in the button content.) This should make it so that it will line up perfect, with 4 buttons on large screens, and then two rows of two buttons on smaller screens.