Hello to everybody. Great forum.
Could you please help me to understand whats happening with this container.
I have container with id whole in this container i have two other divs with id leftReoportaji and rightReportaji and in them i have two spans which holds the video and the text.Video is also floated to left.
Here is my CSS
The float heights seem to be derived from the amount of text. Notice the right float has one more line of text (probably because it's 2% smaller in width than the left float). I'm guessing there's a bottom padding or margin on the text span, or link...
I agree with Hugo and Paulie - not structured very well. Your pen doesn't even closely resemble the problem in the pic. How are we to help if you won't give us information? Why are you using the clearfix on everything?
Hello to everybody. Great forum. Could you please help me to understand whats happening with this container. I have container with id whole in this container i have two other divs with id leftReoportaji and rightReportaji and in them i have two spans which holds the video and the text.Video is also floated to left. Here is my CSS
The problem is that the right div is not equal to left. HR is moved. Here is an image to see it. [url=http://www.servimg.com/image_preview.php?i=1&u=18080285][img]http://i15.servimg.com/u/f15/18/08/02/85/prob10.png[/img][/url]
Thanks in advance.
Could please make a codepen.io or a jsfiddle.net? It's hard to help you without being to play around with the code.
However I suspect some box-model issue.
Ditto...plus he's mixing % and px.
Without either border-box box-model or calc(). We'll determine once we get to see the code.
Here it is the basic html:
and the css:
leftReoportaji {
}
rightReportaji {
} /Inner video/ .allVideo { float: left; clear: both; padding: 5px; }
wholee {
}
.clearfixx:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
Please make a JSFiddle or a CodePen.
You still haven't give near enough information...
The float heights seem to be derived from the amount of text. Notice the right float has one more line of text (probably because it's 2% smaller in width than the left float). I'm guessing there's a bottom padding or margin on the text span, or link...
here it is:
http://codepen.io/anon/pen/IitgG
Yes, we understand but we don't know the size of the video.
However, I do think you have structured this rather badly. I wouldn't be using spans at all.
Same here.
You also seem to have an ID for your left side and class for your right side....Ick!
is it what you want http://cl.ly/image/3q2a1U2F2M1M ?
He's right !
The spans was the problem. Thanks to everybody.
I agree with Hugo and Paulie - not structured very well. Your pen doesn't even closely resemble the problem in the pic. How are we to help if you won't give us information? Why are you using the clearfix on everything?
Could somebody explain to me how to clear floats the wright way? Because floats really confuses me.
It's not really the floats that were your problem...it was the structure.
http://codepen.io/anon/pen/fbrCm
I've used the overflow:hidden method to clear the floats but there are others.
You might want to look at this too...which includes a simple grid and a clear method.
http://css-tricks.com/video-screencasts/115-dont-overthink-it-grids/