-
center all help
Hi,
I am a desinger who is just begging to learn HTML, I found this code for centering a page but I don’t know where i should insert the code. below is a link to the page I am working on. And below that is the text file accompanying the code. i have the java file in the same directory as my HTML file. just don’t know where to put the two lines of code. Also what name should I use for the. can i assign a new name or do i use the name that image ready has assigned?thanks for taking the time to read this and any help would be appreciated.
Ponyack
link to page: https://art-boy-inc.com/verticalhelp/
text file for the center all:
Script Instructions – Center All
================================Setup Instructions:
Within the HTML of any page you want this script to run, add this line:Place the above at the very end of your HTML file, just before
the tag. Note that this assumes that the JavaScript
file is in the same directory as your HTML file. If this is
not the case then change the src attribute in the usual fashion
(I assume you know how to do this, if not email me).Now you need to decide which elements in your HTML you want to center.
For each one, you have to given them a unique ID value, like this:blah blahThen open up the JavaScript file, center_all.js. Notice that the
ID values of the three DIVs in my example are listed in the array
‘objID’. Amend this array to name the ID values of the elements you have
chosen.