First you need to get your idle set. Why does your idle need adjusting?
Not sure on the 97 Civic EX, But usually on Civics, there is a Idle Adjustment Screw on the Throttle Body, It is just to the upper left corner of the air intake tube. It takes a Flat Head Screwdriver. Clockwise to lower the idle, Counter-Clockwise to raise the idle, Most D series engines idle at 750RPM
To adjust the timing, You need a Timing Light. First you need to just loosen the 12mm fasteners around the distributor. There are 3 of them, Just loosen them enough to move the distributor. Run the car to operating temperature, I like to do it after the fans come on. Hook up the timing light to your battery, Red to + Positive, Black to – Negative. Hook up the pick-up to the #1 spark plug wire, #1 is the wire, closest to the belts. then look down the side of the engine to the crank pulley, you will see a marking, usually an arrow, on the side of the timing cover, and you will line up the single white mark on the crank pulley with the arrow on the timing cover. Then snug the top fastener on the distributor so your timing doesn’t move. Check the timing again to make sure it didn’t move after tightening that fastener. If all is good, turn off the engine, and tighten the other 2 fasteners. Disconnect your timing light, and you should be good.
Also Make sure your cooling system is bled out before doing the timing adjustment.
That’s just how I do it.