I need to customize day name in AntD calendar. For Sunday, instead "Su" needs to show "Sun". Is there any way?
Thanks.
I had to manually change each th and span content. you can change the code as per your need.
styles.css
.App {
font-family: sans-serif;
text-align: center;
}
/* sunday */
.ant-fullcalendar.ant-fullcalendar-full>div>table>thead>
tr th:nth-child(1)>span{
display: none;
}
.ant-fullcalendar.ant-fullcalendar-full>div>table>thead>
tr th:nth-child(1):after{
content: "Sun";
display: block;
font-weight: normal;
}
/* monday */
.ant-fullcalendar.ant-fullcalendar-full>div>table>thead>
tr th:nth-child(2)>span{
display: none;
}
.ant-fullcalendar.ant-fullcalendar-full>div>table>thead>
tr th:nth-child(2):after{
content: "Mon";
display: block;
font-weight: normal;
}
/* tuesday */
.ant-fullcalendar.ant-fullcalendar-full>div>table>thead>
tr th:nth-child(3)>span{
display: none;
}
.ant-fullcalendar.ant-fullcalendar-full>div>table>thead>
tr th:nth-child(3):after{
content: "Tue";
display: block;
font-weight: normal;
}
/* wednesday */
.ant-fullcalendar.ant-fullcalendar-full>div>table>thead>
tr th:nth-child(4)>span{
display: none;
}
.ant-fullcalendar.ant-fullcalendar-full>div>table>thead>
tr th:nth-child(4):after{
content: "Wed";
display: block;
font-weight: normal;
}
/* thursday */
.ant-fullcalendar.ant-fullcalendar-full>div>table>thead>
tr th:nth-child(5)>span{
display: none;
}
.ant-fullcalendar.ant-fullcalendar-full>div>table>thead>
tr th:nth-child(5):after{
content: "Thu";
display: block;
font-weight: normal;
}
/* friday */
.ant-fullcalendar.ant-fullcalendar-full>div>table>thead>
tr th:nth-child(6)>span{
display: none;
}
.ant-fullcalendar.ant-fullcalendar-full>div>table>thead>
tr th:nth-child(6):after{
content: "Fri";
display: block;
font-weight: normal;
}
/* saturday */
.ant-fullcalendar.ant-fullcalendar-full>div>table>thead>
tr th:nth-child(7)>span{
display: none;
}
.ant-fullcalendar.ant-fullcalendar-full>div>table>thead>
tr th:nth-child(7):after{
content: "Sat";
display: block;
font-weight: normal;
}
Here is the code sandbox. Change the code as per your need.code . Hope it helps.
antd calender
For me it worked by setting the information I wanted on the correct property using momentjs:
<Calendar
locale={{
lang: {
locale: 'en',
dayFormat: moment.updateLocale('en', {
weekdaysMin: [ 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat' ]
})
}
}}
/>
In order to change to portuguese, for example, here's what have worked for me:
(Also, before that, it's important to use a 'wrapper' class in DatePicker in order to reach the desired elements. To do that, I used a class called 'pt-datepicker', in the following way)
<DatePicker dropdownClassName="pt-datepicker" />
Read more about 'dropdownClassName' here: https://ant.design/components/date-picker/#Common-API
And now, the SCSS to change the label of each week day:
.pt-datepicker {
.ant-picker-panel-container {
.ant-picker-panel {
.ant-picker-date-panel {
.ant-picker-body {
.ant-picker-content {
thead {
tr {
th:nth-child(1) {
visibility: hidden;
position: relative;
}
th:nth-child(1):after {
visibility: visible;
position: absolute;
top: 50%;
left: 50%;
content: 'Dom';
transform: translate(-50%, -50%);
}
th:nth-child(2) {
visibility: hidden;
position: relative;
}
th:nth-child(2):after {
visibility: visible;
position: absolute;
top: 50%;
left: 50%;
content: 'Seg';
transform: translate(-50%, -50%);
}
th:nth-child(3) {
visibility: hidden;
position: relative;
}
th:nth-child(3):after {
visibility: visible;
position: absolute;
top: 50%;
left: 50%;
content: 'Ter';
transform: translate(-50%, -50%);
}
th:nth-child(4) {
visibility: hidden;
position: relative;
}
th:nth-child(4):after {
visibility: visible;
position: absolute;
top: 50%;
left: 50%;
content: 'Qua';
transform: translate(-50%, -50%);
}
th:nth-child(5) {
visibility: hidden;
position: relative;
}
th:nth-child(5):after {
visibility: visible;
position: absolute;
top: 50%;
left: 50%;
content: 'Qui';
transform: translate(-50%, -50%);
}
th:nth-child(6) {
visibility: hidden;
position: relative;
}
th:nth-child(6):after {
visibility: visible;
position: absolute;
top: 50%;
left: 50%;
content: 'Sex';
transform: translate(-50%, -50%);
}
th:nth-child(7) {
visibility: hidden;
position: relative;
}
th:nth-child(7):after {
visibility: visible;
position: absolute;
top: 50%;
left: 50%;
content: 'Sab';
transform: translate(-50%, -50%);
}
}
}
}
}
}
}
}
}
Related
I just completed mimicking app creation just like I did in online lessons. I figure, I'd take a little step further by making my app look nicer.
I am trying to change my "home" link text to an image.
Surely, I have done that in HTML before but not in Rails. I am a bit confused because of "link_to" method. How do I do it, giving my current set-up?
application.html.erb
<header>
<div class="header-logo">
<%= link_to("Home", "/") %>
</div>
...
where routes.rb are
get "/" => "home#top"
home.scss
* {
box-sizing: border-box;
}
html {
font: 100%/1.5 'Avenir Next', 'Hiragino Sans', sans-serif;
line-height: 1.7;
letter-spacing: 1px;
}
ul, li {
list-style-type: none;
padding: 0;
margin: 0;
}
a {
text-decoration: none;
color: #2d3133;
font-size: 14px;
}
h1, h2, h3, h4, h5, h6, p {
margin: 0;
}
input {
background-color: transparent;
outline-width: 0;
}
form input[type="submit"] {
border: none;
cursor: pointer;
}
/* Common Layout ================================ */
body {
color: #2d3133;
background-color: white;
margin: 0;
min-height: 1vh;
background-image: url("/top.jpg");
}
.main {
position: absolute;
top: 64px;
width: 100%;
height: auto;
min-height: 100%;
background-color: #f5f8fa;
}
.container {
max-width: 600px;
margin: 60px auto;
padding-left: 15px;
padding-right: 15px;
clear: both;
}
/* Header ================================ */
header {
height: 64px;
position: absolute;
z-index: 1;
width: 100%;
}
.header-logo {
float: left;
padding-left: 20px;
color: black;
font-size: 22px;
line-height: 64px;
}
.header-logo a{
color: black;
font-size: 22px;
}
.header-menus {
float: right;
padding-right: 20px;
}
.header-menus li {
float: left;
line-height: 64px;
font-size: 13px;
color: black;
padding-left: 15px;
}
.header-menus a {
float: left;
font-size: 13px;
color: black;
padding-right: 15px;
}
.header-menus .fa {
padding-right: 5px;
}
.header-menus input[type="submit"] {
padding: 0 20px;
float: left;
line-height: 64px;
color: black;
margin: 0;
font-size: 13px;
}
/* Top ================================ */
.top-main {
padding: 200px 0 100px;
text-align: center;
position: absolute;
top: 0;
width: 100%;
height: auto;
min-height: 100%;
color: black;
background-color: white;
background-repeat: no-repeat;
background-position: center 50%;
background-size: cover;
background-image: url("/top.jpg");
}
.top-message {
position: relative;
}
.top-main h2 {
font-size: 70px;
font-weight: 500;
line-height: 1.3;
-webkit-font-smoothing: antialiased;
margin-bottom: 20px;
}
.top-main p {
font-size: 24px;
}
/* About ================================ */
.about-main {
padding: 180px 8% 0;
color: black;
}
.about-main h2 {
font-size: 64px;
font-weight: 500;
line-height: 1.4;
}
.about-main p {
font-weight: 200;
font-size: 20px;
}
.about-img {
width: 25%;
}
/* Form ================================ */
.form {
max-width: 600px;
margin: 0 auto;
background-color: black;
box-shadow: 0 2px 6px #c1ced7;
}
.form-heading {
font-weight: 300;
margin: 60px 0 20px;
font-size: 48px;
color: #bcc8d4;
}
.form-body {
padding: 30px;
}
.form-error {
color: #ff4d75;
}
.form input {
width: 100%;
border: 1px solid #ffffff;
padding: 10px;
color: #57575f;
font-size: 16px;
letter-spacing: 2px;
border-radius: 2px;
}
.form textarea {
width: 100%;
min-height: 110px;
font-size: 16px;
letter-spacing: 2px;
}
.form input[type="submit"] {
background-color: #ffffff;
color: black;
cursor: pointer;
font-weight: 300;
width: 120px;
border-radius: 2px;
margin-top: 8px;
margin-bottom: 0;
float: right;
}
.form-body:after {
content: '';
display: table;
clear: both;
}
/* Flash ================================ */
.flash {
padding: 10px 0;
color: black;
background: rgb(251, 170, 88);
text-align: center;
position: absolute;
top: 64px;
z-index: 10;
width: 100%;
border-radius: 0 0 2px 2px;
font-size: 14px;
}
Thank you for your time :)
You can try it <%= link_to image_tag('image_here'), '/' %>
I think this is what you want
<%= link_to "#{image_tag("name-of-img-here.png")}".html_safe, root_path %>
Make sure you image is in the app/assets/images/ folder for this to link correctly.
You will also likely need to add a class and then style it the image for it to look good.
I read several places that its a CSS issue but I can't figure out how to fix it.
When a user types information into the website, it does not display any text but the cursor moves as if text was typed.
CSS file
*:focus,
*:hover,
*:active {
outline: none;
}
html {
overflow-x: hidden;
}
body {
margin: 0;
color: #6a6f8c;
background: #fafafa;
font: 600 16px/18px 'Open Sans', sans-serif;
height: auto;
}
*,
:after,
:before {
-webkit-box-sizing: border-box;
box-sizing: border-box
}
.clearfix:after,
.clearfix:before {
content: '';
display: table
}
.clearfix:after {
clear: both;
display: block
}
a {
color: inherit;
text-decoration: none
}
.login-wrap {
width: 100%;
margin: auto;
max-width: 525px;
min-height: 1070px;
position: relative;
background: url(https://raw.githubusercontent.com/khadkamhn/day-01-login-form/master/img/bg.jpg) no-repeat center;
-webkit-box-shadow: 0 12px 15px 0 rgba(0, 0, 0, .24), 0 17px 50px 0 rgba(0, 0, 0, .19);
box-shadow: 0 12px 15px 0 rgba(0, 0, 0, .24), 0 17px 50px 0 rgba(0, 0, 0, .19);
background-size: cover;
}
.login-html {
width: 100%;
height: 100%;
position: absolute;
padding: 90px 70px 50px 70px;
background: rgba(40, 57, 101, .9);
}
.login-html .sign-in-htm,
.login-html .sign-up-htm {
top: 0;
left: 0;
right: 0;
bottom: 0;
position: absolute;
-webkit-transform: rotateY(180deg);
transform: rotateY(180deg);
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
-webkit-transition: all .4s linear;
transition: all .4s linear;
}
.login-html .sign-in,
.login-html .sign-up,
.login-form .group .check {
display: none;
}
.login-html .tab,
.login-form .group .label,
.login-form .group .button {
text-transform: uppercase;
}
.login-html .tab {
font-size: 22px;
margin-right: 15px;
padding-bottom: 5px;
margin: 0 15px 10px 0;
display: inline-block;
border-bottom: 2px solid transparent;
}
.login-html .sign-in:checked+.tab,
.login-html .sign-up:checked+.tab {
color: #fff;
border-color: #1161ee;
}
.login-form {
min-height: 345px;
position: relative;
-webkit-perspective: 1000px;
perspective: 1000px;
-webkit-transform-style: preserve-3d;
transform-style: preserve-3d;
}
.login-form .group {
margin-bottom: 15px;
}
.login-form .group .label,
.login-form .group .input,
.login-form .group .button {
width: 100%;
color: #fff;
display: block;
}
.login-form .group .input,
.login-form .group .button {
border: none;
padding: 15px 20px;
border-radius: 25px;
background: rgba(255, 255, 255, .1);
}
.login-form .group input[data-type="password"] {
text-security: circle;
-webkit-text-security: circle;
}
.login-form .group .label {
color: #aaa;
font-size: 12px;
}
.login-form .group .button {
background: #1161ee;
}
.login-form .group label .icon {
width: 15px;
height: 15px;
border-radius: 2px;
position: relative;
display: inline-block;
background: rgba(255, 255, 255, .1);
}
.login-form .group label .icon:before,
.login-form .group label .icon:after {
content: '';
width: 10px;
height: 2px;
background: #fff;
position: absolute;
-webkit-transition: all .2s ease-in-out 0s;
transition: all .2s ease-in-out 0s;
}
.login-form .group label .icon:before {
left: 3px;
width: 5px;
bottom: 6px;
-webkit-transform: scale(0) rotate(0);
transform: scale(0) rotate(0);
}
.login-form .group label .icon:after {
top: 6px;
right: 0;
-webkit-transform: scale(0) rotate(0);
transform: scale(0) rotate(0);
}
.login-form .group .check:checked+label {
color: #fff;
}
.login-form .group .check:checked+label .icon {
background: #1161ee;
}
.login-form .group .check:checked+label .icon:before {
-webkit-transform: scale(1) rotate(45deg);
transform: scale(1) rotate(45deg);
}
.login-form .group .check:checked+label .icon:after {
-webkit-transform: scale(1) rotate(-45deg);
transform: scale(1) rotate(-45deg);
}
.login-html .sign-in:checked+.tab+.sign-up+.tab+.login-form .sign-in-htm {
-webkit-transform: rotate(0);
transform: rotate(0);
}
.login-html .sign-up:checked+.tab+.login-form .sign-up-htm {
-webkit-transform: rotate(0);
transform: rotate(0);
}
.hr {
height: 2px;
margin: 60px 0 50px 0;
background: rgba(255, 255, 255, .2);
}
.foot-lnk {
text-align: center;
}
.fullwidth {
width: 100%;
}
.fulheight {
height: 100%;
}
.main {
background: #fafafa;
padding: 15px;
}
.btn__grp button:last-child {
margin-right: 15px;
}
.blank_input_hack {
height: 0;
width: 0;
opacity: 0;
}
.input option {
color: black;
}
#promoForm {
max-width: 600px;
margin: 0 auto;
}
/*.tooltip.ng-scope.ng-isolate-scope.top.fade.in{
word-break: break-word;
}*/
.color-box>div {
display: inline-block;
margin-bottom: 15px;
}
.color-box>div:not(:last-child) {
margin-right: 3px;
}
.color-box>div label {
margin: 0;
padding: 3px;
border: solid 1px #979797;
}
.btn.pull-right {
margin-right: 10px;
}
#user {
text-transform: lowercase;
}
input,
textarea {
-webkit-user-select: text;
-khtml-user-select: text;
-moz-user-select: text;
-ms-user-select: text;
user-select: text;
}
table tr th {
background: #337ab7;
color: white;
text-align: left;
vertical-align: center;
}
The website is https://braindrain.developmentserver.me
I think I have found the solution. Nice tip if you didn't know this, you can plug your iPhone into a Mac via usb and use the web inspector remotely. I found that you have a div before the username input form with the class blank_input_hack. Once I removed this, then the input works flawlessly, styled and all. Not sure why this was there in the first place, but there you go! Hope this helps!
In my app I need to present an HTML file in TextView not in WebView, and this file has a complex CSS, not just text color, bold, etc.
My CSS is like the one below:
table {
width: 100%;
}
table td {
padding: 10px;
border-bottom: 1px solid #eee;
box-sizing: border-box;
}
/* -------------------------------------------------- */
.btn {
float: left;
font-size: 11px;
color: #FFF!important;
text-transform: uppercase;
background: #a8353a;
padding: 0 14px;
margin: 10px 0 0!important;
cursor: pointer;
line-height:30px;
}
.btn:hover {
background: #d8474e
}
/* -------------------------------------------------- */
ul li {
list-style-type: square;
margin: 10px 20px;
}
.allcaps {
text-transform:uppercase;
}
/* -------------------------------------------------- */
.tablewithimages .image {
width: 45%;
}
#media only screen and (max-width: 768px) {
.tablewithimages td, .tablewithimages .image {
display:block;
width:100%;
padding: 10px 0 0 0;
border:0;
}
.tablewithimages img {
margin-top:30px;
}
}
/* -------------------------------------------------- */
/* ---------------- RECOMMENDED APPS ---------------- */
.appslist a {
border: 0 !important;
}
.appslist ul {
vertical-align: top;
margin:0;
padding: 0;
}
.appslist li {
width: 48.5%;
display: inline-table;
margin-bottom: 50px;
vertical-align: top;
padding-right: 1%;
}
.inner_left_side.equal .appslist .appitem {
width: 100%;
padding-right: 0;
margin-bottom: 20px;
}
ul .appitem {
margin: 10px 0;
}
.appslist img {
height: auto;
max-height: 100%;
max-width: 100%;
width: 100%;
box-shadow: 1px 1px 3px rgba(0,0,0,0.1);
border: 1px solid #ccc;
border-radius: 18px;
overflow: hidden;
}
.appslist .appitem .image {
width: 70px;
height: 110px;
float: left;
margin-right: 10px;
margin-top: 0;
}
.appslist p {
padding-right: 10px;
margin-bottom: 10px;
text-align: initial;
}
.appslist .apptitle {
font-size: 14px;
margin-right: 10px;
padding-top: 0;
margin-top: 0;
margin-bottom: 7px;
text-transform: uppercase;
font-weight: bold;
}
.appslist .apptext {
font-size: 14px;
line-height: 22px;
margin-left: 90px;
}
.appslist .stores {
margin-left: 90px;
width: auto;
display: block;
}
.inner_left_side.equal .appslist .stores {
width: 100%;
text-align: initial;
}
.story .text .appslist .stores {
margin-left: 130px;
}
.appslist .appitem li {
display: inline-block;
min-height: 0;
margin-bottom: 0px;
width: 125px;
background-repeat:no-repeat;
margin: 0;
}
.appslist .appitem li a {
display: block;
padding-left: 33px;
background-repeat: no-repeat;
background-position: 5px center;
color: rgba(51,51,51,1.00);
background-color: rgba(255,255,255,0.00);
border-radius: 3px;
text-decoration: none;
padding-right: 10px;
line-height: 34px;
font-size: 14px;
background-size: auto 75%;
white-space: nowrap;
}
.stores .apple {
background-image:url('********.png');
}
.stores .android {
background-image:url('********.png');
}
#media only screen and (max-width: 800px) {
.appslist li {
width: 100%;
}
.inner_left_side.equal .appslist .stores {
width:auto;
}
}
I searched a lot on how to present full CSS in UITextView, and I found answers like this one but all these answers defined how to add simple CSS.
Does anyone try to add complex CSS to UITExtView before? Are there any libraries support this features?
I've created grid in MVC5 like
.
But I want a vertical line as a column separator like
I'm using grid.mvc (version: 3.0.0) of nugget package and default bootstrap for VS2013(MVC5).
Here is my Gridmvc.css
/***
* Grid.Mvc stylesheet http://gridmvc.codeplex.com/
* This file contains default styles for Grid.Mvc.
*/
/* Grid */
table.grid-table { margin: 0; }
table.grid-table .grid-wrap { padding: 0; position: relative; }
table.grid-table .grid-empty-text { color: #666; }
/* Grid headers */
table.grid-table .grid-header { position: relative; }
table.grid-table .grid-header .sorted-asc .grid-sort-arrow:after { content: " \2193"; }
table.grid-table .grid-header .sorted-desc .grid-sort-arrow:after { content: " \2191"; }
table.grid-table .grid-header > .grid-header-title { border: #999999 1px solid;height: 21px;background-color: #f0f0f0;text-overflow: ellipsis;overflow: hidden; }
/* Grid body */
/*table.grid-table tr.grid-row-selected td { background: #4888C2 !important; color: white; }*/
table.grid-table tr.grid-row-selected td { margin-bottom: 1px; padding-top: 0px; border: #000000 1px solid; height: 21px; }
/*table.grid-table tr.grid-row-selected a { color: white; }*/
table.grid-table tr.grid-row-selected a { margin-bottom: 1px; color: #000000; padding-top: 1px; border: #c4ddff 1px solid; height: 21px; background-color: #a7cdf0; }
/* Grid filtering */
input.grid-filter-input { padding: 4px; font-size: 13px; }
table.grid-table .grid-filter { position: relative; margin-top: 2px; float: right; width: 10px; height: 12px; }
table.grid-table .grid-filter-btn { cursor: pointer; display: block; width: 10px; height: 12px; background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAMCAYAAABbayygAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAJFJREFUKFNjkJSU/E8MZvj//78DMRhkoj+6bizYH2SiiIeHx2FjY+P/2DBIDqSGAQSOHTtmYWZm9hldEUgMJAdWBAJAHSzt7e056ApBYiA5qDIIAAoIhIaGroYpArFBYlBpVLB3715DmEIQGyqMCUDWwBRiWIkOYAqhXNwApMjX13c7lIsbgBQBrdWAcqGAgQEAdOGTrvsYKXIAAAAASUVORK5CYII=') no-repeat; }
table.grid-table .grid-filter-btn.filtered { background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAMCAYAAABbayygAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAJNJREFUKFNjYGj//58o/P//fwdiMIOkpKQ/VhOQMFgNULWIh4fHYWNj4//YMEgOpIYBBI4dO2ZhZmb2GV0RSAwkB1YEAkAdLO3t7TnoCkFiIDmoMggACgiEhoauhikCsUFiUGlUsHfvXkOYQhAbKowJQNbAFGJYiQ5gCqFc3ACkyNfXdzuUixuAFAGt1YByoYCBAQAUDanUpFB4UQAAAABJRU5ErkJggg==') no-repeat; }
table.grid-table .grid-filter-buttons { padding: 0; }
table.grid-table .grid-filter-datepicker { font-size: 12px; }
table.grid-table .grid-filter-datepicker table td { padding: 1px!important; }
table.grid-table .grid-filter-datepicker .ui-datepicker { width: auto; }
table.grid-table .grid-dropdown-inner ul.menu-list li a.grid-filter-clear { white-space: nowrap; padding-left: 23px; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAMCAYAAABbayygAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAARpJREFUKFNjYGj//58o/P//fwdiMIOkpKQ/VhOQMFgNULWIh4fHYWNj4//YMEgOpIYBBI4dO2axOC/396GinP/O+vpwRVbGxl92+vluXm1kuASsEKiD5VB99aG3eTH/HxjL/A/RUPsfrqb6f7e21uutlhbRYEUwAFQskOLmun2+lND/0xxM/7dycXzd6OxoCpVGBduWLjXv4+f/v5WF+f9RbtYvfeysqlApBKhhY2Hcxsy0+xAL038nbe3/m8W4ss/Jcx2GSiPAal6uvGtczP9TFOXBHgGJ7RHlmLGOjy0UrAAGzgT7rn7urP/P3NDgv6+v73aQWAMzM+dqTtbJYAUwsNzeyuhImE8GSBHQYxpQYYYJQCcxMDAwAAB7/bt5uWh9FAAAAABJRU5ErkJggg=='); background-position: 3px center; background-repeat: no-repeat; }
table.grid-table .grid-filter-choose.choose-selected { background-color: white!important; cursor: default; color: #999; }
table.grid-table .grid-popup-additional { padding: 3px 0 0 0; }
/* POP-UP */
.grid-dropdown { font-weight: normal; left: -102px; top: 16px!important; min-width: 180px; }
.grid-dropdown-arrow { background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAICAYAAADJEc7MAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOwgAADsIBFShKgAAAABp0RVh0U29mdHdhcmUAUGFpbnQuTkVUIHYzLjUuMTAw9HKhAAAAl0lEQVQoU42PMQuFMAyE6xN5gpOjjsIb/P9/o3O3zh27dY25kIPq8DBwmLT35WoQkUEVOmGec84CaW2q7+N+AdCD6M9SisQYTei1jsfyCeCu+vjFVGs1AN++94DRfUOfuNLoKUiyRC5y2F5I8NdaM4P/l0EswvBorQTnfxBhLMRih+2pklIy+eEtjQPu6MNZwIBNbwteMBd5X4ZGHcwL3QAAAABJRU5ErkJggg==") no-repeat; height: 8px; left: 99px; position: absolute; top: -8px; width: 14px; }
.grid-dropdown-inner { padding: 5px 7px; }
.grid-dropdown ul.menu-list { list-style-type: none; margin: 3px 0 0 0; padding: 0; }
.grid-dropdown ul.menu-list li a { text-decoration: none; background-position: 6px center; background-repeat: no-repeat; display: block; padding: 4px 5px; }
.grid-dropdown ul.menu-list li a:hover { background-color: #EEE; text-decoration: none; }
Added these two lines under GridBody in Gridmvc.css :
table.grid-table tr td {border-right: solid 1px #666;}
table.grid-table tr a {border-right: solid 1px #666;}
To add a right border to your table you need to apply it to your table headings and table data tags
Add this to your CSS and place it after the gridmvc.css.
td, th {
border-right: 4px solid black;
}
Hope this helps
I'm trying to use the background-image css property with a website I'm building with Ruby on Rails.
I've tried several different variations of background-image: url, background: url, with and without quotations, and several paths to the image. The image is currently located in app/assets/images/upload.png.
background: url(upload.png);
custom.css.scss
/* UNIVERSAL */
body {
background-color: black;
padding-top: 8px;
width: 800px;
margin-left: auto;
margin-right: auto;
font-family: arial, sans-serif;
font-size: 16px;
}
.content {
background-color: white;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
-khtml-border-radius: 10px;
border-radius: 10px;
padding: 1px 15px;
}
h2 {
font-size: 18px;
}
p {
font-size: 16px;
}
ol {
font-size: 16px;
}
/* NAVIGATION */
ul {
padding: 0px;
}
#navtop {
float: right;
display: inline-block;
position: relative;
bottom: 47px;
right:4px;
letter-spacing:1px;
}
#topnavcontainer {
margin-bottom: -40px;
}
#navtop li, #navbottom li, #navbuttons li {
display: inline;
margin: 0px;
padding: 0px;
}
#navbuttons {
word-spacing: 25px;
position: relative;
left: 400px;
bottom: 60px;
display: inline-block;
}
#navbottom {
text-align: center;
word-spacing:90px;
letter-spacing:1px;
margin-top:25px;
}
#navtop a:link, #navbottom a:link, #navtop a:visited, #navbottom a:visited {
text-decoration: none;
font-size: 12px;
color: #999999;
}
#navtop a:hover, #navbottom a:hover {
color: white;
}
#uploadbutton a:link, #uploadbutton a:visited, #viewbutton a:link, #viewbutton a:visited {
text-decoration: none;
border-style:solid;
border-width:3px;
border-color:#666666;
padding: 5px;
color: white;
font-size: 14px;
font-weight: bold;
letter-spacing:2px;
}
#uploadbutton a:hover {
color: #FF0000;
}
#viewbutton a:hover {
color: #0066FF;
}
/*style the main menu*/
.myMenu {
margin:0;
padding:0;
text-align: left;
}
.myMenu li {
list-style:none;
float:left;
}
.myMenu li a:link, .myMenu li a:visited {
display:block;
text-decoration:none;
padding: 0.5em 1em;
margin:0;
}
.myMenu li a:hover {
background-color:black;
}
/*style the sub menu*/
.myMenu li ul {
position:absolute;
visibility:hidden;
margin:0;
padding:0;
}
.myMenu li ul li {
display:inline;
float:none;
}
.myMenu li ul li a:link, .myMenu li ul li a:visited {
background-color:black;
width:55px;
}
.myMenu li ul li a:hover {
background-color:#999999;
}
/* HOME PAGE */
#homepage {
text-align: center;
}
#homeheadline {
color: white;
background-color: #333333;
font-weight:normal;
border-style:solid;
border-width:6px;
border-color:#333333;
letter-spacing:1px;
margin-bottom: 45px;
}
a#clickhere , a#clickhere:visited {
text-decoration: none;
color: #0066FF;
}
#videotitle {
color: #FF0000;
position: absolute;;
bottom: 70px;
display: inline;
font-size: 19px;
left: 60px;
}
#videolist {
position: absolute;
left: 40px;
display: inline-block;
}
#audiencetitle {
color: #0066FF;
position: absolute;
bottom: 70px;
left: 340px;
display: inline;
font-size: 19px;
}
#audiencelist {
position: absolute;
display: inline-block;
left: 320px;
}
a.greenbutton, a.greenbutton:visited, {
font-size: 14px;
color: white;
font-weight: bold;
text-decoration: none;
background-color: #009900;
border-style:solid;
border-width:7px;
border-color:#009900;
letter-spacing:1px;
}
#homead {
margin-bottom: 25px;
margin-top: 45px;
display: block;
}
#lists {
width: 538px;
height: 100px;
position: relative;
margin-bottom: 35px;
margin-left: auto;
margin-right: auto;
text-align: left;
}
/* FORMS */
.greenbutton {
font-family: arial, sans-serif;
font-size: 14px;
color: white;
font-weight: bold;
text-decoration: none;
background-color: #009900;
border-style:solid;
border-width:3px;
border-color:#009900;
letter-spacing:1px;
margin-bottom: 40px;
}
.textinput {
border: 1px solid #bbb;
height: 18px;
width: 300px;
margin-bottom:30px;
}
.signform {
text-align: center;
width:300px;
margin-left: auto;
margin-right: auto;
}
.signformfields {
text-align: left;
}
#error_explanation {
color:#f00;
font-size: 16px;
ul { list-style: none;
margin: 0 0 18px 0;
}
}
.field_with_errors {
#extend .control-group;
#extend .error;
}
/* Upload Menu */
#uploadpage {
height: 580px;
}
.uploadnav ul {
list-style-type: none;
}
.uploadnav {
width: 200px;
text-align: center;
float:left;
}
.uploadbox {
background-color: black;
background-image: url( image_path ("upload.png"));
border-style:solid;
border-width:25px;
border-color: black;
margin-top: 20px;
}
.uploadgreybox {
background-color: #CCCCCC;
border-style:solid;
border-width:25px;
border-color: #CCCCCC;
margin-top: 20px;
}
.uploadtext {
color: white;
background-color: black;
padding: 5px;
}
.uploadgreytext {
color: #666666;
background-color: #CCCCCC;
padding: 5px;
}
.uploadpagecontent {
float:right;
}
The most correct way:
background-image: url(<%= asset_path 'upload.png' %>)
See the Guide for details: http://guides.rubyonrails.org/asset_pipeline.html#coding-links-to-assets (sec. 2.2.1 CSS and ERB)
NOTE: If you're doing this in your application.css then add .erb extension to it to become application.css.erb
if somebody comes by and still looking for an answer and you're using SASS and bootstrap, you can try
background: image-url('bgImage.jpg');
that worked for me. You can as well take a look on http://guides.rubyonrails.org/asset_pipeline.html#coding-links-to-assets as jdoe mentioned.
You need to point to the image path correctly. It should be:
background: url(/assets/url.png);
Try using the Inspector in Google Chrome - useful for checking resources like this that are called by CSS.
I have had the similar problem and I found that the following code works
background-image: url('/assets/xyz.jpg');
you probably need to change the path to the image. Where is the css file in relation to the images folder, eg app/assets/css/style.css.
If it is here then your path the the upload.png will be background: url(../images/upload.png); background: url(/images/upload.png); or background: url(images/upload.png);
You shouldn't have to change the extention to your custom.css.scss or your importantly no need to add erb to the scss file
in application.css file in your /assets/stylesheets directory
all you need is an element
html{
background: url('/images/test.jpg');
text-align:center;
color:#fff;
}
Poss your css file, move the
try
background: white;z-index:-1;