Solved

How to resize hyperlink control locations on a web page using Java Script and CSS ?

Posted on 2013-05-12
3
250 Views
Last Modified: 2013-05-19
I have some web pages with hyperlinks at the top of the web pages in my website, which serve as the website navigation. On each page in my Java Script, I customize the location of the hyperlinks using Java script and CSS. Example :

    document.getElementById('CredentialsLink').style.marginLeft = "885px";
 
    document.getElementById('CredentialsLink').style.marginRight = "67px";
 
    document.getElementById('RenterLink').style.marginRight = "75px";

The problem is that the links will align differently if the browser is even slightly resized (Ctrl ++, or CTRL -- are examples)

Also the locations will be slightly different in different web browsers. How can I make it so that my links are located in a standard location on the page, even if the page is resized?
0
Comment
Question by:brgdotnet
3 Comments
 
LVL 22

Expert Comment

by:Kim Walker
ID: 39162033
Can you provide a link to a live page so we can see what's happening?
0
 
LVL 2

Author Comment

by:brgdotnet
ID: 39163569
Hello, unfortunately, No,

You see, this is an intranet application I am creating for a company, and it will not be visible to the world.
0
 
LVL 53

Accepted Solution

by:
COBOLdinosaur earned 220 total points
ID: 39165391
You can probably try using position:absolute and setting the top and left values, but it is likely that will break something else.  Without seeing the page it is virtually impossible to give advice on a positioning problem.

Cd&
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
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!
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 to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …

839 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