Stop Divs text from overlapping - html

Does anyone know how I can stop two divs from overlapping?
I have a .box.active div however the text on this is overlapping into another div
thanks for any help in advance!

If DIVS are overlapping then the general principles is your code has made them do that in the first place. Add position relative to the classes on your div tags to start with along with Display block.
.yourdivclass {display:block}
.yourdivclass {display:inline-block}
Some other possibilities:
Set widths on elements?
Have you used FLEX? This can cause this often if your code has not been completed correctly?
Generally, we need more code to solve issues so if this does not help - provide some code in your question and I can help further.
Hope this helps.

Related

Why float left doesn't work

I'm building a website with fluid layout and I want avoid things like setting dimensions. I'm having success in almost everything, but I have a div that doesn't work as expected. See this link: http://cssdesk.com/Bshqe.
I expect that "div_botao_comecar_convite_cadastro_b" were placed to the right of "div_descricao_curta_convite_cadastro_b", but it was placed below this div. I want that the div be placed at left.
As I say, I don't want set a width for anyone div. Sorry for bad english. Thanks in advance.
If you don't want to set a specific width but want the children elements aligned horizontally, use css3 flexboxes -
apply display:flex to #div_elementos_convite_cadastro_b and adjust the other css accordingly....
demo
more about flexboxes # CSSTricks

How to insert display:inline into outer div

I have 4 analog clock widgets which Im trying to line up horizontally on my web page.
I was told that I have to "insert a display:inline in the outer div of each clock." in order to get them line up horizontally but I have no idea how to do this (Sorry my html/css knowledge goes as far as changing colors and fonts). If you can help me with this I would be very grateful. The example of the clock code is available here on their website: http://localtimes.info/Europe/United_Kingdom/London/getwidget/119/ (it will be 4 different cities line up)
Thank you in advance :)
There is an another way for arrangin it horizontaly.
Create a div, then put the clock container divs inside that paran div. Then add float:left. for the clock divs. it will align horizontally. If you want to
http://jsfiddle.net/arjuncc/9Vj6Y/
http://jsfiddle.net/arjuncc/9Vj6Y/1/
Set the style as:
<div style="display:inline">
For the clocks...

Div's outside of container but why?

I'm already spending way too much time about two divs placed inside the footer that are placed outside the container for some reason. Checked my HTML and CSS over and over but can't see what's wrong with it.
It's probably a floating/clearing issue or some little typo in my code but I just can't find it. Any help solving this is really appreciated.
The page can be found at http://nionwebdesign.com/dev/check. It's about the 'Bestellen' and 'Info' parts that are placed outside the white container.
Thanks in advance!
Probably you have them floated. Parent elements are never to expand to contain floated elements. To have this do what you want, add overflow:auto to the "container" parent element.
Here you can find a description of the problem and commented solutions:
http://www.quirksmode.org/css/clearing.html
This SO answer lists all the best solutions, starting with the more recent "micro-clearfix" one from 2011.
The overflow: hidden solution isn't without its problems, which you may or may not run into depending on your page layout.
What methods of ‘clearfix’ can I use?

CSS3 flexbox: flexboxes inside flexboxes aren't contained inside their parents

I am faced with getting a rather complex web app to work in HTML/CSS. I am finding many issues with the flexbox, which seems like it would solve my problems. I'm trying to understand what I'm doing wrong or what the flexbox limitations are. I am only working in Chrome so that helps.
I keep seeing two issues:
- the boxes don't understand how to accommodate heights/widths of children contained inside
- child boxes aren't contained by parents. Image of this issue:
Instead of posting code here is a JSFiddle: http://jsfiddle.net/dex3703/ryCQq/
Isn't fully complete but you get the idea I hope. The CSS is combined from three different files.
Thanks!
Figured it out. All containers must be set to display: box (or -webkit-box, etc). If you want a box inside a box, they all must be boxes. Hope this helps someone!

Why are my DIVs clearing left?

I don't usually post a link to my site when asking questions, though I don't see another way around it. I apologize in advance.
I'm having difficulties with a specific page. The page consists of Team Members, where each member is its own DIV (also each team member is coincidentally a separate post in Wordpress).
For some reason, the DIVs wrapping each post are clearing left, but no clearing attributes are assigned!
The page is located here: http://engineercreativity.com/samples/comsense/?page_id=15
Please, if you can help, I'd love to hear any input.
Thanks a lot!
Amit
Divs are floating on horizontal axis and not vertically, What you are essentially looking for is a Masonry Plugin, its for jquery and should easily solve your problem.
http://desandro.com/resources/jquery-masonry/
edit:
your divs are not clearing on left, please see the computed layout
the whitespace is not because of divs clearing left, the whitespace is because of line height. When you are having two floating elements in a row, then the row will take height equal to the bigger element, so essentially each row will have white space below the smaller div. This is similar to a HTML Table.
Akinator's fix didn't work for me in FF on Win XP. If you change your float on the "team-member" class to float: left it will fix it. It is being caused by your static image being float left and the rest of the divs around it being float right.
If I understood your question correctly, you have a margin-bottom of 15px in the class .team-member, this gives and extra white space.
It should be set to 0 (or not set)
Is this what you ment?