Div trouble
Div trouble
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
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;"?
Can't you just give the left div style="float:left;" and the right div style="float:right;"?
Re:Div trouble
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
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
Hmmm... HTML in "General Programming"? ???
Every good solution is obvious once you've found it.
Re:Div trouble
;D It's the only place it'd fit, even if it's technically not programming
Re:Div trouble
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.
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
I see your problem now. The second line in this code:
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.
Code: Select all
div.thumb {
margin-left, margin-right: 3px;
padding: 5px;
border: 1px solid #222222;
width: 120px;
height: 135px;
display: block;
float: left;
}
Re:Div trouble
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.Solar wrote: Hmmm... HTML in "General Programming"? ???
%)
Re:Div trouble
Hmm, that line's redundant. I don't even want any margin there. Tossed it out, and the problem's still there.