Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to keep images stationary when browser window is resized.

Posted on 2013-06-18
4
Medium Priority
?
415 Views
Last Modified: 2013-06-26
Hello  experts, thank you for your time. In my web page I have created my navigation which consists of four images side by side, and underneath these images is a hyperlink.

It works well however if the someone resizes their browser window, then my images and links
are moved around. For example if someone drags the right side of their browser border to the left, resizing it to a very small window, the images do not stay side by side, but instead will start getting stacked above one another.

What can I do to keep my images side by side so that they will not be moved around when the
browser window is resized?




<section>
 
 <img alt="" class="leftMostNavigationImage" id="Register" src="~/Images/Step1.png" width="50" height="50" />
<img alt="" class="leftMostNavigationImage" id="Confirm" src="~/Images/Step2.png" width="50" height="50" />
<img alt="" class="leftMostNavigationImage" id="GiveContactInfo" src="~/Images/Step3.png" width="50" height="50" />
<img alt="" class="leftMostNavigationImage" id="ReviewPage" src="~/Images/Step4.png" width="50" height="50" />
 
 
<div>
 @Html.ActionLink("Register", "Register", "Home", new {  id ="RegisterLink" })
 @Html.ActionLink("Confirm", "Confirm", "Home", new {  id ="ConfirmLink" })
 @Html.ActionLink("GiveContactInfo", "GiveContactInfo", "Home", new { id ="GiveContactInfoLink" })
 @Html.ActionLink("ReviewPage", "ReviewPage", "Home", new { @class = " id ="ReviewPageLink" })
</div>

 </section>
0
Comment
Question by:brgdotnet
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 17

Accepted Solution

by:
OmniUnlimited earned 450 total points
ID: 39258333
Try placing them in a containing div and fixing the width of the div like so:

<div style="width: 200;">
<img alt="" class="leftMostNavigationImage" id="Register" src="~/Images/Step1.png" width="50" height="50" />
<img alt="" class="leftMostNavigationImage" id="Confirm" src="~/Images/Step2.png" width="50" height="50" />
<img alt="" class="leftMostNavigationImage" id="GiveContactInfo" src="~/Images/Step3.png" width="50" height="50" />
<img alt="" class="leftMostNavigationImage" id="ReviewPage" src="~/Images/Step4.png" width="50" height="50" />
</div>

Open in new window

0
 
LVL 7

Assisted Solution

by:rgranlund
rgranlund earned 450 total points
ID: 39263933
in addition to what Omni recommended;
<style>
.image-link{
width:200px;
height:200px;
float:left;
}
</style>

<div class="image-link">
 <img alt="" class="leftMostNavigationImage" id="Register" src="~/Images/Step1.png" width="50" height="50" /><br />
 @Html.ActionLink("Register", "Register", "Home", new {  id ="RegisterLink" })
</div>

<div class="image-link">
<img alt="" class="leftMostNavigationImage" id="Confirm" src="~/Images/Step2.png" width="50" height="50" /><br />
 @Html.ActionLink("Confirm", "Confirm", "Home", new {  id ="ConfirmLink" })
</div>

Open in new window



etc...
0
 
LVL 2

Author Comment

by:brgdotnet
ID: 39264910
Thanks guys. Let me try it out and get back with you. Thanks so much.
0
 
LVL 2

Author Closing Comment

by:brgdotnet
ID: 39280179
Good effore
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
In this tutorial viewers will learn how add a full-size background image to a webpage using CSS3. Create a new HTML document with an internal stylesheet.: In CSS, define the html element to have a background image. Use a high resolution image.: In t…
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
Suggested Courses

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question