2026, 새로운 도약을 시작합니다.

텍스트 정렬... 채택완료

    <div class="main_image">
        <img src="/thema/Basic/images/fixer1.jpg" width="100%" height="100%">
        <h1 class="main_image_text">
        <a href="<?php echo G5_BBS_URL;?>/board.php?bo_table=notice" style="font-size:50px; color: white;">현식재단사</a>
        </h1>
        <h2 class="main_image_text2" style="font-size:30px">손쉽게 신체사이즈 알맞게 측정하는 방법</h2>
        <h3 class="main_image_text3" style="font-size:20px">보통 집에 줄자 가지고 계신가요? 없는분들 많을거라 생각합니다. 그렇다면 손쉽게 신체사이즈 알맞게 측정 하는 방법 하나씩 배워보겠습니다. </h2>
</div>

  <style>
  .main_image {
    position: relative;
  }
  .main_image_text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate( -50%, -50% );
    color: white;
  }
  </style>

    <style>
  .main_image {
    position: relative;
  }
  .main_image_text2 {
    position: absolute;
    top: 53%;
    left: 20%;
    transform: translate( -50%, -50% );
    color: white;
  }
  </style>

    <style>
  .main_image {
    position: relative;
  }
  .main_image_text3 {
    position: absolute;
    top: 56%;
    left: 20%;
    transform: translate( -50%, -50% );
    text-align:center;
    color: white;
  }
  </style>

이미지 안에서 H1은 중앙 정렬을 두고 h2 부터는 이미지의 좌측부터 맞추고 싶은데... 어떻게 설정해야 되나요 ㅠㅠ 정렬이 안되서 고수님들 부탁드리겠습니다. 구글링에서 찾지 못해서 ㅠㅠ 이렇게 글남깁니다.

답변 1개

채택된 답변
+20 포인트
Copy








    

    

    Document

    

      html,body{

        width: 100%;

        height: 100%;

      }

      .main_image {

        position: relative;

        height: 100%;

        background: url("/thema/Basic/images/fixer1.jpg") center center no-repeat;

      }

      .main_image_text {

        text-align: center;

      }

      .main_image_text a {

        color: #fff;

        font-size: 50px;

      }

      .main_image_text2 {

        color: #fff;

        font-size: 30px;

      }

      .main_image_text3 {

        color: #fff;

        font-size: 20px;

      }

      





  

    

      

정렬은 앱솔루트로 쓰지마세요 정말 안좋은 버릇입니다.

이미지 때문에 어쩔 수 없는 거라면 배경으로 사용하시면 됩니다.

로그인 후 평가할 수 있습니다

답변에 대한 댓글 2개

도움주셔서 진심으로 감사합니다 해결 완료되었습니다
모바일버전에서는 짤리는 부분이 있는데 혹시 어떻게 해야 하나요..

댓글을 작성하려면 로그인이 필요합니다.

답변을 작성하려면 로그인이 필요합니다.

로그인
🐛 버그신고