How to increase width of topic

css

(François Douville) #1

Normally, topic look like this. Not as large as I want.

So, I wrote this code to increase the width :

.topic-body {
    width: 830px;
}

To make it look like this :

But when my screen is smaller, it looks like this :

How to avoid this?


(Kris) #2

The position of the timeline is based on the default topic width, so that needs to be moved too… our default CSS is:

.timeline-container {
  margin-left: 757px;

  @media all and (min-width: 1140px) {
    margin-left: 820px;
  }
  @media all and (min-width: 1250px) {
    margin-left: 900px;
  }
}

So I think you’d either want to reduce the topic width for smaller screens, or increase the margin-left of the timeline-container a bit.

Another difficulty you might run into is when we switch from the timeline to the progress bar at smaller browser widths… because that switch is determined in JS so it’s more involved than just updating the CSS.

33%20AM

I think eventually we’d want the layout to be more flexible so it would be in the right position automatically if the topic column width is different, but for now it’s a manual adjustment at a few breakpoints.