How to achieve this oval layout with CSS
Tags: html,css,css3
Problem :
How to achieve this layout with CSS?
Solution :
You can try this: https://jsfiddle.net/dqhx5cf5/
HTML:
<div class="rectangle"><div class="circle"></div></div>
CSS:
.rectangle{
background-color: darkblue;
width: 300px;
height: 500px;
overflow:hidden;
}
.circle{
border-radius: 50%;
width: 600px;
height: 600px;
background-color: #ddd;
position:relative;
left: -150px;
top: 100px;
border: 2px dashed darkblue;
box-shadow: 0 0 0px 5px #ddd;
}
BUT with Firefox the curved line does not appear dashed because is not compatible with mozilla, but if you check it from IE and Chrome it works as well.
CSS Howto..
Added tabindex, works in Chrome: http://jsfiddle.net/fW3yW/1/ From here: css focus not working in safari and chrome jQuery method: http://jsfiddle.net/fW3yW/12/...
margin: auto; for vertical align , tex-align:center; for horizontal align
In your timeline class, I would make the width 100% and then add another div with a class inside of that (.line). Center the .line div and style accordingly. The...
Giving the span "#the_requested" a specific width will cause overflow to go to a new line. For example #the_requested { background: purple; width: 168px; } Example: http://codepen.io/anon/pen/zIhca Obviously you would...
Here's a list of classes you need to use for styling select2 input: /* Input field */ .select2-selection__rendered { } /* Around the search field */ .select2-search { } /*...
concat.js is being included in the concat task's source files public/js/*.js. You could have a task that removes concat.js (if the file exists) before concatenating again, pass an array to...
A checkbox being "checked" is not a style. It's a state. CSS cannot control states. You can fake something by using background images of check marks and lists and what...
Like this : .arrow { border: solid 10px transparent; border-right-color: #FFF; } Demo : http://jsfiddle.net/sparkup/edjdxjf2/ UPDATE : It can also be achieved without empty elements with the css property :before...
You could place your footer HTML in a separate file, and then use javascript to load the HTML content of that file, and append it to a div in your...
Here is solution: $(function() { var max = 400; var $slider = $('.slider'); function set(a, b) { $slider[0].style.setProperty("--from", (a / max) * 100); $slider[0].style.setProperty("--to", (b / max) * 100); }...
Try adding the stylesheet in which your .cse .gsc-control-cse, .gsc-control-cse { background-color: transparent; border: none; width: 280px; } styles are after google's css. e.g. your html might look something like...
add a visible class .visible::-webkit-input-placeholder{ color: #000 !important; } add the above class to the textarea's where you need to display placeholder...
You could try #mylist {margin: 0 auto}. It centers only the select element. If you want to center all the content within your div then #list { text-align: center; }...
Demo Now define your #main ID display:inline-block and give to text-align:center in your .centerer class Write to do this as like this Css #main { background-color: blue; height: 50px; width:...
Simple is you just add in SASS: ul > li{ margin:-1px }...
This may work for you. It works on IE6 and Firefox 2.0.0.17 for me. Give it a shot. I made the footer's height very tall, just for effect. You would...
Well, I don't have that much time right now. But I tell you this: Your logo is an object wich is an inline element, same as (link) and normal text....
Bootstrap utilizes specific classes to control the width of input elements: In a Rails template, you'd invoke a text_field_tag in the following manner: <%= text_field_tag('input_second', nil, class: 'input-large') %> ...
table#some_id {margin:10px;} Btw. you should never use * {margin:0;padding:0;}. Rather try a CSS reset...
Do you want something like http://www.dynamicdrive.com/dynamicindex1/chrome/index.htm Added: Some css based menus http://purecssmenu.com/ -- guess you can generate the css http://cssmenumaker.com/drop_down_css_menu.php http://sperling.com/examples/menuh/...
For chrome you can use Quick Source Viewer to see all CSS, whether in the body or the head, whether in the served HTML or injected at runtime. It is...
Voila! a { display:inline-block; font-size:60px; line-height:1.5em; position:relative; color:green } a:before { content:attr(title); display:block; position:absolute; width:0; height:1.5em; overflow:hidden; color:red; transition:all 1s linear; } a:hover:before {width:100%;} https://jsfiddle.net/s3f9y560/1/...
In my code I just do something like this @media screen and (max-width: the size you need) .container width: 98% I just call this after importing the materializecss sass and...
you can use style as a property of a div <div class="example div" style="visibility:hidden;"> this will require to create a new layout . or you can just use this js...
Your aim in writing CSS should be the readability and maintainability of your stylesheet. Usually that means writing as few rules as possible, a goal that is helped by using...
h3 { width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; /* magic happens here */ } ...
The order which objects in the page are loaded can to my knowledge not be controlled in any other way than by using a javascript. Different browsers also load the...
Maybe you are trying to place DIV(0) IN DIV(1) and DIV(1) should contain DIV(2) AND DIV(3) side by side. For That: <html> <head> <title>Practice the advanced elements/css3</title> </head> <body> <div...
Your table headers <th> are simply to long. You have 3 options: Use scrolling in x direction: .module_content { overflow-x: auto; } Use max-width on table cells with break-word: th...
DEMO You can use css3 transform: translateY(-100%) and transition: transform .3s ease and use Jquery to addCLass or toggleClass active $( ".sn" ).click(function() { $(".persside").addClass("active"); }); div.persside { background-color: rgba(38,38,38,0.9);...