Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 2 of 2
  1. #1
    Junior Member
    Join Date
    Apr 2016
    Posts
    1
    Member #
    53896

    text and img problem

    hey guys ... iam kinda new to web design and iam using bootstrap and iam facing a problem
    in this code
    <div class="section2">
    <div class="background">
    <img src="#" width="100%" height="100%" alt="">
    <div class="container">
    <div class="row">
    <div class="text">
    <h3>hello</h3>
    <h1>World</h1>
    </div>
    </div>
    </div>
    </div>
    </div>
    in section 2 ... i got this image ... and i want to but a text on the top of that img with out using postion top ... iam using margin so i can do responsive web
    the problem is no matter what i try image always take a whole div and despite putting the text div inside the back ground div it always be under the pic ... and i want the text to be on the top of the pic
    so is there anyway i can do that other than using negative margin ?!!!!

  2.  

  3. #2
    Junior Member cocoondesign's Avatar
    Join Date
    Mar 2016
    Location
    Malaysia
    Posts
    8
    Member #
    53549
    Liked
    1 times
    Hi Mina, what you have to do is to remove DIV with "background" class (its closing tag as well), and instead of inserting image using inline HTML, use CSS to apply the same image as background image (suggest to set background-size to cover, learn more here ) to DIV with class "text".


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 02:36 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com