Author Topic: Change sidebar width (Saratoga script)  (Read 561 times)

0 Members and 1 Guest are viewing this topic.

Offline UpstateWeather.com

  • Signature
  • Contributor
  • ***
  • Posts: 146
    • Upstate Weather
Change sidebar width (Saratoga script)
« on: March 25, 2023, 08:54:26 AM »
Sorry I this is a really dumb question.... :)

How do I make the left sidebar/menubar of the Saratoga script template wider?

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9288
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Change sidebar width (Saratoga script)
« Reply #1 on: March 25, 2023, 02:56:11 PM »
Not a dumb question.. glad you asked.  It is not a simple change, but doable.

You have to adjust the sizing in two places:

1) in the weather-screen-{color}-{width}.css (i.e. your 2023-6-weather-screen-taupe-narrow.css)
Code: [Select]
.leftSideBar {
 width:9.5em;

2) in flyout-menu.php in the genCSSFlyout() function, there are a couple of width: statements which will have to be tweaked

Be aware that the sidebar menu was heavily tweaked to have the flyout menu work with CSS alone (no JavaScript needed), so do your changes proportionally to the values there to keep the aspect/operation of the menu working correctly.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline uziom

  • Member
  • *
  • Posts: 7
Re: Change sidebar width (Saratoga script)
« Reply #2 on: April 05, 2023, 12:50:55 PM »
To make the left sidebar/menubar of the Saratoga script template wider, you will need to modify the CSS (Cascading Style Sheets) code for the template. Here are the steps to do this:

Open the CSS file for your Saratoga script template. This file is typically named "style.css" and can be found in the "css" folder of your template.

Look for the CSS class that controls the width of the left sidebar/menubar. This class is usually named "sidebar" or "left-sidebar".

Modify the "width" property of the CSS class to increase the width of the left sidebar/menubar. For example, you could change the width to "300px" to make the sidebar wider.

Save the CSS file and refresh your website to see the changes.

Note that increasing the width of the left sidebar/menubar may affect the layout of your website, so you may need to adjust other CSS classes accordingly to ensure that everything fits on the page properly. You may also need to adjust the width of other elements on the page to maintain a balanced layout.

 

anything