css-float

Strange inconsistent rendering in Google Chrome

北城以北 提交于 2020-01-14 04:06:07
问题 When I view this webpage in Chrome https://www.doctle.com/users/feedback/ it renders inconsistently. Problem is with the Login Widget in the top right corner. Sometimes its rendered as expected and if I refresh it sometimes its not floated properly. To reproduce the erratic behavior just refresh the page repeatedly and you can see the inconsistency. [Erratic Render] - https://www.doctle.com/error.jpg Please help. The screenshot is of the same page with out any differences on the server side

break long word around floating image

被刻印的时光 ゝ 提交于 2020-01-13 10:03:20
问题 I am trying to create a page display on mobile. Its layout like this: /---------\ some text around | | the image. some | image | text around the | | image. some text \---------/ around the image. some word around the image. some word around the image. I use floating style to implement that: <div style="word-wrap: break-word; word-break: break-all;"> <img src="someimg.jpg" style="float: left;"/> some text around the image. some text around the image. ... </div> However, if the word is longer

Trying to sort out algorithm for JQuery

我的未来我决定 提交于 2020-01-13 07:15:32
问题 In an attempt to improve this answer here: How to make divs stack without spaces and retain order on smaller sizes - in Bootstrap I have been trying to work out how to create a jQuery that will dynamically set the margin-top of divs depending on the accumulated height total in comparison to the height total of the adjacent column of divs. The css: div {outline:solid 1px red; } // Set media container widths small to test code. @media (min-width: 400px) { .container { max-width: 1170px; } .left

Trying to sort out algorithm for JQuery

限于喜欢 提交于 2020-01-13 07:15:09
问题 In an attempt to improve this answer here: How to make divs stack without spaces and retain order on smaller sizes - in Bootstrap I have been trying to work out how to create a jQuery that will dynamically set the margin-top of divs depending on the accumulated height total in comparison to the height total of the adjacent column of divs. The css: div {outline:solid 1px red; } // Set media container widths small to test code. @media (min-width: 400px) { .container { max-width: 1170px; } .left

CSS Float does not stretch Div Height

十年热恋 提交于 2020-01-11 19:58:11
问题 I have had this problem for a long time when working with HTML/CSS and Floats. In the image you can see I have a Box Div that is Floated left as there is many of these Boxes. Inside the Box I have a <UL> List. The List items <li> are also Floated left. As you can see in the image, the List items do not make the Box Div that they are inside of Expand. I have tried several thing without much luck and was hoping someone with more experience could help? I cannot set a fixed height on the Box Div

CSS Float does not stretch Div Height

此生再无相见时 提交于 2020-01-11 19:58:06
问题 I have had this problem for a long time when working with HTML/CSS and Floats. In the image you can see I have a Box Div that is Floated left as there is many of these Boxes. Inside the Box I have a <UL> List. The List items <li> are also Floated left. As you can see in the image, the List items do not make the Box Div that they are inside of Expand. I have tried several thing without much luck and was hoping someone with more experience could help? I cannot set a fixed height on the Box Div

Need CSS sidebar height to expand with content

老子叫甜甜 提交于 2020-01-11 04:01:07
问题 I have a two column layout, with a gray sidebar on the right. I need the sidebar's height to expand when the height of the left column is increased (due to content being dynamically expanded). I can make the sidebar fit a static page, but I cannot get it to increase in size with the rest of the page. Did some Googling, but couldn't find a work-around that worked for me. Does anyone know how to do this? 回答1: This is a common problem when using DIVS for this type of layout. If you google 'Faux

css display property when a float is applied

心已入冬 提交于 2020-01-11 03:36:25
问题 When an element is floated, how do different display properties affect the layout? Or, what are the differences, if any, between these classes: div.foo { display: block; float: left; } div.foo2 { display: inline; float: left; } div.foo3 { display: inline-block; float: left; } EDIT: If there are no differences according to the spec, then do certain antiquated versions of browsers (ahem, IE) render them differently? 回答1: If I read the spec correctly, and practice confirms this, setting float:

How to place two divs side by side where one sized to fit and other takes up remaining space?

眉间皱痕 提交于 2020-01-10 17:59:08
问题 This should be easy... why is this not easy? I am looking to have 2 divs side by side, where one div will auto size to the content inside and the second div will simply fill the remaining width. I need the text in the 'remaining width' div to be truncated if it is too large though, as I can only have these divs occupy one line. I have been searching all day and the closest I found was this post which suggested using tables that STILL didn't fix the issue. Here is the jsfiddle code that

How to place two divs side by side where one sized to fit and other takes up remaining space?

北城余情 提交于 2020-01-10 17:59:03
问题 This should be easy... why is this not easy? I am looking to have 2 divs side by side, where one div will auto size to the content inside and the second div will simply fill the remaining width. I need the text in the 'remaining width' div to be truncated if it is too large though, as I can only have these divs occupy one line. I have been searching all day and the closest I found was this post which suggested using tables that STILL didn't fix the issue. Here is the jsfiddle code that