473,405 Members | 2,444 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,405 software developers and data experts.

horizontal centering of<div> in browser window

I have a fixed size <div> I would like to display in the center of a
browser window. To get the horizontal alignment is no problem using
'margin-left: auto' and 'margin-right: auto' but I cannot figure out
how to get it to centet vertically. Any ideas?

Ron Bott
Jul 20 '05 #1
1 7493
On 4 Nov 2003 07:46:08 -0800, ro*****@yahoo.com (Ron Bott) wrote:
I have a fixed size <div> I would like to display in the center of a
browser window. To get the horizontal alignment is no problem using
'margin-left: auto' and 'margin-right: auto' but I cannot figure out
how to get it to centet vertically. Any ideas?

Ron Bott


http://www.wpdfd.com/editorial/thebox/deadcentre1.html
http://www.wpdfd.com/editorial/thebox/deadcentre3.html
Jul 20 '05 #2

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

Similar topics

4
by: Hal Canary | last post by:
<div align="center"> does not seem to be identical to <div style="text-align:center">, as this example http://home.earthlink.net/~canaryh3/example.html points out. Yet the 'align' attribute...
14
by: Charlie T | last post by:
Hello, is there any way to get this to work? myID.innerHTML = "Hello" <DIV id="myID"></DIV> <DIV id="myID"></DIV>
3
by: tungchau81 | last post by:
Hi, A Modal Dialog does not allow us to highlight the text content inside <DIV> tag unless I use a <textarea> tag to display that text content. However, the situation of my software makes it...
5
by: hibernate | last post by:
I'm somewhat new to javascript/DHTML, and this problem has been plaguing me. I have made an 'array' of <div> tags within my html document like so: <div id="menu"> menu1 </div> <div id="menu">...
4
by: adriann | last post by:
Hi, I'm using PHP to echo or stream out some DIV tags with content inside, by a user selection, and after a page has initially loaded. My question is, Can I erase this dynamically created DIV...
0
by: tawxic | last post by:
My code is thus: <div id="navigation"> <ul> <li><a href="#">Home</a></li> <li><a href="#">About Phazm</a></li> <li><a href="#">Services Offered</a></li> <li><a href="#">Request...
7
by: howa | last post by:
hi all, consider the example below: ////////////////////// <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html...
5
uranuskid
by: uranuskid | last post by:
Hey guys, I control my webappearance ewith a series of <div> elements. They are supposed to be in line and the main container is supposed to stay min 880px in wdth. However, the left infobox has...
1
by: Num GG | last post by:
Wow... this post is pretty unreadable. Ok, i'll try to make it simpler: I've got this first page: ----------------------------------------------------------- <div id=1>some text here</div>...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
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...
0
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,...
0
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...

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.