This article presents an Electric LC (ELC) planar microwave sensor based on coplanar waveguide (CPW) for measuring the relative permittivity of solid and liquid materials. In this design, a portion of the transmission line in the CPW is truncated, and an ELC structure is introduced. Ring resonators are incorporated at the openings within the ELC to increase the internal capacitance, thereby creating a high electric field region. Additionally, the central part of the transmission line in the ELC is replaced with an interdigital electrode (IDE) structure, effectively compacting the high-energy electric field distribution area of the ELC and reducing the sensing area of the sensor. The sensor is fabricated on a dielectric substrate measuring 25mm*20mm*0.762mm, and the test results indicate that the unloaded resonant frequency of the sensor is 3.01GHz. The average sensitivity obtained from testing solid and liquid materials is 7.48 % and 2.01 %, respectively, with an average resolution of 225MHz/ε and 59.85MHz/ε, demonstrating good sensing performance.