How to draw a line from the middle of the page to the right side?
Tags: javascript,html,css,frontend
Problem :
How to draw a line (using css, html or js) from the middle of the page to the right side?
This should work on a different screen resolutions.
The example provided in the picture.
Solution :
Maybe like this?
HTML
<div class="line"></div>
CSS
div.line {
width: 75%;
height: 1px;
margin-left: 25%;
background: red;
}
Demo
CSS Howto..
Stylesheet Switcher in jQuery. In response to the 'newbie followup' comment, I will try to make it a little more instructional. The page I was playing with to test on...
If you use a mixture of css and jquery you should be able to achieve what you want: css .ui-spinner, .ui-spinner > a, .ui-spinner-input {box-sizing:border-box;} .ui-spinner > a {width:24px; text-align:center;}...
Usually this is not necessary because color is an inherited property. However, links have a color defined by default in the user agent stylesheet, so they don't inherit. You only...
You can accomplish the sort button styling, by using box-shadow - and inset to get the shadow inside the button. As well as border-radius for rounding the corners. HTML <a...
Remove -adult from the field and append it on the button click event. Example: var keywordInput = $('input[name="-adult"]'); $('input[name="SearchButton"]').click(function() { window.location = 'http://example.com?kwd=' + encodeURIComponent(keywordInput.val()); }); ...
If you do this it will stretch out your block title div all the way in your title-pop div. h2.block-title { margin: 0 auto; text-align: center; width: 100%; } ...
you can add margin-right value to the #menu li or #menu li a JS Fiddle #menu li { display: inline-block; margin-right:50px; } ...
There were some thing wrong with your code: You've 2 the same ID's (the A and the DIV), updated with data-target. You were searching for "#selected" instead of ".selected", updated...
You are hiding the vertical scrollbar, and not the horizontal one. Change overflow-y: hidden; to overflow-x: hidden; Heres a quick demo I've added content surpassing the height, and a div...
See this : Which characters are valid in CSS class names/selectors? A value will have a digit after the dot. Luckily, valid CSS class names cannot start with a digit...
JSP is really just HTML by the time it reaches the browser. CSS should be imported in the head element of the HTML document, not the body. CSS can be...
The width on your hover is causing the jump. I moved it to the "a" tag and cleaned up the other code a bit as well: #city-navigation li a {...
Following Turnip's comment, I added the following line to the CSS code (within the <style> tags): #accordion {text-align: left}; This has the desired effect of left-aligning the text in the...
You should be able to access the Style element by using someUiObject.getElement().getStyle() and then manipulate the style there....
Put a background color on the span to see why it isn't working. Those three items are in a div with no CSS associated with it. In order for the...
inner- display: inline; max-width: _%; max-height: 100%; outer- white-space: nowrap; and position set learn how from http://www.alistapart.com/articles/conflictingabsolutepositions ...
It's happening because the body, html and #wrapper height are not set to 100%, so add: html, body { height: 100%; } #wrapper { height: 100%; background-color: red; } ...
The :before and :after elements aren't really part of the dom, so you can't do this and will likely need a different approach. See Access the css ":after" selector with...
li { display: inline; /*float: left;*/ /* <----- */ font-size: 22px } li a { display: inline-block; /* <----- */ padding: 20px 20px; text-decoration: none; } JSFiddle...
You need to use CSS3 ~ to selecting all sibling of element. tr.node.active ~ tr { color: red; } tr.node.active ~ tr.node, tr.node.active ~ tr.node ~ tr { color: black;...
When you remove the row element the .col elements become your flex-items. In order to get flex-items to wrap in a flex container you need to use the flex-wrap property....
If you want to select the first child of the <div> you can use the following solution: div > :first-child { color:red; } <div> <p>Test #1</p> <div>Test #2</div> </div> ...
Add this rule to you CSS or change the CSS rules in the chosen.CSS file .chosen-container{ position:absolute !important; } DEMO...
To achieve what you are looking for you can use the viewport-percentage length vw. Here is a quick example I made on jsfiddle. HTML: <div class="square"> <h1>This is a Square</h1>...
Basically your Javascript could be shortened to: $(".question").click(function(argument) { $(this).parent().find(".answer").removeClass("hideinit").addClass("display"); }); In order to make this work the only other thing you need to do is to make question a...
Firefox / Webkit: -webkit-transform: rotate(-90deg); -moz-transform: rotate(-90deg); IE: filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3); ...
Since the content of a textarea is taken as plain text, you cannot use any span markup or any other markup there, and you cannot style any part of it...
You can structure your css like this: a { color: #0f0; } a.special { text-decoration: none; color: #00f; } a:hover { color: #0ff; } a.special:hover { text-decoration: underline; color: #ff0;...
If you can estimate the window size, where the movement should stop, (let's say 700px) you can use media queries: @media (max-width: 700px) { .xyz { left: 10px; } }...
You would most likely need to use a server-based language, like SQL. HTML, CSS and PHP will be required, and Javascript a great plus. Mainly, what you would do is...