By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,353 Members | 1,555 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,353 IT Pros & Developers. It's quick & easy.

Using DIVs for a horizontal menu

P: 35
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
Share this Question
Share on Google+
1 Reply


drhowarddrfine
Expert 5K+
P: 7,435
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

Post your reply

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