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

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?
LVL 2
brgdotnetcontractorAsked:
Who is Participating?
 
COBOLdinosaurConnect With a Mentor Commented:
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
 
Kim WalkerWeb Programmer/TechnicianCommented:
Can you provide a link to a live page so we can see what's happening?
0
 
brgdotnetcontractorAuthor Commented:
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
All Courses

From novice to tech pro — start learning today.