Image spanning to the next div when window size is decreasedWhat is the difference between HTML tags <div> and <span>?Vertically align text next to an image?When to use IMG vs. CSS background-image?Use jQuery to hide a DIV when the user clicks outside of itHow to make a div 100% height of the browser windowHow do I auto-resize an image to fit a 'div' container?How to vertically align an image inside a divCSS border Issue : failing to render left borderRemove space between 2 tables HTML CSS and image removes background imageCannot display HTML string
How can faith be maintained in a world of living gods?
Are programming languages necessary/useful for operations research practitioner?
What is this sticking out of my wall?
Supervisor wants me to support a diploma-thesis software tool after I graduated
Methods and Feasibility of Antimatter Mining?
How do we create our own symbolisms?
Is every sentence we write or utter either true or false?
Can you pop microwave popcorn on a stove?
How strong is aircraft-grade spruce?
How to find a reviewer/editor for my paper?
What can we do about our 9-month-old putting fingers down his throat?
Why would an AC motor heavily shake when driven with certain frequencies?
Polygonize slope raster when the output shape weighs more than 4 gigas?
How there are 3 possible tautomers of 2,2,4-trimethylheptane-3,5-dione?
Lost & Found Mobile Telepone
After a few interviews, What should I do after told to wait?
What's the biggest difference between these two photos?
Problem with listing a directory to grep
Are there any space probes or landers which regained communication after being lost?
How do you say "to hell with everything" in French?
How to set any file manager in Linux to show the duration like the Length feature in Windows Explorer?
Strategies for dealing with chess burnout?
Change-due function
Is a MySQL database a viable alternative to LDAP?
Image spanning to the next div when window size is decreased
What is the difference between HTML tags <div> and <span>?Vertically align text next to an image?When to use IMG vs. CSS background-image?Use jQuery to hide a DIV when the user clicks outside of itHow to make a div 100% height of the browser windowHow do I auto-resize an image to fit a 'div' container?How to vertically align an image inside a divCSS border Issue : failing to render left borderRemove space between 2 tables HTML CSS and image removes background imageCannot display HTML string
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
So, I have to create this Page where in you get text alongside image displayed as seen in here
But , on minimising the window size the image gets overlapped as seen here
<div class="header1">
<div class="col-md-8">
<h4 class="hedtext">Name</h4>
</br>
<h4 class="hedtext">Address</h4>
</br>
<h4 class="hedtext">Contact Number</h4>
</br>
<h4 class="hedtext">Fax</h4>
</div>
<div class="col-md-4">
<img src="https://images.pexels.com/photos/248797/pexels-photo-248797.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500" class="pull-right img1">
</div>
</div>
and Here is the css
.hedtext
padding-top:10px;
margin-bottom: -19px;
line-height: 2pt;
font-size: 13px;
font-weight: 750;
float: left;
.header1
border: 1px solid black;
height: 150px;
.img1
width: auto;
height: 130px;
padding :10px;
Also, using bootstrap 3 . All i want is that the image goes side by side the text on minimising the window size .
html css bootstrap-4
add a comment |
So, I have to create this Page where in you get text alongside image displayed as seen in here
But , on minimising the window size the image gets overlapped as seen here
<div class="header1">
<div class="col-md-8">
<h4 class="hedtext">Name</h4>
</br>
<h4 class="hedtext">Address</h4>
</br>
<h4 class="hedtext">Contact Number</h4>
</br>
<h4 class="hedtext">Fax</h4>
</div>
<div class="col-md-4">
<img src="https://images.pexels.com/photos/248797/pexels-photo-248797.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500" class="pull-right img1">
</div>
</div>
and Here is the css
.hedtext
padding-top:10px;
margin-bottom: -19px;
line-height: 2pt;
font-size: 13px;
font-weight: 750;
float: left;
.header1
border: 1px solid black;
height: 150px;
.img1
width: auto;
height: 130px;
padding :10px;
Also, using bootstrap 3 . All i want is that the image goes side by side the text on minimising the window size .
html css bootstrap-4
you tag bootstrap -4 but in answer wrote bootstrap-3 what do you use?
– לבני מלכה
Mar 28 at 7:41
1
You should tag bootstrap-3 instead of bootstrap-4. Also if you intend to usecol-md-*
, you need arow
class as parent.
– David Liang
Mar 28 at 7:41
The problem here is that you forced the image to a specific width, so that it will eventually become wider than the col-md-4 it is in …
– 04FS
Mar 28 at 7:53
add a comment |
So, I have to create this Page where in you get text alongside image displayed as seen in here
But , on minimising the window size the image gets overlapped as seen here
<div class="header1">
<div class="col-md-8">
<h4 class="hedtext">Name</h4>
</br>
<h4 class="hedtext">Address</h4>
</br>
<h4 class="hedtext">Contact Number</h4>
</br>
<h4 class="hedtext">Fax</h4>
</div>
<div class="col-md-4">
<img src="https://images.pexels.com/photos/248797/pexels-photo-248797.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500" class="pull-right img1">
</div>
</div>
and Here is the css
.hedtext
padding-top:10px;
margin-bottom: -19px;
line-height: 2pt;
font-size: 13px;
font-weight: 750;
float: left;
.header1
border: 1px solid black;
height: 150px;
.img1
width: auto;
height: 130px;
padding :10px;
Also, using bootstrap 3 . All i want is that the image goes side by side the text on minimising the window size .
html css bootstrap-4
So, I have to create this Page where in you get text alongside image displayed as seen in here
But , on minimising the window size the image gets overlapped as seen here
<div class="header1">
<div class="col-md-8">
<h4 class="hedtext">Name</h4>
</br>
<h4 class="hedtext">Address</h4>
</br>
<h4 class="hedtext">Contact Number</h4>
</br>
<h4 class="hedtext">Fax</h4>
</div>
<div class="col-md-4">
<img src="https://images.pexels.com/photos/248797/pexels-photo-248797.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500" class="pull-right img1">
</div>
</div>
and Here is the css
.hedtext
padding-top:10px;
margin-bottom: -19px;
line-height: 2pt;
font-size: 13px;
font-weight: 750;
float: left;
.header1
border: 1px solid black;
height: 150px;
.img1
width: auto;
height: 130px;
padding :10px;
Also, using bootstrap 3 . All i want is that the image goes side by side the text on minimising the window size .
html css bootstrap-4
html css bootstrap-4
edited Mar 28 at 8:31
SirPeople
2,58612 silver badges31 bronze badges
2,58612 silver badges31 bronze badges
asked Mar 28 at 7:35
amit solankiamit solanki
1
1
you tag bootstrap -4 but in answer wrote bootstrap-3 what do you use?
– לבני מלכה
Mar 28 at 7:41
1
You should tag bootstrap-3 instead of bootstrap-4. Also if you intend to usecol-md-*
, you need arow
class as parent.
– David Liang
Mar 28 at 7:41
The problem here is that you forced the image to a specific width, so that it will eventually become wider than the col-md-4 it is in …
– 04FS
Mar 28 at 7:53
add a comment |
you tag bootstrap -4 but in answer wrote bootstrap-3 what do you use?
– לבני מלכה
Mar 28 at 7:41
1
You should tag bootstrap-3 instead of bootstrap-4. Also if you intend to usecol-md-*
, you need arow
class as parent.
– David Liang
Mar 28 at 7:41
The problem here is that you forced the image to a specific width, so that it will eventually become wider than the col-md-4 it is in …
– 04FS
Mar 28 at 7:53
you tag bootstrap -4 but in answer wrote bootstrap-3 what do you use?
– לבני מלכה
Mar 28 at 7:41
you tag bootstrap -4 but in answer wrote bootstrap-3 what do you use?
– לבני מלכה
Mar 28 at 7:41
1
1
You should tag bootstrap-3 instead of bootstrap-4. Also if you intend to use
col-md-*
, you need a row
class as parent.– David Liang
Mar 28 at 7:41
You should tag bootstrap-3 instead of bootstrap-4. Also if you intend to use
col-md-*
, you need a row
class as parent.– David Liang
Mar 28 at 7:41
The problem here is that you forced the image to a specific width, so that it will eventually become wider than the col-md-4 it is in …
– 04FS
Mar 28 at 7:53
The problem here is that you forced the image to a specific width, so that it will eventually become wider than the col-md-4 it is in …
– 04FS
Mar 28 at 7:53
add a comment |
3 Answers
3
active
oldest
votes
First you have forgot to add the .row class div which bootstrap requires to wrap around the columns to work correctly.
I removed .pull-right and instead just added text-right to the column. You can also use floats though or whatever to set the image to the right side however you wish.
<div class="header1 row">
<div class="col-md-8">
<h4 class="hedtext">Name</h4>
</br>
<h4 class="hedtext">Address</h4>
</br>
<h4 class="hedtext">Contact Number</h4>
</br>
<h4 class="hedtext">Fax</h4>
</div>
<div class="col-md-4 text-right">
<img src="https://images.pexels.com/photos/248797/pexels-photo-248797.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500"
class="img1">
</div>
</div>
add a comment |
- You have to wrap
col
inrow
- Remove the
.hedtext
-float
(bootstrap worry about float) - Remove
.header1
height: 130px;
(It the reason image out of border)
See working code
.hedtext
line-height: 2pt;
font-size: 13px;
font-weight: 750;
.row
border: 1px solid black;
.img1
width: auto;
height: 130px;
padding: 10px;
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script>
<div class="container">
<div class="row">
<div class="col-md-8">
<h4 class="hedtext">Name</h4>
<h4 class="hedtext">Address</h4>
<h4 class="hedtext">Contact Number</h4>
<h4 class="hedtext">Fax</h4>
</div>
<div class="col-md-4">
<img src="https://images.pexels.com/photos/248797/pexels-photo-248797.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500" class="img1">
</div>
</div>
</div>
add a comment |
you have to add responsive class in div like col-xs-*
for responsive
do this for your solution
<div clss="row">
<div class="header1">
<div class="col-md-8 col-xs-8">
<h4 class="hedtext">Name</h4>
</br>
<h4 class="hedtext">Address</h4>
</br>
<h4 class="hedtext">Contact Number</h4>
</br>
<h4 class="hedtext">Fax</h4>
</div>
<div class="col-md-4 col-xs-4">
<img src="https://images.pexels.com/photos/248797/pexels-photo-248797.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500"
class="pull-right img1">
</div>
</div>
</div>
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55392296%2fimage-spanning-to-the-next-div-when-window-size-is-decreased%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
First you have forgot to add the .row class div which bootstrap requires to wrap around the columns to work correctly.
I removed .pull-right and instead just added text-right to the column. You can also use floats though or whatever to set the image to the right side however you wish.
<div class="header1 row">
<div class="col-md-8">
<h4 class="hedtext">Name</h4>
</br>
<h4 class="hedtext">Address</h4>
</br>
<h4 class="hedtext">Contact Number</h4>
</br>
<h4 class="hedtext">Fax</h4>
</div>
<div class="col-md-4 text-right">
<img src="https://images.pexels.com/photos/248797/pexels-photo-248797.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500"
class="img1">
</div>
</div>
add a comment |
First you have forgot to add the .row class div which bootstrap requires to wrap around the columns to work correctly.
I removed .pull-right and instead just added text-right to the column. You can also use floats though or whatever to set the image to the right side however you wish.
<div class="header1 row">
<div class="col-md-8">
<h4 class="hedtext">Name</h4>
</br>
<h4 class="hedtext">Address</h4>
</br>
<h4 class="hedtext">Contact Number</h4>
</br>
<h4 class="hedtext">Fax</h4>
</div>
<div class="col-md-4 text-right">
<img src="https://images.pexels.com/photos/248797/pexels-photo-248797.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500"
class="img1">
</div>
</div>
add a comment |
First you have forgot to add the .row class div which bootstrap requires to wrap around the columns to work correctly.
I removed .pull-right and instead just added text-right to the column. You can also use floats though or whatever to set the image to the right side however you wish.
<div class="header1 row">
<div class="col-md-8">
<h4 class="hedtext">Name</h4>
</br>
<h4 class="hedtext">Address</h4>
</br>
<h4 class="hedtext">Contact Number</h4>
</br>
<h4 class="hedtext">Fax</h4>
</div>
<div class="col-md-4 text-right">
<img src="https://images.pexels.com/photos/248797/pexels-photo-248797.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500"
class="img1">
</div>
</div>
First you have forgot to add the .row class div which bootstrap requires to wrap around the columns to work correctly.
I removed .pull-right and instead just added text-right to the column. You can also use floats though or whatever to set the image to the right side however you wish.
<div class="header1 row">
<div class="col-md-8">
<h4 class="hedtext">Name</h4>
</br>
<h4 class="hedtext">Address</h4>
</br>
<h4 class="hedtext">Contact Number</h4>
</br>
<h4 class="hedtext">Fax</h4>
</div>
<div class="col-md-4 text-right">
<img src="https://images.pexels.com/photos/248797/pexels-photo-248797.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500"
class="img1">
</div>
</div>
answered Mar 28 at 7:48
BubalubsBubalubs
112 bronze badges
112 bronze badges
add a comment |
add a comment |
- You have to wrap
col
inrow
- Remove the
.hedtext
-float
(bootstrap worry about float) - Remove
.header1
height: 130px;
(It the reason image out of border)
See working code
.hedtext
line-height: 2pt;
font-size: 13px;
font-weight: 750;
.row
border: 1px solid black;
.img1
width: auto;
height: 130px;
padding: 10px;
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script>
<div class="container">
<div class="row">
<div class="col-md-8">
<h4 class="hedtext">Name</h4>
<h4 class="hedtext">Address</h4>
<h4 class="hedtext">Contact Number</h4>
<h4 class="hedtext">Fax</h4>
</div>
<div class="col-md-4">
<img src="https://images.pexels.com/photos/248797/pexels-photo-248797.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500" class="img1">
</div>
</div>
</div>
add a comment |
- You have to wrap
col
inrow
- Remove the
.hedtext
-float
(bootstrap worry about float) - Remove
.header1
height: 130px;
(It the reason image out of border)
See working code
.hedtext
line-height: 2pt;
font-size: 13px;
font-weight: 750;
.row
border: 1px solid black;
.img1
width: auto;
height: 130px;
padding: 10px;
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script>
<div class="container">
<div class="row">
<div class="col-md-8">
<h4 class="hedtext">Name</h4>
<h4 class="hedtext">Address</h4>
<h4 class="hedtext">Contact Number</h4>
<h4 class="hedtext">Fax</h4>
</div>
<div class="col-md-4">
<img src="https://images.pexels.com/photos/248797/pexels-photo-248797.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500" class="img1">
</div>
</div>
</div>
add a comment |
- You have to wrap
col
inrow
- Remove the
.hedtext
-float
(bootstrap worry about float) - Remove
.header1
height: 130px;
(It the reason image out of border)
See working code
.hedtext
line-height: 2pt;
font-size: 13px;
font-weight: 750;
.row
border: 1px solid black;
.img1
width: auto;
height: 130px;
padding: 10px;
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script>
<div class="container">
<div class="row">
<div class="col-md-8">
<h4 class="hedtext">Name</h4>
<h4 class="hedtext">Address</h4>
<h4 class="hedtext">Contact Number</h4>
<h4 class="hedtext">Fax</h4>
</div>
<div class="col-md-4">
<img src="https://images.pexels.com/photos/248797/pexels-photo-248797.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500" class="img1">
</div>
</div>
</div>
- You have to wrap
col
inrow
- Remove the
.hedtext
-float
(bootstrap worry about float) - Remove
.header1
height: 130px;
(It the reason image out of border)
See working code
.hedtext
line-height: 2pt;
font-size: 13px;
font-weight: 750;
.row
border: 1px solid black;
.img1
width: auto;
height: 130px;
padding: 10px;
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script>
<div class="container">
<div class="row">
<div class="col-md-8">
<h4 class="hedtext">Name</h4>
<h4 class="hedtext">Address</h4>
<h4 class="hedtext">Contact Number</h4>
<h4 class="hedtext">Fax</h4>
</div>
<div class="col-md-4">
<img src="https://images.pexels.com/photos/248797/pexels-photo-248797.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500" class="img1">
</div>
</div>
</div>
.hedtext
line-height: 2pt;
font-size: 13px;
font-weight: 750;
.row
border: 1px solid black;
.img1
width: auto;
height: 130px;
padding: 10px;
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script>
<div class="container">
<div class="row">
<div class="col-md-8">
<h4 class="hedtext">Name</h4>
<h4 class="hedtext">Address</h4>
<h4 class="hedtext">Contact Number</h4>
<h4 class="hedtext">Fax</h4>
</div>
<div class="col-md-4">
<img src="https://images.pexels.com/photos/248797/pexels-photo-248797.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500" class="img1">
</div>
</div>
</div>
.hedtext
line-height: 2pt;
font-size: 13px;
font-weight: 750;
.row
border: 1px solid black;
.img1
width: auto;
height: 130px;
padding: 10px;
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script>
<div class="container">
<div class="row">
<div class="col-md-8">
<h4 class="hedtext">Name</h4>
<h4 class="hedtext">Address</h4>
<h4 class="hedtext">Contact Number</h4>
<h4 class="hedtext">Fax</h4>
</div>
<div class="col-md-4">
<img src="https://images.pexels.com/photos/248797/pexels-photo-248797.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500" class="img1">
</div>
</div>
</div>
answered Mar 28 at 7:48
לבני מלכהלבני מלכה
12k1 gold badge11 silver badges30 bronze badges
12k1 gold badge11 silver badges30 bronze badges
add a comment |
add a comment |
you have to add responsive class in div like col-xs-*
for responsive
do this for your solution
<div clss="row">
<div class="header1">
<div class="col-md-8 col-xs-8">
<h4 class="hedtext">Name</h4>
</br>
<h4 class="hedtext">Address</h4>
</br>
<h4 class="hedtext">Contact Number</h4>
</br>
<h4 class="hedtext">Fax</h4>
</div>
<div class="col-md-4 col-xs-4">
<img src="https://images.pexels.com/photos/248797/pexels-photo-248797.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500"
class="pull-right img1">
</div>
</div>
</div>
add a comment |
you have to add responsive class in div like col-xs-*
for responsive
do this for your solution
<div clss="row">
<div class="header1">
<div class="col-md-8 col-xs-8">
<h4 class="hedtext">Name</h4>
</br>
<h4 class="hedtext">Address</h4>
</br>
<h4 class="hedtext">Contact Number</h4>
</br>
<h4 class="hedtext">Fax</h4>
</div>
<div class="col-md-4 col-xs-4">
<img src="https://images.pexels.com/photos/248797/pexels-photo-248797.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500"
class="pull-right img1">
</div>
</div>
</div>
add a comment |
you have to add responsive class in div like col-xs-*
for responsive
do this for your solution
<div clss="row">
<div class="header1">
<div class="col-md-8 col-xs-8">
<h4 class="hedtext">Name</h4>
</br>
<h4 class="hedtext">Address</h4>
</br>
<h4 class="hedtext">Contact Number</h4>
</br>
<h4 class="hedtext">Fax</h4>
</div>
<div class="col-md-4 col-xs-4">
<img src="https://images.pexels.com/photos/248797/pexels-photo-248797.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500"
class="pull-right img1">
</div>
</div>
</div>
you have to add responsive class in div like col-xs-*
for responsive
do this for your solution
<div clss="row">
<div class="header1">
<div class="col-md-8 col-xs-8">
<h4 class="hedtext">Name</h4>
</br>
<h4 class="hedtext">Address</h4>
</br>
<h4 class="hedtext">Contact Number</h4>
</br>
<h4 class="hedtext">Fax</h4>
</div>
<div class="col-md-4 col-xs-4">
<img src="https://images.pexels.com/photos/248797/pexels-photo-248797.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500"
class="pull-right img1">
</div>
</div>
</div>
answered Mar 28 at 8:59
kartik radadiyakartik radadiya
1347 bronze badges
1347 bronze badges
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55392296%2fimage-spanning-to-the-next-div-when-window-size-is-decreased%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
you tag bootstrap -4 but in answer wrote bootstrap-3 what do you use?
– לבני מלכה
Mar 28 at 7:41
1
You should tag bootstrap-3 instead of bootstrap-4. Also if you intend to use
col-md-*
, you need arow
class as parent.– David Liang
Mar 28 at 7:41
The problem here is that you forced the image to a specific width, so that it will eventually become wider than the col-md-4 it is in …
– 04FS
Mar 28 at 7:53