aligned to the left

  Legolas 16:51 02 Oct 03
Locked

on my site click here the links within the drop down menu are all aligned to the left I have tried all I know to align them in the center can anyone help with this problem.

  Chris the Ancient 17:11 02 Oct 03

A bit difficult to tell.

Trying to view the source of your code shows that you have a framed page. Not knowing the map of your site, I've not found a way into the frame that has the links caption on it.

Can you give us the location of that bit of page so we can view the source there.

Also, it could well be worth asking the moderator to shove this thread over to the WebDesign forum. There's bound to be loads of help there.

Chris

  Legolas 18:12 02 Oct 03

Chris the Ancient Thanks for your reply I have posted this thread on the web design page as well as here as the web design page gets less traffic.

I could post the html code here but it might not come out very good but I will give it a try.



<!-- Keep all menus within masterdiv-->
<div id="masterdiv">


<div class="menutitle" onclick="SwitchMenu('sub1')">Site Menu</div>
<span class="submenu" id="sub1">
<a href="index.html"STYLE="TEXT-DECORATION: NONE"><font color=red SIZE=2>1.</font><FONT SIZE=2 TEXT>Homepage</a><br></FONT>

<a href="WOE.html"TARGET="row1col2"STYLE="TEXT-DECORATION: NONE"><font color=red SIZE=2>2.</font><FONT COLOR=#FFFFFF SIZE=2>A Word of Encouragement</a><br></FONT>
<a href="search.html"STYLE="TEXT-DECORATION: NONE"><font color=red SIZE=2>3.</font><FONT SIZE=2>Search the web or the Bible</a><br></FONT>

</span>
<div class="menutitle" onclick="SwitchMenu('sub2')">Archives</div>
<span class="submenu" id="sub2">

<a href="archives1.html"TARGET="row1col2"STYLE="TEXT-DECORATION: NONE"><font color=red SIZE=2>1.</font><FONT COLOR=#FFFFFF FONT SIZE=2>The power to choose</a><br></FONT>
</span>

<div class="menutitle" onclick="SwitchMenu('sub3')">Links</div>
<span class="submenu" id="sub3">
<a href="click here"STYLE="TEXT-DECORATION: NONE"><font color=red SIZE=2>1.</font><FONT SIZE=2>Joyce Meyer- A great bible teacher</a><br></FONT>
<a href="click here"STYLE="TEXT-DECORATION: NONE"><font color=red SIZE=2>2.</font><FONT SIZE=2>Hopehall Church- My home church in Paisley,Scotland</a><br></FONT>
<a href="click here"STYLE="TEXT-DECORATION: NONE"><font color=red SIZE=2>3.</font><FONT SIZE=2>The Isle of Arran-A pictorial tour of Arran</a><br></FONT>
<a href="click here"STYLE="TEXT-DECORATION: NONE"><font color=red SIZE=2>4.</font><FONT SIZE=2>William Branham-Listen to Branhams sermons and find out about this remarkable Man of God</a><br></FONT>

</span>

</div>




<style type="text/css">
.menutitle{
cursor:pointer;
margin-bottom: 5px;
background-color:#800040n;
color:#FFFF00;
width:145px;
padding:2px;
text-align:center;
font-weight:bold;
/*/*/border:1px solid# 800040n;/* */
}

.submenu{
margin-bottom: 0.5em;
}
</style>

<script type="text/javascript">

/***********************************************
* Switch Menu script- by Martial B of click here
* Modified by Dynamic Drive for format & NS4/IE4 compatibility
* Visit click here for full source code
***********************************************/

if (document.getElementById){ //DynamicDrive.com change
document.write('<style type="text/css">\n')
document.write('.submenu{display: none;}\n')
document.write('</style>\n')
}

function SwitchMenu(obj){
if(document.getElementById){
var el = document.getElementById(obj);
var ar = document.getElementById("masterdiv").getElementsByTagName("span"); //DynamicDrive.com change
if(el.style.display != "block"){ //DynamicDrive.com change
for (var i=0; i<ar.length; i++){
if (ar[i].className=="submenu") //DynamicDrive.com change
ar[i].style.display = "none";
}
el.style.display = "block";
}else{
el.style.display = "none";
el.style.display = "center";

}
}
}

</script>

  Legolas 18:14 02 Oct 03

The above post shows the code for the drop down menu on my site.

  Legolas 18:20 02 Oct 03

This is the link to the frame with the menu code click here

  Legolas 18:32 02 Oct 03

This is the link to the frame with the menu code
click here

  Chris the Ancient 18:48 02 Oct 03

Sorry to be slow coming back - I've been on another task (non-forum related!)

Thanks for posting the code - and I had a good look. It does have some syntax that I don't recognise - but I've been away from html writing for a while. It looks as though it is in need of some text centering commands, and I'm now less that 100% certain of how I'd do it! I'd forgotten how rusty I've become.

Rather than cause distress and damage, I'll do a 'hands up, honest guv' type of job and back down. Sorry.

Chris

  Legolas 18:58 02 Oct 03

Chris the Ancient Thanks for the reply I can enter an align text ="center" command but it aligns the menu entries vertcally i.e. between one link and the next, rather than in the center of the drop down menu which is what I am looking for but thanks again for trying.

  slowhand_1000 20:12 02 Oct 03

Have posted this in the web design section as well

Try this click here

If ok just copy source code

  Legolas 21:19 02 Oct 03

slowhand_1000 Thanks for your input I have added it to my page and it works on one level, it centers the links but for some reason it causes the scoll bars to appear and there is a lot of wasted space.

  slowhand_1000 23:03 02 Oct 03

ok, try it again

click here

This thread is now locked and can not be replied to.

Surface Pro (2017) vs Surface Pro 4

Where HTML5 is headed next

MacBook Pro v Surface Pro 5