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

CSS positioning from the center of the screen problem....

Great to find this place, found some help here already so I thought I'd pose this question here...

I'm trying to position a DIV to be in an EXACT location, I have it padded from a DIV anchor located at the top of the screen, so I can go down and left/right with complete control.

I'm using it to mount my search box exactly inside a menu bar, tables were forcing the height of the menu to expand to much, so I thought this would be a good solution.

Seems to have 3 problems...

A) it adjusts automatically from the center up until i place the form or a table within the DIV, then it becomes a static location on the screen in firefox, though IE seems to continue adjusting normally as it should.

B) in ie6 is seems to be about 10 pixels to the left in position than in ie7 or firefox???

C) It's creating about 100 or more wasted space pixels to the right of it, since it's already at the right edge of the design, it's forcing horizontal scroll bars to activate when the width of the window hugs the template.

Would someone mind taking a look and offering advice?

links is http://www.gseworld.com/geosport/test.htm

The specific CSS references are at the bottom of the CSS page

Thanks a lot

MIKE
Mar 27 '07 #1
7 6526
Is it possible to use css absolute positioning, nested from a centered (margin:auto) DIV, and actually place it in an EXACT location that doesn't vary from browser to browser, or should I just be using javascript for this anyways?
Mar 28 '07 #2
KevinADC
4,059 Expert 2GB
<div style="poition: absolute; left: 100px; top: 100px; z-index: 2;">
Mar 29 '07 #3
<div style="poition: absolute; left: 100px; top: 100px; z-index: 2;">
the only difference is the z-index... Hows that supposed to fix it?
Mar 29 '07 #4
KevinADC
4,059 Expert 2GB
Sorry, was a sort of general commnt, to answer this question:

Is it possible to use css absolute positioning, nested from a centered (margin:auto) DIV, and actually place it in an EXACT location that doesn't vary from browser to browser, or should I just be using javascript for this anyways?
You would need to write a seperate style sheets for each user agent (IE, Mozilla, etc), detect the user agent when the document is requested, and load up the appropriate style sheet.
Mar 29 '07 #5
That's a good answer, hadn't thought of doing that... only potential problem is I still can't get firefox to position based off the center, as soon as I add the search form, even if it's in a table, it becomes statically located instead of adjusting with the resizing of the window. When I validate, it says I can't have a table or form within a span or <p> tag, but removing those doesn't fix it either :(
Mar 30 '07 #6
KevinADC
4,059 Expert 2GB
Welcome to the ugly world of CSS.
Mar 30 '07 #7
I'm sure I've just got one little style wrong and it's screwing it all up, just can't figure out which one is keeping firefox from properly centering with a table or form in the DIV
Mar 30 '07 #8

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

Similar topics

4
by: Jane Withnolastname | last post by:
I am trying to re-work an old site by replacing the html with css. On the main page, I have a logo image which I needed centred on the initial screen. I found the solution here:...
10
by: Ian Watts | last post by:
Hi I am developing a website for a friend, currently at http://homepage.ntlworld.com/iwatts/testsite/ and it is pretty much doing what I want in Mozilla 1.5, Mozilla Firebird 0.7 and IE 6,...
7
by: Thomas Elser | last post by:
Hi, I made a site using CSS absolute positioning for all my content on the page. Now I try to figure out if it is possible to center the pages without giving up the absolute positioning. Can...
1
by: Shawn Wilson | last post by:
I am trying to do away with tables, and am trying to learn how to position things with CSS just how I want them to look. The problem I've run into is that one design in particular seems imposible...
4
by: TheCeej | last post by:
I'm sorry to post what is ultimately a myspace problem, but I'm sure I'd still be having this problem with any html/css document, so the answer would more than likely be able to help anyone out. I'm...
2
by: nonsensitor | last post by:
I'm just learning xhtml & css, primarily from westciv's online tutorials and css guide. I've run into a couple of problems with a page I'm developing that I can't figure out. The first problem is...
3
Stang02GT
by: Stang02GT | last post by:
I have created a menu ( as some of you may have seen in my previous post about adding a third level to a 2 level menu) and now my problem with the menu is that the menu stretches across the whole...
0
by: Samuel Murray | last post by:
G'day everyone Please tell me the following is possible using CSS positioning (it'll make my day). I want to position a long line of text on the screen so that a certain portion of it is in the...
1
by: mohammadtaha | last post by:
Hi, I am using CSS to position objects (<SPAN> and <DIV> tags) on my webpage, which is working great on regular computer monitors, when I view the same page on a wide screen laptop monitor,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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
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
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...
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
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.