Solved

How to keep images stationary when browser window is resized.

Posted on 2013-06-18
4
413 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 150 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 150 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

So you have coded your own WordPress plugin and now you want to allow users to upload images to a folder in the plugin folder rather than the default media location? Follow along and this article will show you how to do just that!
CSS is a visual language used to classify objects and define rules about how they should be displayed. CSS skills aren’t restricted to developers anymore, there is a big benefit to having a basic understanding of the language, regardless of your occ…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Suggested Courses

615 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