- This topic is empty.
-
AuthorPosts
-
January 28, 2013 at 7:25 am #42311bastunqkParticipant
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#leftReoportaji {
padding: 0;
width: 50%;
float:left;
border-right: 3px solid black;}
#rightReportaji {
padding: 0;
width: 48%;
float: right;
}
/*Inner video*/
#allVideo {
float: left;
clear: both;
padding: 5px;
}#wholee {
border: 3px solid black;
}
The problem is that the right div is not equal to left. HR is moved. Here is an image to see it.
Thanks in advance.
January 28, 2013 at 7:30 am #122548Kitty GiraudelParticipantCould 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.
January 28, 2013 at 7:33 am #122549Paulie_DMember> I suspect some box-model issue.
Ditto…plus he’s mixing % and px.
January 28, 2013 at 7:40 am #122542Kitty GiraudelParticipantWithout either border-box box-model or calc(). We’ll determine once we get to see the code.
January 28, 2013 at 7:59 am #122551bastunqkParticipantHere it is the basic html:
Video is here
text text text
Video is here
text text text
and the css:
#leftReoportaji {
padding: 0;
width: 50%;
float:left;
border-right: 3px solid black;}
#rightReportaji {
padding: 0;
width: 48%;
float: right;
}
/*Inner video*/
.allVideo {
float: left;
clear: both;
padding: 5px;
}#wholee {
border: 3px solid black;
}.clearfixx:after {
content: “.”;
display: block;
height: 0;
clear: both;
visibility: hidden;
}January 28, 2013 at 8:07 am #122552Kitty GiraudelParticipantPlease make a JSFiddle or a CodePen.
January 28, 2013 at 8:08 am #122554wolfcry911ParticipantYou 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…
January 28, 2013 at 8:12 am #122555bastunqkParticipanthere it is:
January 28, 2013 at 8:16 am #122556Paulie_DMemberYes, 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.
January 28, 2013 at 8:17 am #122557Kitty GiraudelParticipant> However, I do think you have structured this rather badly. I wouldn’t be using spans at all.
Same here.
January 28, 2013 at 8:17 am #122558Paulie_DMemberYou also seem to have an ID for your left side and class for your right side….Ick!
January 28, 2013 at 8:18 am #122559maxisixParticipantis it what you want http://cl.ly/image/3q2a1U2F2M1M ?
January 28, 2013 at 8:21 am #122560maxisixParticipantHe’s right !
> However, I do think you have structured this rather badly. I wouldn’t be using spans at all.January 28, 2013 at 8:21 am #122561bastunqkParticipantThe spans was the problem. Thanks to everybody.
January 28, 2013 at 8:24 am #122562wolfcry911ParticipantI 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?
-
AuthorPosts
- The forum ‘CSS’ is closed to new topics and replies.