I have got a menu working but i don't know how to align it to the left center of the screen. at the moment it is at the top left of the screen.
here is the code that i have got so far:
[html]
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Demo Menu 1</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" >
<link rel="stylesheet" type="text/css" href="sddm.css" >
<title>JSwitch Slide Menu</title>
</head>
<body>
<div class="navbar" style="width: 148; height: 253;">
<!-- *********************************Start Menu****************************** -->
<div class="mainDiv" >
<div class="topItem" >Demo Menu 1</div>
<div class="dropMenu" ><!-- -->
<div class="subMenu" style="display:inline;">
<div class="subItem"><a href="#">Configuration</a></div>
<div class="subItem"><a href="#">Tool Box</a></div>
<div class="subItem"><a href="#">Contact Us</a></div>
<div class="subItem"><a href="#">Sub Menu 4</a></div>
<div class="subItem"><a href="#">Sub Menu 5</a></div>
</div>
</div>
</div>
<!-- *********************************End Menu****************************** -->
<br>
<!-- *********************************Start Menu****************************** -->
<div class="mainDiv" >
<div class="topItem" >Demo Menu 2</div>
<div class="dropMenu" ><!-- -->
<div class="subMenu" style="display:none;">
<div class="subItem"><a href="#">Configuration</a></div>
<div class="subItem"><a href="#">Sub Menu 2</a></div>
<div class="subItem"><a href="#">Sub Menu 3</a></div>
<div class="subItem"><a href="#">Sub Menu 4</a></div>
</div>
</div>
</div>
<!-- *********************************End Menu****************************** -->
<script type="text/javascript" src="xpmenuv21.js"></script>
</div>
<p> </p>
</body>
[/HTML]
4 2312
Please enclose any code within the approppriate code tags!
Welcome to The Scripts.
We cannot see why because your menu depends on the CSS settings. So where is the CSS definitions file?
Show it inside code tags.
Ronald
He forgot the slash on the closing [/html].
As said, we need to see the whole CSS file but, from your inline styling, it looks like you may not be setting units. Everything needs 'px' for pixels or other unit. A number alone may not work.
Also, it says you are usinng FrontPage. Make sure you have a proper doctype at the head. See the article about doctypes under Howtos at the top of this page if you don't know about them.
here is the css -
.navbar
-
{
-
}
-
-
.mainDiv
-
{
-
width:185px;
-
}
-
-
.topItem
-
{
-
letter-spacing: 0;
-
background: url('arrow-up-title.jpg') no-repeat center;
-
border:medium none; width:185px; height:25px; color:#215dc6; cursor:pointer; text-indent:10px; font-style:normal; font-variant:normal; font-weight:bold; font-size:12px; font-family:tahoma, verdana, sans-serif; background-repeat:no-repeat
-
}
-
-
.topItemOver
-
{
-
text-indent:10px;
-
letter-spacing: 0;
-
background: url('arrow-up-title-on.jpg') no-repeat center;
-
height:25px; width:185px; color:#428eff; cursor:pointer; font-style:normal; font-variant:normal; font-weight:bold; font-size:12px; font-family:tahoma, verdana, sans-serif; background-repeat:no-repeat
-
}
-
-
.topItemClose
-
{
-
text-indent:10px;
-
letter-spacing: 0;
-
background: url('arrow-down-title.jpg') no-repeat center;
-
height:25px; width:185px; color:#215dc6; cursor:pointer; font-style:normal; font-variant:normal; font-weight:bold; font-size:12px; font-family:tahoma, verdana, sans-serif; background-repeat:no-repeat
-
}
-
-
-
.topItemCloseOver
-
{
-
text-indent:10px;
-
letter-spacing: 0;
-
background: url('arrow-down-title-on.jpg') no-repeat center;
-
height:25px; width:185px; color:#428eff; cursor:pointer; font-style:normal; font-variant:normal; font-weight:bold; font-size:12px; font-family:tahoma, verdana, sans-serif; background-repeat:no-repeat
-
}
-
-
-
-
.dropMenu
-
{
-
border-left:1px solid #FFFFFF; border-right:1px solid #FFFFFF; border-top:0px solid #FFFFFF; border-bottom:1px solid #FFFFFF; background-color: #d6dff7;
-
color: #000;
-
filter:alpha(opacity=100);
-
padding-top:5px;
-
padding-bottom:5px; font-style:normal; font-variant:normal; font-weight:bold; font-size:11px; font-family:tahoma, verdana, sans-serif
-
}
-
-
.subMenu
-
{
-
display:block;
-
}
-
-
.subItem
-
{
-
margin-left:10px;
-
margin-top:2px;
-
height:18px;
-
font: 11px tahoma,verdana,sans-serif;
-
text-decoration:none;
-
color: #215dc6;
-
-
}
-
-
.subItem a
-
{
-
margin-left:23px;
-
font: 11px tahoma,verdana,sans-serif;
-
text-decoration:none;
-
color: #215dc6;
-
}
-
-
.subItemOver
-
{
-
margin-left:10px;
-
margin-top:2px;
-
font: 11px tahoma,verdana,sans-serif;
-
height:18px;
-
color: #428eff;
-
}
-
-
.subItemOver a
-
{
-
margin-left:23px;
-
font: 11px tahoma,verdana,sans-serif;
-
cursor:pointer;
-
color: #428eff;
-
text-decoration:underline;
-
cursor:pointer;
-
}
-
-
-
.drop
-
{
-
border-left:1px solid black;
-
border-right:1px solid black;
-
}
-
Replace lines 1-3 in your CSS file with - .navbar
-
{
-
margin-top: 15%;
-
text-align: left;
-
}
Ronald
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Mark |
last post by:
Ok, it is starting to get somewhere, but i am not sure what to do with
the following problem:
I designed "knobs". They are 90px in width and do have one border
(right) of 1px. So i guess, within...
|
by: Dan |
last post by:
Hello all,
I am getting records from a db and displaying the records to the user
through a drop down menu in an asp page.
Each record has 6 fields and I need to display them all to the user in...
|
by: Mike Stephens |
last post by:
This is very simple and for the life of me the solution escapes me.
How can I align a context menu to the right button of a button?
Regards,
Mike
|
by: chris_culley |
last post by:
Hi,
I'm fairly new to using css, and have been using it to format a
vertical navigation bar on my website, producing a load of buttons on
top of each other, each with a (151 * 33 px) gif as the...
|
by: torquehero |
last post by:
Hi all :)
I have created a horizontal navbar using Xara Menumaker. The Menu items have several dropdown menus. Its a javascript. When the mouse cursor is moved over any menu item, a dropdown...
| |
by: Steve Richter |
last post by:
I am using <div align=centerto center a horizontal menu on the page.
Problem is the center align of the div is rippling down to the menu
items and causing the text of the dynamic popup sub menu...
|
by: smitb |
last post by:
Hi,
I am a CSS/HTML novice. Can anyone please answer my question.
I am trying to insert a small image(an arrow) within an <li> tag. My problem is that I cannot right align the image.
Here is...
|
by: Bill |
last post by:
Hi
How can I have IE7 act correctly on that ?
The rules make the link text go down when hovered. It works in FF , I had to
add a hard space right after the LI tag to have OP9 work but I can't...
|
by: panos100m |
last post by:
I cant put the text (register,members,find) in the center of the three buttons using Internet explorer...
Any help will be much appreciated
(html code below)
<td class="ct">
<!-- menu...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |