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.

div css alignment problem in different browsers

Featured Replies

hai friends,

 

i'm using css and div to design a website.

but the alignment which i expect is not same in all browser..

i check this design in ie 6 * 7, chrome and firefox..

 

here is the code pls anyone help me in this problem

 

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
.c1{
width:207px;
/*	padding:0 0 10px 0;*/
}
.n_formimg{	
background-color:#FFFFFF;
width:204px;
height:229px;	
border-style:solid;
border-width:1px;
border-color:#C7C7C7;
}
.n_formimg1{

background-color:#EDEDED;
width:204px;
height:190px;	
border-style:solid;
border-width:3px;
border-color:#FFFFFF;
border-top:0;
}
.ntextfield { margin-left: 210px; margin-right:5px; width:18%;  margin-bottom:3px;}
.combobox{ margin-left: 210px; width:39%; margin-bottom:3px;}
.n1textfield { margin-right: 10px; width:18%; margin-bottom:3px;}
.textfield { margin-left: 210px;margin-right: 10px; width:38%; margin-bottom:3px;}
.dtextfield {margin-left: 210px; width:50px; margin-bottom:3px;}
.mtextfield {width:50px; margin-bottom:3px;}
.ytextfield {margin-right: 74px;width:75px; margin-bottom:3px;}


</style>

</head>

<body>

<div class="c1"> 
       <div class="n_formimg"> 

         <div class="n_formimg1"> <br />

         </div> 
       </div>
     </div>


     <form name="register" class="fieldalign" method="post" action="">

       <input name="Firstname" id="Firstname" type="text" class="ntextfield" tabindex="1" />
       <input name="Lastname"  id="Lastname" type="text" class="n1textfield" tabindex="2" />


       <select name="menu1" class="combobox" tabindex="6">
         <option>A</option>
         <option>B</option>
       </select>
       <br />
       <input class="dtextfield" id="date" tabindex="7" size="1" name="date" />
       <input class="mtextfield" id="month" tabindex="8" size="1" name="month" />
       <input class="ytextfield" id="year" tabindex="9" size="4" name="year" />
       <input name="password" type="password" class="textfield" tabindex="4" size="37" />
       <input name="conpassword" type="password" class="textfield" tabindex="5" size="37" maxlength="50" />

       <textarea class="textfield" name="message" cols="29" rows="4" tabindex="10"></textarea>
	<br />
       <input name="resident" id="resident" type="text" class="ntextfield" tabindex="1" />
       <input name="nationality"  id="nationality" type="text" class="n1textfield" tabindex="2" />
       <input name="phone" id="phone" class="textfield" type="text" tabindex="11" size="37" />
       <input name="email" id="email" class="textfield" type="text" tabindex="12" size="37" />
     </form>
   </div>



</body>
</html>

It's a bit hard to give you an answer without seeing the website.

  • Author

It's a bit hard to give you an answer without seeing the website.

 

just copy that coding and open it in different browsers..

u can view the problem

I'd get some labels in there first as they will probably affect the layout further even if you get the alignment of the inputs sorted.

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.