473,563 Members | 2,668 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Using DIVs for a horizontal menu

35 New Member
Hello,

silly problem maybe, but...

I'm trying to get a horizontal menu to work with DIVs but I'm having trouble getting the menu items to "fill" the menu DIV.

Basically I have a surrounding DIV as the menu tag and then as menu items I have four DIVss, with "display:inline " in the CSS to get them to line up horizontally. What I want to do is to give them each a width of 25% of the surrounding DIV to make the menu look nice. But I'm not getting it to work, the items just line up next to one another. I could do it by padding each item individually but I want to avoid that since I want to keep their size relative to the surrounding DIV. Any suggestions?

Thanks in advance
Jul 9 '07 #1
1 2245
drhowarddrfine
7,435 Recognized Expert Expert
Frequently, we use lists for menus. I would guess that the problem arises from using divs but, without seeing any code, it would be just a guess.
Jul 9 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

6
38805
by: Mel | last post by:
i need to have as many as 5 divs side by side on the same line without a break. if browser displays a horizontal scrollbar, its ok with my users and they can resize it. something like the following: X X X X X where each 'X' is a div with my stuff inside them and i dont want it to look like
4
2365
by: txican | last post by:
the HTML is: ---------------------------------------------- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html> <head> <title>foo</title> <style type="text/css"> <!-- ..b {
2
7456
by: bj | last post by:
Hi, Yes, this is yet another "switching from tables to divs for layout purposes" post. I have been searching for the past few hours to find what I'm looking for as I hate posting unnecessarily. I am a pretty crap searcher but I'm kinda sure this hasn't been written about yet. Please feel free to prove me wrong and link to a solution....
2
9307
by: Sergio E. | last post by:
Hi group, I write this post with the following question: How can I to build an absolutely horizontal menu?, This is because I can't find how can I configure the menu component of asp.net 2.0 in vs2005. I need somthing like this: the root menu in this form
1
6606
by: camphor | last post by:
hi, I have a single column webpage with a horizontal dropdown menu and am trying to make the nav bar fit across the page, the column is 800px, it looks ok in dreamweaver 8 but when I test it in firefox, the nav bar which is a horizontal blue stripe with the links written inside it doesn't stretch the whole 800px, also how would you align the...
3
1810
222fbj
by: 222fbj | last post by:
There are several menus on the Listamatic site - for example this Horizontal Menu . The links for the menu items are in the form <li><a href="#">Item five</a></li> My page is laid out with CSS/Divs. So how do I get the menu items to load an htm page in a Div? I looked, but did not find, a tutorial on this - if you know of one pls let me...
0
1396
by: Rain | last post by:
In the example below. If I have the position:relative in the first div, then the menu disapears when dropped, if I do not have it, then it apears over the top of all the other divs when dropped. Why ?????? <div style="position:relative;"> <asp:Menu ID="Menu1" runat="server" Orientation="Horizontal">
24
2364
by: Chris F.A. Johnson | last post by:
On 2008-07-09, Denis McMahon wrote: If the left-hand column contains any text, use em rather than px to size it. In CSS, less is more. Most problems are caused by specifying too much rather than too little. The default width of a block element is 100%; you don't need to specify it.
8
8927
by: =?Utf-8?B?Q2hyaXMgSGFsY3Jvdw==?= | last post by:
Hi there I've successfully added some .NET validation controls to a page (using <asp:RequiredFieldValidator ...), however when I try to set the 'display' property to 'dynamic', my page then throws up the following error in the browser: CS1061: 'System.Web.UI.WebControls.TextBox' does not contain a definition for 'Web' and no extension...
0
8106
jinu1996
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7638
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...
0
6250
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...
1
5484
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...
0
5213
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...
0
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2082
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
1
1198
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
923
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.