Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

3 different browsers, three different forms...

Featured Replies

Hey, here's my problem:

 

25ip7qh.jpg

 

Opera [how it's supposed to look]

Firefox

IE

 

I know there's a lot of confusion about things not lining up on web development forums so sorry if this is a repost but i couldn't find it anywhere.

 

Bascically does anyone know how to get a form looking the same in these different browsers, I understand it'll be hard to get them exact, but i atleast want the length to be closer than they are.

 

It's not so much the submit button, as that's probably a div problem, but the length of the input form does vary from browser to browser.

 

Thanks for any help.

Have you applied css to the form to size and position it correctly? As long as you have defined everything you need to this way then there is no reason it shouldn't render the same in every browser.

  • Author

.texta { 
font-size: 10px; 
background-color: #CCCCCC; 
border: 1px solid #666666;

}
.submit{
font-size: 10px; 
background-color: #CCCCCC; 
border: 1px solid #666666;
}

#apDiv1 {
position:absolute;
left:689px;
top:-31px;
width:253px;
height:23px;
z-index:1;
}

 

 


<div id="apDiv1">
<input name="textfield" type="text" class="texta" size="30" />
<input type="submit" value="Submit" class="submit" />
</div>

 

This is the css i'm using, the div is positioning the form, and you can see i've tried to set the size and things, but there's still a bit of a difference between browsers, any idea?

Set the width of the input with css

.texta { 
font-size: 10px; 
background-color: #CCCCCC; 
border: 1px solid #666666;
width:150px;
}

Just tried the code....well with left 100px; and top 31px; and could see no difference between IE8, Chrome and Firefox. Well the only difference being that in Chrome the Submit box is smaller. The spacing looks the same to me and not wildly different like your images.

 

Just in case it makes any difference my DOCTYP is

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

  • Author

Set the width of the input with css

.texta { 
font-size: 10px; 
background-color: #CCCCCC; 
border: 1px solid #666666;
width:150px;
}

 

 

Thanks a lot worked a treat ^_^

 

@zed

 

Yeah, the image was taken when I had some crazy divs going on, that spacing has been fixed just by not splitting the button and input field into different divs.

 

thanks alot guys, worked great, as usual!

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.