Solved

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

Posted on 2013-05-12
3
253 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
[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
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

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

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!
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
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…
Suggested Courses

623 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