Responsivness bugs with the absolute property

Hi, here is the code. The problem i am having is with the blogpost and imagewtext divs: it’s just not responsive and doesn’t stay in place

<div class="row text-center">
        <div class="imageWtext">
          <img class="fullWidthImage" src="" alt="">
          <h1>We are here to make it easy for you</h1>
<div class="blog-post">
            <h3>Blog article</h3>
            <img src="" alt="">
            <a href="about.html" class="button">Learn More</a>


	position: relative;

.blog-post> h3{
	position: absolute; 
   top: 150px; 
   left: 0; 
   width: 90%; 
   color: white; 
   font: bold 24px/45px Helvetica, Sans-Serif; 
   letter-spacing: -1px;  
   background: rgb(0, 0, 0); /* fallback color */
   background: rgba(0, 0, 0, 0.7);
   padding: 10px; 
.blog-post> a{
	position: absolute; 
    top: 200px; 
    left: 200px; 
.blog-post> img{
	border-radius: 5px;


The code that you’ve posted does not allow me to emulate the issue. It would be better if you could post a link to the site of a “working page” that includes enough relevant code to actually demonstrate the issue (then we can see what you see) and with a more complete description, perhaps tell what you expect to see).



here it is : everything is on the other things when it comes to the imageWtext and blog-post

It’s difficult to help without knowing exactly how you intend this layout to work for different sizes.
But as a general rule of thumb, it is best to avoid absolute positioning as much as possible in RWD because it will cause problems.
It’s far better to keep as much as possible in the natural document flow, to keep things fluid. Avoid magic numbers, fixed heights and widths. Such rigid rules will make the layout brittle and it will be prone to breaking when anything moves.


then whats the best way to put a text over an image on a certain place, or a button in a bottom right? isn’t absolute the only way?

The problem is, too much is absolute, your containers are absolute and use px positioning (magic numbers). If you must use absolute, keep it to a minimum and avoid magic numbers.
It may be that background images could work in this case.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.