473,791 Members | 3,090 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

CSS positioning cross-browser (well IE, FF)

I've got html page with has a fixed height - there are five buttons on
the page. The page has a fixed, known height - but the width can
change. The five buttons should be arranged on the page as follows
(all buttons should always be 3px from the top):

"button1" - left edge always 3px from left side of the page
"button2" - left edge always be 5px to the left of "button 1:"
"button3" - buttons three and four should float (relatively) in the
middle of the page
"button4" - left edge always be 5px to the left of "button 3:
"button5" - right edge always 3px from right side of page

Button2 could float to the left of button1 - but I'd like to know how
to get it fixed to the right of button1 by 5px.
A key requirment is that buttons 3,4 are seperated by 5px and appear
to float together (not ever overlap)...
I've tried the following CSS - it works in IE but in FF the buttons
tops (buttons 3,4) don't align.
Anyone have any suggestions:

..Button1 {
position: absolute;
left: 3px;
top: 3px;
}
..Button2 {
position: absolute;
top: 3px;
margin-left: 10%; /* HOW DO I GET THIS BUTTON TO BE 5x FROM
Button1? */
}
..Button3 {
position: relative;
top: 3px;
margin-left: 43.5%; /* HOW DO I GET Button3,4 TO FLOAT
TOGETHER */
} /* AND STAY TOP ALIGNED AT
5px? */
..Button4 {
position:relati ve;
top: 3px;
}
..Button5 {
position: absolute;
right: 3px;
top: 3px;
}

Nov 2 '07 #1
4 1329
On Nov 3, 2:29 am, celoftis <celof...@gmail .comwrote:
I've got html page with has a fixed height - there are five buttons on
the page. The page has a fixed, known height - but the width can
change. The five buttons should be arranged on the page as follows
(all buttons should always be 3px from the top):

"button1" - left edge always 3px from left side of the page
"button2" - left edge always be 5px to the left of "button 1:"
"button3" - buttons three and four should float (relatively) in the
middle of the page
"button4" - left edge always be 5px to the left of "button 3:
"button5" - right edge always 3px from right side of page

Button2 could float to the left of button1 - but I'd like to know how
to get it fixed to the right of button1 by 5px.
A key requirment is that buttons 3,4 are seperated by 5px and appear
to float together (not ever overlap)...

I've tried the following CSS - it works in IE but in FF the buttons
tops (buttons 3,4) don't align.
Anyone have any suggestions:

.Button1 {
position: absolute;
left: 3px;
top: 3px;}

.Button2 {
position: absolute;
top: 3px;
margin-left: 10%; /* HOW DO I GET THIS BUTTON TO BE 5x FROM
Button1? */}

.Button3 {
position: relative;
top: 3px;
margin-left: 43.5%; /* HOW DO I GET Button3,4 TO FLOAT
TOGETHER */} /* AND STAY TOP ALIGNED AT

5px? */
.Button4 {
position:relati ve;
top: 3px;}

.Button5 {
position: absolute;
right: 3px;
top: 3px;

}
Hi...

Try using div ... inside div put your buttons and the apply the style
in the div for each button...
Hope fully it will work
Thanks

Masudur

Nov 3 '07 #2
Any resources that I should read regarding CSS implementations
per browser?
http://www.positioniseverything.net

Nov 20 '07 #3
Yes, I came across that site earlier.. poked around a bit but didn't
find anything specifically related to my problem - this of course
could be that I'm a CSS newbie and don't know the lingo yet. Any
suggestions as identifying the root problem so I know what to look for
on a site like poistionisevery thing?
Nov 21 '07 #4
Just hunt around until you find something you like and copy it.

The whole thing is anarchy if you ask me.

When stuck, use tables.
-----Original Message-----
From: celoftis [mailto:ce****** @gmail.com]
Posted At: Wednesday, 21 November 2007 2:23 PM
Posted To: microsoft.publi c.dotnet.framew ork.aspnet
Conversation: CSS positioning cross-browser (well IE, FF)
Subject: Re: CSS positioning cross-browser (well IE, FF)

Yes, I came across that site earlier.. poked around a bit but didn't
find anything specifically related to my problem - this of course
could be that I'm a CSS newbie and don't know the lingo yet. Any
suggestions as identifying the root problem so I know what to look for
on a site like poistionisevery thing?
Nov 21 '07 #5

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

Similar topics

7
1942
by: |{evin | last post by:
I'm currently working on what has turned in to something much larger that I wanted it to be. The upside is that I'm getting $$ to do it... but anywho. I currently have textboxes set up to capture phone numbers, I've also got regular expression validation in place to force the format of the number to be (xxx) xxx-xxxx. The problem is, the people that are paying me don't want this. What they'd like to see is a magic textbox that fills in...
17
1796
by: Mark Rae | last post by:
Hi, I'm interested in your opinion concerning how far you would consider it necessary to code for cross-browser compatibility these days, especially for public-facing Internet sites... According to a recent survey (http://www.weboptimiser.com/search_engine_marketing_news/3061148.html), Internet Explorer has just under 95% of the browser marketplace. Do you think it's worth the additional aggravation of making things work in
2
1411
by: Eric Caron | last post by:
Hi everybody, I was doing some cross-browser tests today and I found out that if you specify the width and height for a button type control, asp.net doesn't output the style information when viewing the page with the latest version of firefox. I copy-pasted the page source to an html file and opened it with firefox and the styles were applied to the button with no problem. My question is then this: Is there a way to control what...
2
1906
by: Tai | last post by:
Hi all, I have an ASP.NET web project that requires some mask control for entering Birthday, SSN, Phone number. I searched on Google and found some mask controls that worked very well on IE. But with Mozilla they did not work. Any body have any idea about these controls, or know where can i find it? And i wonder if we can write these controls with JavaScripts (Cross-Browser support) I appreciate your help. Thank You
2
3695
by: Questman | last post by:
Good afternoon, Does anyone have any code that implements, or approaches implementing, a cross-browser DHTML/JS solution to provide an Excel-like Grid on a web page - I'm trying to convert an old Java client/server data maintenance program to the web - the main display is in a grid format, which allows the user to select multiple rows and edit them in a new grid, which processes each grid line individually and validates and saves the...
15
2330
by: CMM | last post by:
So I'm half way through overseeing a large project in ASP.NET 2.0. My superiors have decided that it would be nice if we ensured the site worked on all the major platforms (as they see it: IE, FireFox, and Safari). We've made heavy usage of the new MENU control and other intrinsic 2.0 controls.... nothing fancy! just using ASP.NET's built-in controls and very nice, pervasive, and clean usage of CSS. Now I find after more testing that the...
7
10056
by: =?iso-8859-1?q?Jesper_R=F8nn-Jensen?= | last post by:
Hi. I just ran into a situation where I want to emulate the IE specific obj.click() syntax on an object on the webpage. The most convenient thing for me is if I were able to just select my object document.getElementById('myobj').click() Do you know any cross-browser solutions to that? (must work in firefox as a minimum).
10
1995
by: Christopher Nelson | last post by:
I've been developing a little web page full of JavaScript while using Firefox and it works well but when I try to view it in Opera and IE, it's incomplete. I suspect cross-browser issues in the DOM but how do you *find* them; neither Opera nor IE seem to have a JavaScript console as Firefox does. Am I missing something?
0
9669
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9515
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10427
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10155
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 most users, this new feature is actually very convenient. If you want to control the update process,...
1
7537
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6776
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5431
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5559
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3718
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.