A waterproof structure of a portable electronic device, the structure comprising: a package of the electronic device, and a cover which is adapted to slide in a sliding direction; wherein the package comprises an opening which is open outward via an opening surface that is in parallel with the sliding direction; first guide surfaces formed at a first position and second guide surfaces formed at a second position; groove parts formed in the middle of end faces of the second guide surfaces; and slopes formed at faces of the groove parts; step parts which are formed at a boundary between the first guide surfaces and the second guide surfaces; the cover comprising a lid part which is slidable between the first position that makes the opening be open and the second position that is located closer to the innermost of the opening than the first position and closes the opening; an elastic member provided on a surface of the lid part, said surface facing an inner side of the opening; a press fit part adapted to expand outward in the width direction and inward in the opening direction at an outer-peripheral edge of a surface of the elastic member; a pair of guide ribs that are fittable to the groove parts; wherein the elastic member and the press fit part do not contact the package when the cover is positioned at the first position, wherein when the cover is adapted to slide toward the second position, the guide ribs are adapted to pass the step parts, slide down the slopes and fit into the groove parts, wherein the elastic member is pressed into the opening when the cover is positioned at the second position. a package of the electronic device, and a cover which is adapted to slide in a sliding direction; wherein the package comprises an opening which is open outward via an opening surface that is in parallel with the sliding direction; first guide surfaces formed at a first position and second guide surfaces formed at a second position; groove parts formed in the middle of end faces of the second guide surfaces; and slopes formed at faces of the groove parts; step parts which are formed at a boundary between the first guide surfaces and the second guide surfaces; the cover comprising a lid part which is slidable between the first position that makes the opening be open and the second position that is located closer to the innermost of the opening than the first position and closes the opening; an elastic member provided on a surface of the lid part, said surface facing an inner side of the opening; a press fit part adapted to expand outward in the width direction and inward in the opening direction at an outer-peripheral edge of a surface of the elastic member; a pair of guide ribs that are fittable to the groove parts; wherein the elastic member and the press fit part do not contact the package when the cover is positioned at the first position, wherein when the cover is adapted to slide toward the second position, the guide ribs are adapted to pass the step parts, slide down the slopes and fit into the groove parts, wherein the elastic member is pressed into the opening when the cover is positioned at the second position. a lid part which is slidable between the first position that makes the opening be open and the second position that is located closer to the innermost of the opening than the first position and closes the opening; an elastic member provided on a surface of the lid part, said surface facing an inner side of the opening; a press fit part adapted to expand outward in the width direction and inward in the opening direction at an outer-peripheral edge of a surface of the elastic member; a pair of guide ribs that are fittable to the groove parts; wherein the elastic member and the press fit part do not contact the package when the cover is positioned at the first position, wherein when the cover is adapted to slide toward the second position, the guide ribs are adapted to pass the step parts, slide down the slopes and fit into the groove parts, wherein the elastic member is pressed into the opening when the cover is positioned at the second position.