CI 묻고 답하기

제목 페이지네이션이 이상하게 보이는 현상
카테고리 CI 2, 3
글쓴이 그동안 작성시각 2019/07/24 14:36:38
댓글 : 0 추천 : 0 스크랩 : 0 조회수 : 11074   RSS

페이지네이션이 이상하게 보이는 현상 관련 문의 드려 봅니다.

CSS 문제인가 싶기도 한데, 도무지 모르겠네요;;  

 

- 맨처음, 이전 버튼이 있을때는 정상 입니다.

 

- 이전 버튼만 존재할 시,  1 앞에 점이 생기고,  1과 2사이에 점이 안 보입니다.

- 맨처음, 이전 버튼 없을 시,  2와  3사이에 점이 안 보입니다.

 

[ CSS 코드 ]

/* normal paging */
.paging{margin:40px 0 0;text-align:center;}
.paging a{position:relative;display:inline-block;width:30px;height:30px;margin:0 1px;font-size:14px;color:#222;line-height:33px;vertical-align:middle;box-sizing:border-box;}
.paging a:hover,
.paging a.on{color:#e8422c;}
/*.paging a.first,.paging a.prev,.paging a.next,.paging a.last{display:none;}*/
.paging > a:after{content:'';display:block;position:absolute;left:-4px;bottom:8px;width:2px;height:2px;background:#333;border-radius:100%;}
.paging > a:nth-child(3):after{display:none;}
.paging span{text-indent:-9999px;}
.paging .first{background:url(../images/common/btn_paging_first.png) 50% 50% no-repeat;}
.paging .prev{background:url(../images/common/btn_paging_prev.png) 50% 50% no-repeat;}
.paging .next{background:url(../images/common/btn_paging_next.png) 50% 50% no-repeat;}
.paging .last{background:url(../images/common/btn_paging_last.png) 50% 50% no-repeat;}

 

[ 페이지네이션 컨트롤러 코드 ]

   //공지사항 목록
    public function notice_list()
	{
		//페이지네이션 설정 시작
		$config = array();
		$config['base_url'] = base_url()."/my_client/notice_list/";                                          //뷰.페이징 주소
		$config['total_rows'] = $this->notice_m->notice_record_count();                                     //게시물의 전체 갯수
		$config['per_page'] = 5;                                                                            //한 페이지에 표시할 게시물 수
		$config['uri_segment'] = 3;                                                                         //페이지 번호가 위치한 URI 위치
		$config['use_page_numbers'] = TRUE;
		$config['full_tag_open'] = '<div class="paging">';                                                  //페이지네이션 전체를 감싸는. 여는 태그
        $config['full_tag_close'] = '</div>';                                                               //페이지네이션 전체를 감싸는. 닫는 태그

        $config['first_link'] = '맨 처음 목록으로 이동';                                                      //맨 처음으로 이동. 표시
        $config['first_tag_open'] = '<span class="first" title="맨 처음 목록으로 이동">';                     //맨 처음으로 이동. 여는 태그
        $config['first_tag_close'] = '</span>';                                                             //맨 처음으로 이동. 닫는 태그

        $config['last_link'] = '맨 마지막 목록으로 이동';                                                     //맨 마지막으로 이동. 표시
        $config['last_tag_open'] = '<span class="last" title="맨 마지막 목록으로 이동">';                     //맨 마지막으로 이동. 여는 태그
        $config['last_tag_close'] = '</span>';                                                              //맨 마지막으로 이동. 닫는 태그

        $config['prev_link'] = '이전 목록으로 이동';                                                          //이전 페이지로 이동. 표시
        $config['prev_tag_open'] = '<span class="prev" title="이전 목록으로 이동">';                          //이전 페이지로 이동. 여는 태그
        $config['prev_tag_close'] = '</span>';                                                              //이전 페이지로 이동. 닫는 태그
        $config['next_link'] = '다음 목록으로 이동';                                                          //다음 페이지로 이동. 표시
        $config['next_tag_open'] = '<span class="next" title="다음 목록으로 이동">';                          //다음 페이지로 이동. 여는 태그
        $config['next_tag_close'] = '</span>';                                                               //다음 페이지로 이동. 닫는 태그
        $config['cur_tag_open'] = '<a href="#none" class="on">';                                             //현재 페이지 링크. 여는 태그
        $config['cur_tag_close'] = '</a>';                                                                   //현재 페이지 링크. 닫는 태그

		//페이지네이션 관련
		$this->pagination->initialize($config);                                                              //초기화
		$page = ($this->uri->segment(3))? $this->uri->segment(3):0; 		                                 

		//페이지네이션,공지사항글 모델로 부터 받아와서 뷰로 전달
		$data['pagination'] = $this->pagination->create_links();                                             //페이지네이션 data
	    echo '<xmp>'; print_r($data['pagination']); echo '</xmp>';
	    $data['notice_list']  = $this->notice_m->notice_list($config['per_page'], $page);                    //공지사항 목록 data
		$this->load->view('html/mypage/client/notice/notice_list_v.php',$data);
	}

 

 다음글 Trying to get property 'load' ... (4)
 이전글 uri route 질문드려요 (1)

댓글

없음