css3

Flexbox: how to add margin / vertical spacing for the case there is more than one row?

五迷三道 提交于 2020-01-05 01:07:10
问题 here is the codepen I want to add vertical spacing ONLY to elements between line 1 and line 2. Alternatively, only to between line 1 and line 2, and line 2 and line 3. The flex items are random, so the amount, size of each, is dynamic. I cannot add margins to all, because that would ruin the layout in case there is no second row at all. HTML <div class="flexContainer"> <div class="flexItem">a a a aaaaaaa a ax</div> <div class="flexItem">bbbx</div> <div class="flexItem">c c c c c cx</div> <div

How to remove gaps in flexbox?

本小妞迷上赌 提交于 2020-01-04 18:32:27
问题 I have built a tab in flexbox with :target which shows .details div when it is clicked. Unfortunately the .details div is very high and has a huge gap at the bottom of the paragraph. Is there a solution in CSS to remove this gap? Demo: https://jsfiddle.net/ocgjrzre/ p { margin: 10px; } body { display: flex; flex-wrap: wrap; } .my-wrap { // height: 200px; width: 90%; margin: 50px auto; display: flex; flex-direction: column; flex-wrap: wrap; align-content: space-between; border: 1px solid #eee;

CSS3 to style Java?

孤人 提交于 2020-01-04 16:59:09
问题 I'm about to begin a project in Java where I'm essentially making a dumbed-down iTunes clone. I will be using Swing to make the GUI, but I was wondering the best way to style it in a way similar to iTunes beyond just changing colors/fonts/borders. I have looked into using CSS along with Java Swing, but any resources I've found are out of date. Are there any new ways to approach this? Or should I be looking into something besides CSS? Here is the design I'm looking to implement via Swing (the

How to make video with full height

一世执手 提交于 2020-01-04 15:27:45
问题 I need your help to make this video with full height. Although, the div size is around 50% and when i make my video fixed position, it works like full background video but i want to make it fit into my div with full height. Have look what i want Here You can check my video html code <div class="video"> <div id="video-holder" style="width:100%; position: absolute; height: auto !important; max-height:100%;"> <video id="video" style="width:100%; height:100%;"> <source src="http://www.w3schools

How to make video with full height

↘锁芯ラ 提交于 2020-01-04 15:27:31
问题 I need your help to make this video with full height. Although, the div size is around 50% and when i make my video fixed position, it works like full background video but i want to make it fit into my div with full height. Have look what i want Here You can check my video html code <div class="video"> <div id="video-holder" style="width:100%; position: absolute; height: auto !important; max-height:100%;"> <video id="video" style="width:100%; height:100%;"> <source src="http://www.w3schools

CSS: Keep Aspect Ratio of an Element for Given Height

无人久伴 提交于 2020-01-04 14:12:54
问题 The above link to a possible duplicate is not a solution for this case, because the height will be a fixed value for several breakpoints. I have some DIVs with display:inline-block , so they are floating nicely side by side. These DIVs all have the same height, e.g. height:300px . Later, I will load an image inside every DIV with Ajax, and I want the DIV to keep the aspect ratio of the image, so they won't wiggle all around, when the image is actually loaded. So when the DIVs are displayed in

CSS: Keep Aspect Ratio of an Element for Given Height

别说谁变了你拦得住时间么 提交于 2020-01-04 14:12:45
问题 The above link to a possible duplicate is not a solution for this case, because the height will be a fixed value for several breakpoints. I have some DIVs with display:inline-block , so they are floating nicely side by side. These DIVs all have the same height, e.g. height:300px . Later, I will load an image inside every DIV with Ajax, and I want the DIV to keep the aspect ratio of the image, so they won't wiggle all around, when the image is actually loaded. So when the DIVs are displayed in

Images Not Appearing in Chrome and Firefox

天大地大妈咪最大 提交于 2020-01-04 14:03:44
问题 I've tried searching on the web including Stack Overflow and haven't found a solution. So I just finished developing a website on Mac and it looks fine on Chrome, Firefox, and Safari. When I go to use Windows, everything shows up fine in Internet Explorer, but not on Chrome and Firefox. Some images don't load in Chrome and Firefox only on PC! I inspected the elements with both browsers and it looks fine. Here is the code: <table> <tr> <td><a href="https://www.facebook.com/appenze"><img style

Break long words inside flex item

笑着哭i 提交于 2020-01-04 13:44:15
问题 I would like to break long words inside "div2", both div2 and div3 width cannot be greater than parent width (i.e 150px). The only thing that works is word-break: break-all but this will break short words as well. #div1{ display: flex; max-width: 150px; height: 100px;; } #div2{ background-color: gray; } #div3{ background-color: rgb(197, 181, 181); } #div4{ width: 150px; background-color: rgb(144, 199, 172); } <div id="div1"> <div id="div2">aaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbb</div> <div id=

need to fix retina sprite css issue

假装没事ソ 提交于 2020-01-04 13:42:26
问题 I'm trying to optimize the mobile skin for www.talkjesus.com to be retina clear. I accomplished this with standalone images such as the facebook/twitter icons, the logo and the top right 3 icons in the header as well. Problem I'm having is doing this for the sprite image entirely. This is the css code (default) .ui-icon, .ui-icon-searchfield:after { background-image: url({vb:stylevar imgdir_mobile}/metro-icons-24.png); border-radius: 0; background-color: transparent; } .ui-icon-plus