Short answer: no.
Cover only applies if the cover affects the effect being used.
The characters in front of you do not give you actual cover from a Lightning Bolt since the area of effect of the Lightning Bolt is that entire area. It does not break up when it hits someone in front of you.
Ditto for Fireball.
If it were a bunch of arrows being fired at you, then yes, the cover would apply since the cover could result in actually stopping or deflecting a missile.
But, nothing here stops or deflects the Lightning Bolt. It covers the entire area.
From SRD: "For bursts, cones, cylinders, and emanating spells, the spell only affects areas, creatures, or objects to which it has line of effect from its origin (a burst's point, a cone's starting point, a cylinder's circle, or an emanating spell's point of origin).
An otherwise solid barrier with a hole of at least 1 square foot through it does not block a spell's line of effect."
There is a diagram in the PHB that illustrates what is and is not effected in line of effect.