Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3677742
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T03:15:31+00:00 2026-05-19T03:15:31+00:00

I am having some weird problems trying to position the h3 tag over the

  • 0

I am having some weird problems trying to position the h3 tag over the image .featured-image(Sitting on top of the image). When I try position: absolute; .. If the content in <p> is more or less, the h3 will move from its position. If I try position: relative; theres a big gap from the image and if I tried to margin <p> closer or farther, the position also moves. If I wrap another div around the h3 tag with position relative; and then leave h3 as position: absolute;. It fixes it but that seems such a hack.

HTML:

 <section class="featured">
              <h1><img src="images/icon-featured.png" width="24px" height="23px" alt="Featured Site Icon"> Featured Site </h1>
              <div class="image-wrap">
                <a href="#">
                  <img class="featured-image" src="images/content-images/image.jpg" width="399px" height= "37px" alt="" />
                </a>
                <h3> Lorem Ipsum </h3>
              </div> <!-- image-wrap -->
              <p> 
                <a href="#">Lorem Ipsum</a> dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor.
                incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud.
                exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
              </p>
        </section><!-- .featured -->

CSS

article h1 img { margin: 0 5px 0 0; }
article .featured { }
article .featured h1 {  }
article .featured .image-wrap { margin: 27px 0 0 0; text-align: center; }
article .featured .image-wrap img { border: 1px solid #8e8d8e; -webkit-box-shadow: 0 0 14px rgba(0, 0, 0, .4); -moz-box-shadow: 0 0 14px rgba(0, 0, 0, .4);
   -o-box-shadow: 0 0 14px rgba(0, 0, 0, .4); box-shadow: 0 0 14px rgba(0, 0, 0, .4); }

article .featured .image-wrap h3 { background: rgba(23, 23, 23, .5); bottom: 66px; font-size: 23px; padding: 10px; position: relative; left: 190px;
   text-align: right; width: 230px;  }

article .featured p { margin: 25px auto; padding: 10px; width: 380px; }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T03:15:31+00:00Added an answer on May 19, 2026 at 3:15 am

    Position .image-wrap relatively, but without any left/right/top/bottom properties. Then, position the h3 absolutely and move it to where you want it.

    The problem you’re encountering is that absolutely positioned elements have to be contained in a non-statically positioned ancestor element, otherwise it defaults to positioning it relative to the html element (that’s probably why it was affected by the following paragraph). Relatively positioned elements are still part of the page flow, so the space relatively positioned elements would originally have taken up is preserved. That’s the extra space you’re seeing.

    The w3c has a nice intro to css positioning: http://www.w3schools.com/css/css_positioning.asp, as does this page: http://www.barelyfitz.com/screencast/html-training/css/positioning/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having some problems with a weird HTTP status code in MSIE8. I send
I’m having some woes regarding the tag. My website has a bit of a
I'm having some weird issues with dynamically populating a table in Javascript. Behold the
Having some problems getting JSTree to work with IE7 and 8. It works great
I'm having quite a weird problem here. I have just pasted the Yii folder
I'm having some trouble with a script confirmation. By standard it's set to hide
Problem, simple and annoying. Im just trying to print a list of names, collected
I'll try and provide what information I can, I'm not entirely sure what would
I'm having trouble getting a field which is in an object which is inside
I'm running Visual Studio 2010 on a terminal server, and have been, with relatively

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.