473,734 Members | 2,724 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

<div align=center> also affects align of dynamic dropdown item text

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 items to be
centered also. How can I center my navigation menu without centering
the menu item text?

thanks,

-Steve
<div align=center>
<asp:menu id="NavigationM enu"
staticdisplayle vels="2"
staticsubmenuin dent="10"
orientation="Ho rizontal"
target="_blank" StaticMenuItemS tyle-ItemSpacing="1e m"
StaticEnableDef aultPopOutImage =false
runat="server">

<dynamicmenusty le backcolor="Ligh tSkyBlue" HorizontalPaddi ng="1em"
forecolor="Blac k"
borderstyle="So lid"
borderwidth="1"
bordercolor="Bl ack" />

<items>
<asp:menuitem navigateurl="Ho me.aspx"
text="Home"
tooltip="Home">
<asp:menuitem navigateurl="Mu sic.aspx"
text="Music"
tooltip="Music" >
<asp:menuitem navigateurl="Cl assical.aspx"
text="Classical "
tooltip="Classi cal"/>
<asp:menuitem navigateurl="Ro ck.aspx"
text="Rock"
tooltip="Rock"/>
<asp:menuitem navigateurl="Ja zz.aspx"
text="Jazz"
tooltip="Jazz"/>
</asp:menuitem>
<asp:menuitem navigateurl="Mo vies.aspx"
text="Movies"
tooltip="Movies ">
<asp:menuitem navigateurl="Ac tion.aspx"
text="Action"
tooltip="Action "/>
<asp:menuitem navigateurl="Dr ama.aspx"
text="Drama"
tooltip="Drama"/>
<asp:menuitem navigateurl="Mu sical.aspx"
text="Musical"
tooltip="Musica l"/>
</asp:menuitem>
</asp:menuitem>
</items>

</asp:menu>
</div>

Jun 24 '07 #1
1 3127
"Steve Richter" <St************ @gmail.comwrote in message
news:11******** **************@ m36g2000hse.goo glegroups.com.. .
>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 items to be
centered also. How can I center my navigation menu without centering
the menu item text?
The easiest and most reliable way is to stop using deprecated syntax such as
align=center... :-) There is absolutely no guarantee at all how long this
will continue to be supported by subsequent browser versions...

Instead, you should seriously consider making your HTML markup
XHTML-compliant.

In this specific case, you need:

<div style="margin-left:auto;margi n-right:auto;">
--
http://www.markrae.net

Jun 24 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
11251
by: News | last post by:
Hi All, I'm trying to center a StyleSheet like below : <div id="CenterThis" style="position:absolute; top:40px; left:70px;">This should be centered</div> With this code : <script language="JavaScript" type="text/javascript">
2
4706
by: The Plankmeister | last post by:
Hi... What's an equivalent of doing: <center>hello!</center> in 4.01 strict? I'm using stylesheets and am telling the various selectors I want to be centred to "text-align : center;" but they only align textual objects, not image objects:
3
4634
by: CMAR | last post by:
To center my <div>, I am currently using something like <div id="navcontainer" align="center"> This centers fine, but is deprecated code. I have seen these two solutions recommended. 1) body { text-align: center; min-width: 500px;
3
11157
by: bissatch | last post by:
Hi, I have the following page: www.martynbissett.co.uk/index_div.html It is very basic that all elements will be structured using <div> tags and CSS styles will define the layout. What I dont know how to do is align the wrapper <div> (#maindiv) center. How is this done?
5
1791
by: Stan R. | last post by:
Greetings. I have a couple of questions concerning CSS layouts, as apposed to the old <tablemethod for creating layouts . Even after spending the last few days searching all over Google Groups, I haven't not been able to find a solution to my collective dilemma, and I hope some of you fine folks here in these neck of the UseNet woods might be able to share some wisdom with a fellow coder. My questions are in regard to what are the proper...
3
7853
by: rsteph | last post by:
I'm using two divs to create a shadowed-box type effect. Within the top div I want to put an image. I can get the image to center right to left, but not top to bottom. I'm making a series of boxes, and the images in them aren't all the same size. So I've sized the boxes to mach the largest of them, and I want to center them, so those that are smaller will be in the middle of the first div. Here's the code on the page: <table border="0"...
5
13525
by: Agix | last post by:
Hi there, Please check out : http://clarifysolutions.co.uk/certenroll/ The source is included below. This page is a test, so I can play about with paddings, margins and layouts using divs as semantically meaningless containers for bunch's of other elements - like everyone keeps telling me to make my code standards compliant. This request is not because I want a fix, but because I want to
5
5263
nathj
by: nathj | last post by:
Hi All, I'm working on a new site that has a two column layout underneath a title bar. If you check out: http://www.christianleadership.org.uk/scratch/mainpage.php using IE or Opera you will see what I am after as these browsers work fine. However, in FF the results are slightly different - take a look and you'll see that the <p>, within <div class="mainContent"> has shot way over to the right. I've been working on this for 2days now...
2
4462
Frinavale
by: Frinavale | last post by:
I've created a ASP.NET control that displays a "book" of schedules. It dynamically displays scheduling times and allows the user to page through the schedules. It also lets the user edit the schedule times if the user has permissions to edit schedules. When the user is not editing, or the user is not allowed to edit, the buttons that let the user edit are not displayed. If the user is allowed to edit schedules but they are not editing a link...
0
9449
Oralloy
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9236
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9182
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8186
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6735
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6031
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4550
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3261
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2724
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.