[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 347
  • Last Modified:

div is centered in Dreamweaver but not in browsers...??

Hello,

I am using a method I have used before to center divs.  It shows up as centered in dreamweaver, but not in Safari or Firefox......code snippet below:

<div id="bigwrapperDiv">
<form method="get" action="" class="asholder" id="myForm" name="myForm">
<div id="headerDiv">
  <p><small style="float:left">
    <input   id="thisid"   value="0" style="font-size: 10px; width: 30px;" disabled="disabled" />
    </small><small style="float:left">
      <input type="hidden" id="isTest"   value="" style="font-size: 10px; width: 30px;" disabled="disabled" />
    </small>
    <small style="float:left">
      <input type="hidden" id="currentScore"   value="" style="font-size: 10px; width: 30px;" disabled="disabled" />
    </small><span class="contactinfo"><small style="float:left">
    <input   id="evaluatorid"   value="" style="font-size: 10px; width: 30px;" disabled="disabled" />
    <input   id="searchByWhat"   value="1" style="font-size: 10px; width: 30px;" disabled="disabled" />
    <input   id="currentSelect"   value="" style="font-size: 10px; width: 80px;" disabled="disabled" />
    </small></span><br />
  </p>
  </div>
</form>
<div id="mainContent" class="headerDiv">
  </div>
</div>

Open in new window

and CSS....
#bigwrapperDiv {width: 969px; margin:0 auto;overflow:hidden; padding-top:40px;}
#headerDiv {width:969px;border: 1px solid black;overflow:hidden;}

Open in new window


Thanks in advance for any help!

Cheers!
0
cougarsy
Asked:
cougarsy
  • 3
  • 2
2 Solutions
 
LZ1Commented:
First of all, please NEVER use Dreamweaver "design" view to test any type of code. Always use the browser.  

Second: What are you trying to center? The bigwrapperDiv is centered for me.  You've given it a width as well as margin:0 auto which centers it within the browser.

Can you show a screenshot or maybe a live URL of the issue?
0
 
cougarsyAuthor Commented:
Hi and thanks for your quick reply.  Here is a link to a page that is not centering correctly:

http://www.infocuseurope.com/Dashboard/CENTERSAMPLE.ASP

The code is a bit of a mess, but it is a sample to show what I am trying to center.

Thanks!

Cheers!
0
 
LZ1Commented:
You have a position:absolute on the body tag

Line 8 on this file: http://www.infocuseurope.com/css/autosuggest_inquisitor.css

Kill that and all will be good
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
cougarsyAuthor Commented:
Thank you so much!  I cannot make the changes now, but will do so in a couple hours and get back to you!!!

Cheers!
0
 
nanharbisonCommented:
You also have several of these: float:left
0
 
cougarsyAuthor Commented:
I split the points because LZ1 pointed out valid points that I felt were helpful in implementing best practices for my page.  However, the real 'fix' for me was nanharbison's solution of removing the 'float:left'.

Many thanks to you both!

Cheers!
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now