Page 1 of 1
Div trouble
Posted: Mon May 22, 2006 3:44 pm
by Kon-Tiki
I've got two divs inside a bigger div. One of the divs should go to the left end of the bigger div, while the other one should go to the right, on the same height as the first one. Closest I seem to get, is with the second one a line lower than the first one. Anybody here know how to solve this?
Re:Div trouble
Posted: Tue May 23, 2006 6:19 am
by YeXo
Can you post your relevant css code?
Can't you just give the left div style="float:left;" and the right div style="float:right;"?
Re:Div trouble
Posted: Tue May 23, 2006 6:21 am
by Kon-Tiki
Yep, fixed it a few hours after posting this, using float: right; on the quick search box. Still'm having some misbehaviour from IE on display: block; elements, changing those blocks' size according to the contents, instead of keeping it to the width and height as defined in the CSS.
Re:Div trouble
Posted: Tue May 23, 2006 6:30 am
by YeXo
Yeah, it's known that ie renders the box model bad in most cases. Google for
ie box model, first result (which explains it very well):
http://css.maxdesign.com.au/listamatic/about-boxmodel.htm, or use this one (Dutch):
http://www.gigadesign.be/2004/12/css-box-model-hack/
Re:Div trouble
Posted: Tue May 23, 2006 6:52 am
by Solar
Hmmm... HTML in "General
Programming"? ???
Re:Div trouble
Posted: Tue May 23, 2006 7:05 am
by Kon-Tiki
;D It's the only place it'd fit, even if it's technically not programming
Re:Div trouble
Posted: Tue May 23, 2006 7:15 am
by Kon-Tiki
YeXo, I think I didn't explain the problem right. I already know how to fix that box problem (sure was a hemorrhoid to do so ::)) I'll link you, so you can see what the problem is.
Check the bottom of the first page, and especially the second page. It'll show just fine in Firefox, but if you check it in IE, it'll be all messed up, with a different size for each thumbnail box, size differing from the thumbnail's size.
Re:Div trouble
Posted: Tue May 23, 2006 8:52 am
by YeXo
I see your problem now. The second line in this code:
Code: Select all
div.thumb {
margin-left, margin-right: 3px;
padding: 5px;
border: 1px solid #222222;
width: 120px;
height: 135px;
display: block;
float: left;
}
is not vallid according to w3.org. Although this shouldn't break your layout like this, I have no idea what else can be the fault.
Re:Div trouble
Posted: Tue May 23, 2006 8:59 am
by mystran
Solar wrote:
Hmmm... HTML in "General
Programming"? ???
Why not? These days you often need to know HTML when doing general programming, because general programming often has a presentation layer that pukes HTML.
%)
Re:Div trouble
Posted: Tue May 23, 2006 9:01 am
by Kon-Tiki
Hmm, that line's redundant. I don't even want any margin there. Tossed it out, and the problem's still there.