473,386 Members | 1,810 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Position whole wrapper and menu bar in the middle of web browser?

Hello:

Many books talk about how to the layout of html using the following
sequence:

wrapper
menu bar (short and not long enough to expand the whole wrapper)
left sidebar
right sidebar
main content
What is the simplest way to put the whole wrapper and the menu in the
middle of whole web browser?

The problem is the what is the simple way to put menu in the middle
instead of left aligned. If I use text-align:center, the menu is not
centered.

Thanks.

D.

May 23 '07 #1
2 2755
On 2007-05-23, du*******@gmail.com <du*******@gmail.comwrote:
Hello:

Many books talk about how to the layout of html using the following
sequence:

wrapper
menu bar (short and not long enough to expand the whole wrapper)
left sidebar
right sidebar
main content
What is the simplest way to put the whole wrapper and the menu in the
middle of whole web browser?
It depends whether you've set the width on the wrapper explicitly. If
you have, "margin: 0 auto" on the wrapper is the simplest.

Otherwise you need inline-block (not widely supported) or table.
The problem is the what is the simple way to put menu in the middle
instead of left aligned. If I use text-align:center, the menu is not
centered.
May 23 '07 #2
du*******@gmail.com wrote:
>
The problem is the what is the simple way to put menu in the middle
instead of left aligned. If I use text-align:center, the menu is not
centered.
If the menu uses list markup, you can center it with a combination of
text-align:center on the <uland display:inline on <li>. Set margins
and padding to taste.

--
Berg
May 23 '07 #3

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

Similar topics

0
by: Mike | last post by:
I've been working on a pop-up menu, one of those where you mouse over a button and a submenu pops up. Because the client wanted the menu centered, I gave the starting point of the submenu an...
4
by: Peter Fjelsten | last post by:
Guys at comp.infosystems.www.authoring.stylesheets, I have designed a page in (x)HTML transitional that I am happy with in (close to) standard compliant browsers (i.e. Firebird/Opera), but IE...
2
by: Joachim Bauer | last post by:
I'm using the code below to display a menu that opens when the mouse goes over the main menu item (try it in your browser to understand the behaviour). It uses "position:absolute" and a switch...
2
by: Laphan | last post by:
Hi All I have developed a site whereby it uses the contents of a folder (incs gifs, jpgs and css files) to display the web 'skin' of the site. This is OK, but each button on the site is an...
14
by: Schraalhans Keukenmeester | last post by:
I am building a default sheet for my linux-related pages. Since many linux users still rely on/prefer viewing textmode and unstyled content I try to stick to the correct html tags to pertain good...
8
by: Edward | last post by:
I used to do this all the time in HTML-table layouting. How do I do this in CSS? -------------------------------------------------- <table width="400px"> <tr> <td bgcolor="beige">one line of...
2
by: rockdale.green | last post by:
Hi, I do not know where should I start to solve this problem. I have a calendar inside a div on my webpage which will show /hide when user click a button. but the button is almost at the...
3
by: superjacent | last post by:
Hope someone can help. I have a listbox displaying time periods in blocks of 15 mins for a 24 hour period, all up 96 rows. The listbox can only visibly show 20 rows a time. The default...
2
by: DruManiac | last post by:
hi everyone, ive found a simple drop down menu script but for some reason there is only one div tag set for 2 menus.. and i want to position them seperately... ill give the css positioning of what i...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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...

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.