Solved

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

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

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.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

733 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