logo
Tags down

shadow

CSS - Image overlaps text


By : George van Huggs the
Date : August 01 2020, 08:00 AM
this will help
Please do not use float for layout purposes. There are other solutions for that ( grid or flexbox )
code :
body {
  background-color: #ff0000 !important;
  padding: 0px;
  margin: 0px;
  overflow-x: hidden;
}

#page-start {
  height: 100vh;
}

#page-content {
  padding-top: 68px !important;
}


#lower-text {
  color: #fff;
  font-size: 68px;
  font-weight: 500;
  margin: 20px 0px 120px 0;

}

#page-content {
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
}

#main-pic {
  background-image: url('https://images.pexels.com/photos/736230/pexels-photo-736230.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500');
  width: 100%;
  height: 920px;
  background-size: cover;
  background-repeat: no-repeat;
  margin-right: auto;
  margin-bottom: 50px;
}


@media only screen and (max-width: 414px) {



  #info {
    position: relative;
    font-weight: 500;
    line-height: 1.29;
  }

  #lower-text {
    font-size: 21px;
    width: 305px;
    height: 178px;
    margin-top: 0 !important;
    line-height: 1.29;
    margin-bottom: 10px;
  }

  #page-start {
    height: 60vh;
  }

  #page-content {
    flex-direction: column-reverse;
  }


}
<!doctype html>
<html lang="en">

  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0" />
    <title>FEEV</title>
    <link rel="stylesheet" href="css/styles.css">
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
    <link rel="stylesheet" href="css/queries.css">
  </head>

  <body>
    <div class="container-fluid" style="margin: 0">
      <div id="lower-text">
        <div class="row">
          <div class="col-xs-2 col-md-2"></div>
          <div class="col-xs-10 col-md-10" id="page-content" style="margin: 0px; padding: 0px">
            <span id="info">
              some text1 some text2 some text3 some text4 some text5 some tex6 some text7 some text8 some text9 some text10 some text11 some text12 some text13
            </span>
            <div id="main-pic"></div>
          </div>
        </div>
      </div>
    </div>
  </body>

</html>


Share : facebook icon twitter icon

NSPopUpButton text overlaps menu image


By : aptoon
Date : March 29 2020, 07:55 AM
hope this fix your issue It just so happens this is a simple fix. ( Beelsebob on irc.freenode.net!) Basically, you need to have the following code:
code :
[[accessoryView cell] setArrowPosition:NSPopUpArrowAtBottom];

Erasing part of an image that overlaps with text from a UILabel


By : Archiperre
Date : March 29 2020, 07:55 AM
this one helps. Assuming you are already through with moving your imageView around the screen. Let me proceed with what to do.
When you touch the imageView. Change the Image in it using the code that I am going to provide. Once you are done moving the imageView, replace the new image with the old Image
code :
-(UIImage *)customImage:(NSString *)cellImageName withText:(NSString *)badgeText textColor:(UIColor*)color {
    UIImage *bottomImage = [UIImage imageNamed:cellImageName];
    //Change the font size to change text size
    CGSize stringSize = [badgeText sizeWithFont:[UIFont systemFontOfSize:[UIFont systemFontSize]]];

    UIImage *image = nil;
    UIGraphicsBeginImageContextWithOptions(bottomImage.size, NO, 0.0);
    CGRect imageRect = CGRectMake(0.0f, 0.0f, bottomImage.size.width, bottomImage.size.height);
    [bottomImage drawInRect:imageRect];
    //the color that u want the text to have
    [color set];
    //change this textRect to change the position of text on image
    CGRect textRect = CGRectMake((bottomImage.size.width - stringSize.width)/2.0f, bottomImage.size.height - stringSize.height, stringSize.width, stringSize.height);
    [badgeText drawInRect:textRect withFont:[UIFont systemFontOfSize:[UIFont systemFontSize]]];
    image = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();

    return image;
}
-(void)createAlphaClippedImage {
    UIImageView *imageView = nil;//this will b your imageView, property that u are holding to
    UILabel *label = nil;//this will be your label, property that u are holding to

    if (CGRectIntersectsRect(imageView.frame, label.frame)) {
        UIImage *bottomImage = imageView.image;

        UIImage *image = nil;
        UIGraphicsBeginImageContextWithOptions(bottomImage.size, NO, 0.0);
        CGRect imageRect = CGRectMake(0.0f, 0.0f, bottomImage.size.width, bottomImage.size.height);
        [bottomImage drawInRect:imageRect];
        //the color that u want the text to have
        [[UIColor clearColor] set];
        //change this textRect to change the position of text on image
        CGRect textRect = CGRectMake(CGRectGetMinX(label.frame) - CGRectGetMinX(imageView.frame), CGRectGetMinY(label.frame) - CGRectGetMinY(imageView.frame), CGRectGetWidth(label.frame), CGRectGetHeight(label.frame));
        [label.text drawInRect:textRect withFont:label.font];
        image = UIGraphicsGetImageFromCurrentImageContext();
        UIGraphicsEndImageContext();

        imageView.image = image;
    }
}

TCPDF Text overlaps image


By : Omid Zardkoohi
Date : March 29 2020, 07:55 AM
seems to work fine Have you considered using HTML2PDF, instead of TCPDF? The syntax is mostly identical, and the amount of supported CSS is much greater. You could use margin-top or padding-top to distance the span further from the image.

Floats overlaping text overlaps image


By : Ochazuki
Date : March 29 2020, 07:55 AM
To fix this issue You're floating the two elements next to each other so that they will never overlap, but the problem is that you have no code controlling how the image itself behaves. What you need to do is ensure that the image never escapes the bounds of its parent:
code :
article img {
  max-width: 100%;
  max-height: 100%;
}

Image overlaps the text block


By : user3251555
Date : March 29 2020, 07:55 AM
Hope this helps Welcome to Stack Overflow! Nice to have your question, it looks like you simply need to handle the CSS Layout and still want it to be browser-width-friendly, or cross-device. I suggest learning Flexbox CSS Layout. Take your time learning the guides, this may be helpful for a quick start.
code :
article{display:flex}
.container{flex-direction:column}
p {width: 300px; flex-grow:3}
img {width:300px; flex-grow: 4}
<article> 
<div class="container">
<h1>I'm title here</h1>
<p>Lorem, ipsum dolor sit amet consectetur adipisicing elit. Fugiat ullam nulla officiis magnam quos repellat aliquam, nam eaque aspernatur modi possimus expedita dolores rem hic veniam quis veritatis repudiandae perspiciatis mollitia ipsam labore iusto! Corrupti qui asperiores facilis unde! Asperiores facere id ullam quod magnam animi laboriosam voluptates obcaecati modi possimus perspiciatis ad vero, esse fugit sint ab hic eligendi tenetur deleniti omnis ipsam nobis illum placeat! Sunt id quaerat impedit laborum ratione aperiam quo est quis eveniet dolor non, explicabo ab esse voluptate corporis minima omnis quae necessitatibus natus architecto distinctio. Asperiores officiis minima, quasi esse mollitia vel pariatur atque reiciendis laudantium cum, amet non delectus nemo suscipit error?<br><br> Laudantium incidunt voluptate sequi consequuntur cum magni sapiente maiores eos iure provident totam iste vel similique excepturi ipsam ipsum nobis unde deleniti nisi ullam, vero, quam quos. Labore tenetur consectetur commodi eius neque deleniti fugit quae ad iusto, eveniet aliquam quam itaque dignissimos, iure sit facilis voluptates laudantium quos consequuntur corporis vitae consequatur. Dolor tenetur placeat ad quasi earum nesciunt? Doloribus sint ex, repellat atque ipsa inventore voluptatem consequatur quaerat nemo suscipit magni harum fugiat ad perspiciatis alias provident. Facere reprehenderit quis praesentium delectus in architecto incidunt blanditiis accusantium molestiae culpa. Reprehenderit iste nulla eius placeat sunt quae laboriosam earum veritatis veniam molestias optio dignissimos nisi eaque, ea dolorem possimus debitis molestiae iusto beatae officiis? Officiis delectus, corporis vel facilis nisi eius quae recusandae quaerat officia deleniti sint adipisci, necessitatibus accusantium quis optio sequi. Explicabo harum vel alias perferendis quisquam.</p>
</div>
<img src="https://cdn.pixabay.com/photo/2019/09/05/20/30/girl-4455005_960_720.jpg" alt="Girl with a Horse">
</article>
shadow
Privacy Policy - Terms - Contact Us © voile276.org