Solved

How to keep images stationary when browser window is resized.

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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

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…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this Micro Tutorial users will learn how to embed custom fonts into websites using @font-face in CSS Select a font: Ensure the EULA allows you to use @font-face: Download the font: Get the browser-compatible files you need: Edit your CSS       - Name …
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…

757 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now