Solved

How to keep images stationary when browser window is resized.

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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
In this tutorial viewers will learn how to customize the background color and font color of highlighted text using the ::selection element in CSS Begin by defining the selected text as an element in CSS by typing "::selection": Style the ::selection…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

734 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