PDA

View Full Version : whiteSpace between divs


johnMoss
01-12-2011, 05:54 AM
I've tried the usual fixes but I suspect the presence of a spry widget is foiling me. Scenario:
1 container div, 2 internal, a) spry form widget b) text floated left.

Actions:
Have tried bad practice set style to zero on p & margin in head, reset spry div to 1 px top margin, no padding, whatever stunt I pull is ineffectual. The master container div is currently set to white background, as is the left div, what I have is the yellow background I want on the right hand spry div, except that white space between the master container and the spry div is there on all browsers. I also tried setting the master container div to the yellow background and setting the left div to white, & of course I netted a space, this time yellow, on the left top inside of the master container.
Bottom line is I have a square master box with a red border; I want a slightly yellowed background on the right hand side of the div (top to bottom border) which holds the customer form, and the rest to be white, i.e. the left side all white background, I'm good to go on the bottom of the right hand side, it goes all the way to the master border. Problem is topside... The spry is of course all tables... Gentlemen??
CSS:

Container:
.formContainer {
border: .6em solid #CC2229;
position:relative;
margin:auto;
z-index:1;
background-color:#FFF;
}

left div:
.arrow {
width:auto;
font-weight:bold;
font-size:18px;
}

Right div:
.formbox {
float:right;
margin-left:100px;
width:440px;
text-align: right;
padding:15px;
margin-top: auto;
margin-right: auto;
margin-left: auto;
margin-bottom: auto;
background-color: #FCEFBC;

johnMoss
01-12-2011, 02:40 PM
my header is incorrect... meant widget is floated right...

johnMoss
01-12-2011, 02:52 PM
As an immediate fix I set the top margin to a negative 22px and that has gotten rid of the whitespace but is there not a more appropriate code to do this properly? My jury-rig works on all browsers though...

DWcourse
01-12-2011, 03:00 PM
It would really be helpful if you posted the page and gave us a link.

Offhand, I'd say that the margin from the first object in the problem div. So, if the first object in the div is an h1 tag, set the top margin for that element to 0.

Ricky55
01-12-2011, 08:37 PM
DW your question is way too cryptic without a link.

Ricky55
01-12-2011, 08:38 PM
Sorry I meant to say DW is correct. The question is way too cryptic without a link.

DWcourse
01-12-2011, 10:08 PM
DW your question is way too cryptic without a link.

Ricky, your answer was way too cryptic without the clarification.

Corrosive
01-13-2011, 06:59 AM
Ricky, your answer was way too cryptic without the clarification.

Ha ha. Nice turnaround :lol: