I have a couple of free tier rails apps running on heroku which run really well and I have no problems with.
But this one
kearns.herokuapp.com
is so slow to load! The dyno doesn't sleep as i'm pinging it every few minutes.
If anyone had time could they give it a quick visit and see what they think it might be? Would really appreciate it!
CSS
#import "twitter/bootstrap/bootstrap";
// Set the correct sprite paths
#iconSpritePath: image-url("twitter/bootstrap/glyphicons-halflings.png");
#iconWhiteSpritePath: image-url("twitter/bootstrap/glyphicons-halflings-white.png");
// Set the Font Awesome (Font Awesome is default. You can disable by commenting below lines)
#fontAwesomeEotPath: font-url("fontawesome-webfont.eot");
#fontAwesomeEotPath_iefix: font-url("fontawesome-webfont.eot?#iefix");
#fontAwesomeWoffPath: font-url("fontawesome-webfont.woff");
#fontAwesomeTtfPath: font-url("fontawesome-webfont.ttf");
#fontAwesomeSvgPath: font-url("fontawesome-webfont.svg#fontawesomeregular");
// Font Awesome
#import "fontawesome/font-awesome";
// Glyphicons
//#import "twitter/bootstrap/glyphicons.less";
// Your custom LESS stylesheets goes here
//
// Since bootstrap was imported above you have access to its mixins which
// you may use and inherit here
//
// If you'd like to override bootstrap's own variables, you can do so here as well
// See http://twitter.github.com/bootstrap/customize.html#variables for their names and documentation
//
// Example:
// #link-color: #ff0000;
p.navbar-text a:hover {
text-decoration:none;
}
#phone a:hover {
text-decoration:none;
}
#overflow {
overflow:hidden;
}
html, body {
overflow-x:hidden;
}
#welcome_container {
overflow:auto;
padding-bottom:40px;
}
.jumbotron {
position:relative;
top:-320px;
background:transparent;
text-align:center;
color:#fff;
margin-bottom:0;
padding-bottom:0px;
}
.jumbotron h1 {
position:relative;
font-weight:bold;
border-bottom:1px solid #fff;
}
span {
color:#F9DF31;
color:#FAED49;
font-family:Tahoma;
font-style:italic;
}
.jumbotron p {
margin-bottom:35px;
}
.test {
position:relative;
top:-320px;
background:transparent;
text-align:center;
color:#fff;
margin-bottom:0;
padding-bottom:0px;
}
.test h1 {
position:relative;
font-weight:bold;
}
.test p {
margin-bottom:35px;
margin-top:25px;;
}
#about_container {
margin-top:70px;
}
#map_container {
background:#fff;
}
// Images
#home_image {
margin-top:40px;
}
.img-polaroid {
margin-top: 80px;
}
// ------
#block {
height:50px;
}
#middle {
padding-bottom:60px;
padding-top:30px;
}
/*
-----------------------------
Navbar
-----------------------------
*/
.navbar-default {
background:#023249;
border-color:#008AE6;
border-color:#fff;
}
.navbar-default .navbar-nav > li > a {
font-size: 13px;
font-family: "Libre Baskerville", sans-serif;
color:#fff;
}
.navbar-default .navbar-nav > li > a:hover {
color:#CAFF42;
color:#F9DF31;
color:#FAED49;
}
.navbar-default .navbar-brand {
color:#fff;
font-size:2em;
color:#FAED49;
font-family:Tahoma;
font-style:italic;
font-weight:bold;
}
.navbar-default .navbar-brand:hover {
color:#FAED49;
color:#FAED49;
}
.navbar-text {
font-size:13px;
padding-top:3px;
font-style:italic;
font-family:sans-serif;
font-family:helvetica;
color:#fff;
}
p.navbar-text a {
color:#fff;
}
p.navbar-text a:hover {
color:#CAFF42;
background:#023249;
color:#F9DF31;
color:#FAED49;
}
p.navbar-text {
color:#fff;
}
// Home Page
.background-image {
height:525px;
background-image:asset-data-url("good.jpg");
background-repeat:no-repeat;
background-size: 1500px 525px;
text-align:center;
background-color:#fff;
}
#media screen and (min-width: 1550px) {
.background-image {
background-size: 100% 525px;
}
}
#welcome_container {
padding-top:30px;
}
#text_block {
height:300px;
background:#000;
margin-top:150px;
opacity:0.5;
}
#image_row {
background:#064780;
background:#F6FAFB;
background:#49708A;
}
// Contact & Map
#map {
height:400px;
width:100%;
margin:0;
background:gray;
}
// Headings
h3.center-text {
text-align:center;
margin-top:40px;
}
h3.home {
text-align:center;
color:#fff;
}
// Paragraphs
p.welcome-text {
color: #333;
font-size: 19px;
font-family: "Libre Baskerville",
serif; line-height: 40px;
text-align: justify;
padding-top: 10px;
}
p.image-text {
color: #333;
font-size: 18px;
font-family: "Libre Baskerville",
serif; line-height: 30px;
text-align: justify;
padding-top: 20px;
}
p.service-text {
color: #333;
font-size: 17px;
font-family: "Libre Baskerville",
serif; line-height: 40px;
text-align: justify;
}
// Misc
.push {
margin-bottom:50px;
}
#no_line {
text-decoration:none;
}
// Buttons
.btn btn-primary {
color:#fff;
}
// Services Page
#service_row_2 {
margin-top:70px;
background-color:#E6E6E6;
}
#service_first_para {
margin-bottom: 40px;
}
#service_header {
margin-top:50px;
background:#F6FAFB;
background:#064780;
background:#A0C2DE;
background:#49708A;
}
#service_heading {
margin-top:45px;
}
#service_h4 {
text-align:center;
}
/*
-------------------------
Catalog Page
-------------------------
*/
#catalog_header {
margin-top:100px;
background:#001A29;
}
#catalog_heading {
margin-top: 45px;
}
#catalog_first_para {
margin-bottom: 40px;
}
#catalog_h4 {
margin-top:50px;
}
/*
-------------------------
About Page
-------------------------
*/
#about_header {
margin-top:50px;
background:#023249;
margin-bottom:40px;
}
#about_div {
height:500px;
}
#about_div_second {
margin-top:50px;
}
#staff_heading {
text-align:right;
}
/*
-----------------------------
Footer
-----------------------------
*/
#footer {
height:100px;
background:#fff;
}
#footer h3 {
color:#fff;
}
Wow, your application.css file (http://kearns.herokuapp.com/assets/application-c515eba896f4bd53f59a05b117a195e0.css right now) is over 16 MB. It looks like you included actual image file there - it should only have the image's url.
You can add free new relic addon on heroku and examin deeply what's going on, how your app react to requests.
Related
I know how to add CSS classes to specific days with beforeShowDay, but I have no idea how to add an individual CSS property. I'm trying to color specific days with a hex value, and I don't know what those will be ahead of time so I can't just have classes for all of them.
Consider the following example.
$(function() {
var classSize = {
"04192021": 12,
"04202021": 2,
"04212021": 20,
"04222021": 6,
"04232021": 4,
"04262021": 9
};
$("#datepicker").datepicker({
beforeShowDay: function(date) {
var dateString = $.datepicker.formatDate("mmddyy", date);
var result = [
date.getDay() == 0 || date.getDay() == 6 ? false : true,
"blue-0",
"0 Students Attending"
];
if (classSize[dateString]) {
result[1] = "blue-" + classSize[dateString];
result[2] = classSize[dateString] + " Students Attending";
}
return result;
}
});
});
.ui-datepicker td.blue-0 a {
background-color: #FFFFFF;
}
.ui-datepicker td.blue-1 a {
background: #EFEFFF;
}
.ui-datepicker td.blue-2 a {
background: #DFDFFF;
}
.ui-datepicker td.blue-3 a {
background: #CFCFFF;
}
.ui-datepicker td.blue-4 a {
background: #BFBFFF;
}
.ui-datepicker td.blue-5 a {
background: #AFAFFF;
}
.ui-datepicker td.blue-6 a {
background: #9F9FFF;
}
.ui-datepicker td.blue-7 a {
background: #8F8FFF;
}
.ui-datepicker td.blue-8 a {
background: #7F7FFF;
}
.ui-datepicker td.blue-9 a {
background: #6F6FFF;
}
.ui-datepicker td.blue-10 a {
background: #5F5FFF;
color: #fff;
}
.ui-datepicker td.blue-11 a {
background: #4F4FFF;
color: #fff;
}
.ui-datepicker td.blue-12 a {
background: #3F3FFF;
color: #fff;
}
.ui-datepicker td.blue-13 a {
background: #2F2FFF;
color: #fff;
}
.ui-datepicker td.blue-14 a {
background: #1F1FFF;
color: #fff;
}
.ui-datepicker td.blue-15 a {
background: #0F0FFF;
color: #fff;
}
.ui-datepicker td.blue-16 a {
background: #0E0EFF;
color: #fff;
}
.ui-datepicker td.blue-17 a {
background: #0D0DFF;
color: #fff;
}
.ui-datepicker td.blue-18 a {
background: #0B0BFF;
color: #fff;
}
.ui-datepicker td.blue-19 a {
background: #0A0AFF;
color: #fff;
}
.ui-datepicker td.blue-20 a {
background: #0909FF;
color: #fff;
}
.ui-datepicker td.blue-21 a {
background: #0808FF;
color: #fff;
}
.ui-datepicker td.blue-22 a {
background: #0707FF;
color: #fff;
}
.ui-datepicker td.blue-23 a {
background: #0606FF;
color: #fff;
}
.ui-datepicker td.blue-24 a {
background: #0505FF;
color: #fff;
}
.ui-datepicker td.blue-25 a {
background: #0404FF;
color: #fff;
}
.ui-datepicker td.blue-26 a {
background: #0303FF;
color: #fff;
}
.ui-datepicker td.blue-27 a {
background: #0202FF;
color: #fff;
}
.ui-datepicker td.blue-28 a {
background: #0101FF;
color: #fff;
}
.ui-datepicker td.blue-29 a {
background: #0000FF;
color: #fff;
}
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<p>Date: <input type="text" id="datepicker"></p>
This is one way to do what you want to accomplish. With SASS you could make more variable styling. You may even be able to use things like CSS var().
There is no easy way to access the element as it's created dynamically. You can use widget() to do this; yet you have to run it often and repeatedly.
You might consider batches, so for example Less than 5, gets #EEF. 5 - 10 gets #DDF, 11 - 15 gets #CCF etc.
$(function() {
var classSize = {
"04192021": 12,
"04202021": 2,
"04212021": 20,
"04222021": 6,
"04232021": 4,
"04262021": 9,
"04272021": 29,
"04282021": 16,
"04292021": 27,
"04302021": 7
};
$("#datepicker").datepicker({
beforeShowDay: function(date) {
var dateString = $.datepicker.formatDate("mmddyy", date);
var result = [
date.getDay() == 0 || date.getDay() == 6 ? false : true,
"blue-0",
"0 Students Attending"
];
if (classSize[dateString]) {
switch (true) {
case classSize[dateString] < 5:
result[1] = "blue-1";
break;
case classSize[dateString] < 10:
result[1] = "blue-2";
break;
case classSize[dateString] < 15:
result[1] = "blue-3";
break;
case classSize[dateString] < 20:
result[1] = "blue-4";
break;
case classSize[dateString] < 25:
result[1] = "blue-5";
break;
case classSize[dateString] < 30:
result[1] = "blue-6";
break;
case classSize[dateString] >= 30:
result[0] = false;
result[1] = "blue-7";
break;
}
result[2] = classSize[dateString] + " Students Attending";
}
return result;
}
});
});
.ui-datepicker td.blue-0 a {
background-color: #FFFFFF;
}
.ui-datepicker td.blue-1 a {
background: #CCF;
}
.ui-datepicker td.blue-2 a {
background: #AAF;
}
.ui-datepicker td.blue-3 a {
background: #88F;
}
.ui-datepicker td.blue-4 a {
background: #66F;
}
.ui-datepicker td.blue-5 a {
background: #44F;
color: #FFF;
}
.ui-datepicker td.blue-6 a {
background: #22F;
color: #FFF;
}
.ui-datepicker td.blue-7 a {
background: #00F;
color: #FFF;
}
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<p>Date: <input type="text" id="datepicker"></p>
I tried to implement select2 plugin using the Bulma css framework but it seems messy in frontend. I tried this using bootstrap and yes there's no problem since select2 has a bootstrap compatibility.
HTML:
<div class="field">
<label class="label">Role</label>
<p class="control">
<span class="select is-fullwidth">
<select2 v-model="form.role"
placeholder="Select Role"
name="role"
:value="form.role"
:multiple="false"
>
<option></option>
<option v-for="role in roles" :value="role.id">{{ role.display_name }}</option>
</select2>
</span>
</p>
</div>
I made it work, maybe my example can help you.
View
<div class="field">
<label class="label">Hair</label>
<div class="control">
<select2 class="is-medium" v-model="post.custom_data.hair" :options="{}">
#foreach (config('post.cat.hair') as $id => $value)
<option value="{{ $id }}">{{ __($value) }}</option>
#endforeach
</select2>
</div>
</div>
SASS
.select2-wrapper {
.select2-container {
.select2-selection {
transition: border-color $speed;
font-family: $family-sans-serif;
height: 2.285em;
line-height: 1.5;
font-size: 1rem;
outline: none !important;
display: inline-flex;
align-items: center;
width: 100%;
border-color: $border;
border-radius: $radius;
&:hover {
border-color: $border-hover;
}
.select2-selection__rendered {
padding-left: 0.75em;
padding-right: 0.75em;
}
.select2-selection__arrow {
display: none;
}
}
&.select2-container--open {
.select2-selection {
border-color: $primary;
&:hover {
border-color: $primary;
}
}
}
}
&.is-medium {
.select2-container {
.select2-selection {
font-size: $size-5;
}
}
}
&.is-large {
.select2-container {
.select2-selection {
font-size: $size-4;
}
}
}
}
.select2-container {
.select2-dropdown {
border-color: $primary;
.select2-search {
margin: 10px;
.select2-search__field {
#extend .input;
border-radius: $radius !important;
}
}
.select2-results__options {
max-height: 210px;
.select2-results__option {
padding: 0.75em;
font-family: $family-sans-serif;
font-size: 1rem;
&.select2-results__option--highlighted {
background: $primary;
}
}
}
}
}
Result
Hope it helps ^^
.select2-container {
.select2-selection--single {
height: auto !important;
padding: 3px 0 !important;
border: 1px solid #dbdbdb !important;
.select2-selection__arrow{
top: 5px !important;
}
.select2-selection__placeholder {
color: #dbdbdb !important;
}
}
.select2-dropdown {
border: 1px solid #dbdbdb !important;
border-top: 0 !important;
.select2-search {
margin: 5px;
.select2-search__field {
padding: 10px !important;
border-radius: 3px !important;
font-size: 1rem;
height: 2.25em;
box-shadow: inset 0 1px 2px rgba(10,10,10,.1);
max-width: 100%;
width: 100%;
border-radius: 3px !important;
}
}
.select2-results__options {
max-height: 200px !important;
.select2-results__option {
padding: 0.37em 0.75em !important;
font-size: 1rem;
&.select2-results__option--highlighted {
}
}
}
}
}
I open issue about this.
https://github.com/jgthms/bulma/issues/1555
i know this question has been several times,but none of the solutions worked for me
I have a JumboElevator.css.scc file
#import "bootstrap-sprockets";
#import "bootstrap";
Then i have just one page
new.html.erb
It has internal stylesheet
.jumbotron {
background: #358CCE;
color: #FFF;
border-radius: 0px;
}
.jumbotron-sm { padding-top: 24px;
padding-bottom: 24px; }
.jumbotron small {
color: #FFF;
}
.h1 small {
font-size: 24px;
}
#error_explanation {
color: red;
ul {
color: red;
margin: 0 0 30px 0;
}
}
.field_with_errors {
#extend .has-error;
.form-control {
color: #b94a48;
}
}
.navbar-brand
{
padding:2px 5px;
}
.icon
{
padding:5px;
}
.check_box_type
{
padding-left:5px;
}
.field_with_errors .form-control {
border-color: #a94442;
box-shadow: inset 0 1px 1px rgba(0,0,0,0.075);
}
.field_with_errors .form-control {
color: #b94a48;
transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
}
After i included active admin,my this internal styling are getting overridden ny active admin stylesheet.
Please can anyone help me
Moving active_admin.css.scss to vendor folder didnt work
All this is happening when deploying to heroku
I am making a responsive site sandbox.mercomcorp.com. My question is the css that am using for an ipad is changing myt desktop css why is that? The ipad is another media query from my desktop? Attached is my css.
#phone {font-size:18px; }
p.serviceheader {font-size:18px; color:#464646;}
#servicetext {margin-top:-227px; margin-left:15px; color:#ffffff;}
#servicelink {margin-top:-4px; margin-left:15px}
#securitylink {margin-top:20px; margin-left:2px}
#networkinfrastructurelink {margin-top:-20px; margin-left:-2px}
#itlink {margin-top:-20px; margin-left:8px}
#datalink {margin-top:46px; margin-left:8px; color:#ffffff;}
#personnellink {margin-top:6px; margin-left:15px}
#hometext {font-size:31px; text-align:right; line-height:1.5; font-weight:bold; margin-top:-25px;}
#abouthome {margin-left:20px; float:left;}
#contacthome {font-size:23px; color:#464646; font-weight:bold;}
#prefooter {color:#464646; font-size:23px;}
#careershome {color:#464646; font-size:18px; margin-top:-5px;}
#jointeam {color:#464646; font-size:23px; margin-top:35px;}
#benefits {color:#464646; font-size:23px; margin-top:7px;}
#joinus {color:#464646; font-size:23px; margin-top:38px; }
#employees {color:#464646; font-size:18px; margin-top:10px; line-height:20px;}
p.corporateoffice {font-size:20px; color:#464646;}
p.officetext {color:#464646;}
#footer-links {font-size:12px;}
#chamberlogo {margin-top:10px; margin-left:28px;}
#sbalogo {margin-left:3px;margin-top:30px;}
#bicsilogo {margin-left:53px;}
#alliance {margin-left:15px;}
#mbchamber {margin-left:3px;}
#pmilogo {margin-left:55px;}
.prefooterlink a {color:#464646;}
#afcealogo {margin-bottom:-9px; margin-left:30px;}
#bbb {margin-left:17px;}
#infocommlogo {margin-left:40px;}
h1.relatedpgs {font-size:24px; color:#990812; margin-left:-8px;}
h1.pheader {font-size:26px;}
.customheader {margin-top:-60px;}
.bodycontentalign {margin-left:11px;}
.navalign {margin-top:-15px; margin-left:11px;}
.topphone {margin-top:-15px; margin-left:115px;}
.socialicons {margin-top:-32px; margin-left:60px;}
.footercontactinfo {background:url('/wp-content/uploads/2012/05/ragedge-right.gif') repeat-y scroll right top #ECECEC;
color: #5a5858;
float: left;
min-height:260px;
width: 260px;
}
.footerlogos {background:url('/wp-content/uploads/2012/05/ragedge-left.gif') repeat-y scroll left top #ECECEC;
color: #5A5858;
float: left;
min-height:260px;
width: 680px;
margin-left:-95px;
}
.innerpagenav {background-color:#ececec;}
#block-69 {margin-top:-15px;}
#block-72 {margin-top:-74px; margin-left:-1px;}
#block-73 {margin-top:-70px; margin-left:-19px; background-color:#000000; color:#ffffff;}
#block-372 {margin-top:-55px;}
#block-370 {margin-top:-45px;}
#block-25 {margin-top:25px;}
#datacentertext {margin-top:-245px; margin-left:10px; color:white;}
#itintegrationtext {margin-top:-245px; margin-left:10px; color:white;}
#securitytext {margin-top:-245px; margin-left:10px; color:#ffffff;}
#networkinfrastructuretext {margin-top:-245px; margin-left:10px; color:#ffffff;}
#vtctext {margin-top:-245px; margin-left:5px; color:#ffffff;}
/*regular site css*/
.container
{
/*text-align:left;
display:inline-block;
width:100%;
height:auto;
overflow: hidden; */
background-color:white;
display:inline-block;
height:100%;
width: 100%;
/*border: solid 1px #aaa;*/
text-align: left;
font-size: 1em;
/*letter-spacing:px; */
/*white-space: nowrap; */
/*line-height: 12px; */
}
.square
{
/*margin:auto;
width:20%;
text-align:left;
display:inline-block;
float:left;*/
width:19.5%;
margin:auto;
/* border: solid 1px #ccc; */
display: inline-block;
vertical-align:middle;
}
.words
{
background-color:#990913; color:white;
/*display:inline-block;*/
width:12.85em;height:15em;
}
#block-72 li.widget
{
margin-bottom:2%;
}
.title
{
/*display:inline-block;*/
font-size:18px;
padding-bottom:5px;
/*color:#444444;*/
}
#block-73 li.widget
{
margin-top:5%;
}
#block-66/*phone numbers*/
{
/*background-color:purple;*/
position:relative;
top:-10px;
margin-left:105px;
}
#block-67
{
padding-top:5%;
}
#block-52
{
padding-top:15px;
}
a.linktext
{
color:#464646 !important; font-size:20px; text-decoration:underlined;
}
a.linktext1
{
color:#464646 !important; font-size:20px; text-decoration:underlined;
}
a.linktext2
{
color:#464646 !important; font-size:20px; text-decoration:underlined;
}
.fb-hide
{
position: absolute !important;
top: -9999px !important;
left: -9999px !important;
}
.corporateoffice
{
color:#464646;
font-size:20px;
}
.officetext
{
color:#464646;
}
#media screen and (min-width: 770px)
{
.hide
{
position: absolute !important;
top: -9999px !important;
left: -9999px !important;
}
a.linktext1
{
position: absolute !important;
top: -9999px !important;
left: -9999px !important;
}
}
/*#media screen and (min-width: 768px)and (orientation:portrait)
{
.container
{
height:100%;
width:100%;
text-align:center;
background-color:white;
display:inline-block;
}
.square
{
margin:auto;
width:15em!important;
text-align:center;
display:inline-block;
}
.words
{
width:100%;
}
a.linktext
{
color:#464646 !important; font-size:17px; text-decoration:underlined;
}
a.linktext1
{
color:#464646 !important; font-size:17px; text-decoration:underlined;
}
a.linktext2
{
position: absolute !important;
top: -9999px !important;
left: -9999px !important;
}
.centerlink
{
text-align: center;
}
#block-65
{
margin:-65 0 0 0 ;
position:absolute;
left:75px;
}
#block-66
{
background:blue;
position:absolute;
top:484px;
}
}
*/
#media only screen and (max-width: 500px)and (orientation:landscape)/*iphone 4*/{
.container
{
width:100%;
text-align:center;
background-color:white;
}
.square
{
margin:auto;
width:15em !important;
text-align:left;
}
.fb
{
position:relative;
/*top:-80px!important;*/
/*right:20px;*/
background:white;
z-index:3;
}
.words
{
width:100%;
height:203px!important;
text-align:center;
}
/*.topfooter
{
color:blue!important;
}*/
.botfooter
{
float:right;
position:absolute;
top:20px;
right:-225px!important;
}
.officetext
{
font-size:12px!important;
}
.coporateoffice
{
font-size:14px!important;
}
#employees
{
width:100%;
margin:0 ;
padding: 0;
}
.contact1{
position:absolute;
top:2050px!important;
margin-top:0px;
/*margin-top:100px!important;*/
}
}
#media screen and (max-width: 680px) and (orientation:landscape)/*landscape small phone*/
{
#wrapper-4,#wrapper-5,#wrapper-9,#wrapper-10,#wrapper-11,#wrapper-12,#wrapper-13,#wrapper-14,#wrapper-15,#wrapper-16,#wrapper-17/*stops from scrolling horizontal*/
{
width:auto;
overflow: hidden;
maxwidth:auto;
padding :0.5em;
}
.hide img /*logo*/
{
width:68%;
height: 185px;
/*display: block;*/
margin: auto !important;
}
.container
{
/* height:100%;*/
width:100%;
text-align:center;
background-color:white;
/*display:inline-block;*/
}
.square
{
margin:auto;
width:20em;
text-align:left;
/* display:inline-block;*/
}
.words
{
width:100%;
font-size:16px;
height:145px;
text-align:center;
}
#block-72 li.widget
{
margin-bottom:2%;
}
.title
{
/*display:inline-block;*/
font-size:18px;
padding-bottom:5px;
/*color:#444444;*/
}
#block-73 li.widget
{
margin-top:5%;
}
#block-66
{
width:100%
display:inline;
font-weight:bold;
posititon:absolute;
left:-25px;
top:5px;
letter-spacing:2px;
white-space:nowrap;
font:OpenSans-Semibold;
}
.phonenav
{
font-size:20px!important;
line-height:200%;
}
.insideimg
{
/* align:center;*/
/* position:absolute;*/
/*top:300px;*/
height:auto;
width:300px;
float:right;
}
/*.officetext
{
position:absolute;
top:500%;
width:100%;
font-size:20px;
white-space:nowrap;
color:red;
}*/
a.linktext2
{
position: absolute !important;
top: -9999px !important;
left: -9999px !important;
}
.centerlink {
text-align: center;
}
#block-38
{
margin:0;
position:absolute;
top:1625px;
width:100%;
}
.corporateoffice
{
font-color:black!important;
font-size:20px!important;
white-space:nowrap !important;
}
.officetext
{
font-size:18px!important;
}
/* .fb
{
position:absolute;
left:2px;
text-align:right;
background:white;
position: absolute !important;
top: -9999px !important;
left: -9999px !important;
}*/
.fb-hide
{
position:absolute;
left:2px;
text-align:right;
background:white;
/* background-color:white;
padding:right:40px;
position:absolute
z-index:-1;
*/
}
#block-67
{
display:inline-block;
background-color:white!important;
position:relative;
left:235px;
top:20px;
z-index:2;
}
/*.fb
{
background:white;
}
*/
a.linktext
{
color:#464646 !important; font-size:20px; text-decoration:underlined;
}
a.linktext1
{
color:#464646 !important; font-size:20px; text-decoration:underlined;
}
.block-type-hwr-contact #hwr-contact-27 .hwr-form-title {
line-height:90%;
}
.topfooter
{
margin:0 0 0 0 ;
position:absolute;
top:80px!important;
background:transparent
}
.botfooter
{
margin:0 0 0 0;
float:right;
position:absolute;
top:1px;
right:-330px;
background:transparent;
}
.contact {
position:absolute;
top:640px;
margin-top:100px!important;
}
}
#media only screen (device-height : 568px) and (device-width : 320px)and (-webkit-min-device pixel-ratio: 2)and (orientation : landscape)/*iphone 5*/
{
.container
{
/* height:100%;*/
width:100%;
text-align:center;
background-color:white;
/*display:inline-block;*/
}
.square
{
margin:auto;
width:15em;
text-align:left;
/* display:inline-block;*/
}
.botfooter
{
float:right;
position:absolute;
top:2px;
right:20px;
}
}
#media screen and (min-width: 320px) and (max-width: 480px)/*small devices*/
{
.hide/*logo*/
{
margin-top:10%;
margin-bottom:2px;
display:block;
}
a.linktext2
{
position: absolute !important;
top: -9999px !important;
left: -9999px !important;
}
.container{
width:100%;
text-align:left;
height:auto;
background-color:white;
}
.square{
margin:auto;
width:100%;
text-align:left;
display:inline-block;
background-color:white;
}
.words
{
color:white;
font-size:18px;
text-align:center;
background-color:#990913;
width:100%;
height:150px;
}
.title
{
width:100%;
}
#block-73 li.widget
{
margin-top:30%;
}
#block-66
{
position: relative;
top: 55px;
padding-left:60%;
font-weight:bold !important;
z-index:2;
line-height:4px;
}
.phonenum
{
background-color:white;
/*padding:right:40px;*/
position:absolute;
top:-3px;
z-index:-1;
}
.insideimg
{
/* align:center;*/
/* position:absolute;*/
/*top:300px;*/
height:120px;
width:140px;
float:right;
}
.centerlink {
text-align: center;
}
.footer
{
color:black!important;
font-size:20px;
}
.fb
{
background:white;
}
.fb-hide
{
position: absolute !important;
top: -9999px !important;
left: -9999px !important;
}
.insideimg
{
/* align:center;*/
/* position:absolute;*/
/*top:300px;*/
height:auto;
float:right;
}
}
It may be your lack of spaces around the word "and" in your media queries. Per W3C, it's malformed code: http://www.w3.org/TR/css3-mediaqueries/#error-handling
Thus:
#media only screen and (max-width: 500px)and (orientation:landscape)/*iphone 4*/{
should be
#media only screen and (max-width: 500px) and (orientation:landscape)/*iphone 4*/{
I have an ASP.NET MVC View that works great on IE7, but looks really crappy when I try to view it with IE6. With IE6, the white area of the page (the ContentPlaceHolder part) is bunched over to the right and does weird things like move around when I resize the window. I have looked in the .aspx, Site.Master, and Site.css to see what is the problem but I can't find it anywhere! Can someone help? Here are my files:
Login.aspx:
<%# Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" AutoEventWireup="true" CodeBehind="Login.aspx.cs" Inherits="EventScheduler.View.Views.Account.Login" %>
<asp:Content ID="loginContent" ContentPlaceHolderID="MainContent" runat="server">
<h2>Login</h2>
<p>
Please enter your username and password below.
</p>
<%= Html.ValidationSummary() %>
<% using (Html.BeginForm()) { %>
<div>
<table>
<tr>
<td>Username:</td>
<td>
<%= Html.TextBox("username") %>
<%= Html.ValidationMessage("username") %>
</td>
</tr>
<tr>
<td>Password:</td>
<td>
<%= Html.Password("password") %>
<%= Html.ValidationMessage("password") %>
</td>
</tr>
<tr>
<td></td>
<td><input type="submit" value="Login" /></td>
</tr>
</table>
</div>
<% } %>
</asp:Content>
Site.Master:
<%# Master Language="C#" AutoEventWireup="true" CodeBehind="Site.master.cs" Inherits="EventScheduler.View.Views.Shared.Site" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title><%= Html.Encode(ViewData["Title"]) %></title>
<link href="../../Content/Site.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="page">
<div id="header">
<div id="title">
<h1>ASCCC Event Scheduler Application</h1>
</div>
<div id="logindisplay">
<% Html.RenderPartial("LoginUserControl"); %>
</div>
<div id="menucontainer">
<ul id="menu">
</ul>
</div>
</div>
<div id="main">
<asp:ContentPlaceHolder ID="MainContent" runat="server" />
<div id="footer">
ASCCC Event Scheduler Application © Copyright 2009
</div>
</div>
</div>
</body>
</html>
Site.css:
/*----------------------------------------------------------
The base color for this template is #5c87b2. If you'd like
to use a different color start by replacing all instances of
#5c87b2 with your new color.
----------------------------------------------------------*/
body
{
background-color: #5c87b2;
font-size: .75em;
font-family: Verdana, Helvetica, Sans-Serif;
margin: 0;
padding: 0;
color: #696969;
}
a:link
{
color: #034af3;
text-decoration: underline;
}
a:visited
{
color: #505abc;
}
a:hover
{
color: #1d60ff;
text-decoration: none;
}
a:active
{
color: #12eb87;
}
p, ul
{
margin-bottom: 20px;
line-height: 1.6em;
}
/* HEADINGS
----------------------------------------------------------*/
h1, h2, h3, h4, h5, h6
{
font-size: 1.5em;
color: #000;
font-family: Arial, Helvetica, sans-serif;
}
h1
{
font-size: 2em;
padding-bottom: 0;
margin-bottom: 0;
}
h2
{
padding: 0 0 10px 0;
}
h3
{
font-size: 1.2em;
}
h4
{
font-size: 1.1em;
}
h5, h6
{
font-size: 1em;
}
/* this rule styles <h2> tags that are the
first child of the left and right table columns */
.rightColumn > h1, .rightColumn > h2, .leftColumn > h1, .leftColumn > h2
{
margin-top: 0;
}
/* PRIMARY LAYOUT ELEMENTS
----------------------------------------------------------*/
/* you can specify a greater or lesser percentage for the
page width. Or, you can specify an exact pixel width. */
.page
{
width: 90%;
margin-left: auto;
margin-right: auto;
}
#header
{
position: relative;
margin-bottom: 0px;
color: #000;
padding: 0;
}
#header h1
{
font-weight: bold;
padding: 5px 0;
margin: 0;
color: #fff;
border: none;
line-height: 2em;
font-family: Arial, Helvetica, sans-serif;
font-size: 32px !important;
}
#main
{
padding: 30px 30px 15px 30px;
background-color: #fff;
margin-bottom: 30px;
_height: 1px; /* only IE6 applies CSS properties starting with an underscrore */
}
#footer
{
color: #999;
padding: 10px 0;
text-align: center;
line-height: normal;
margin: 0;
font-size: .9em;
}
/* TAB MENU
----------------------------------------------------------*/
ul#menu
{
border-bottom: 1px #5C87B2 solid;
padding: 0 0 2px;
position: relative;
margin: 0;
text-align: right;
}
ul#menu li
{
display: inline;
list-style: none;
}
ul#menu li#greeting
{
padding: 10px 20px;
font-weight: bold;
text-decoration: none;
line-height: 2.8em;
color: #fff;
}
ul#menu li a
{
padding: 10px 20px;
font-weight: bold;
text-decoration: none;
line-height: 2.8em;
background-color: #e8eef4;
color: #034af3;
}
ul#menu li a:hover
{
background-color: #fff;
text-decoration: none;
}
ul#menu li a:active
{
background-color: #a6e2a6;
text-decoration: none;
}
ul#menu li.selected a
{
background-color: #fff;
color: #000;
}
/* MISC
----------------------------------------------------------*/
.clear
{
clear: both;
}
.error
{
color:Red;
}
#menucontainer
{
margin-top:40px;
}
#title
{
display:block;
float:left;
text-align:left;
}
#logindisplay
{
font-size:1.1em;
display:block;
text-align:right;
margin:10px;
color:White;
}
#logindisplay a:link
{
color: white;
text-decoration: underline;
}
#logindisplay a:visited
{
color: white;
text-decoration: underline;
}
.field-validation-error
{
color: #ff0000;
}
.input-validation-error
{
border: 1px solid #ff0000;
background-color: #ffeeee;
}
.validation-summary-errors
{
font-weight: bold;
color: #ff0000;
}
body
{
}
.button
{
width:75px
}
.eventLink
{
}
.alert
{
color:Red
}
.message
{
color:Green
}
.registrationField
{
width:700px
}
.registrationField_Enabled
{
background-color:#336699;
width:700px
}
.fieldName
{
}
.requiredBox
{
}
.detailType
{
}
.fieldOptions
{
}
.pageTitle
{
color:Black;
font-size:large
}
.pageSubTitle
{
color:Black;
font-size:medium
}
.staticFieldLabel
{
color:Black;
width:150px
}
.staticFieldTextBox
{
width:250px
}
.dynamicFieldLabel
{
color:Black;
width:150px
}
.dynamicFieldDropDown
{
width:250px
}
.dynamicFieldPhoneNumberUS1
{
width:30px;
}
.dynamicFieldPhoneNumberUS2
{
width:30px;
}
.dynamicFieldPhoneNumberUS3
{
width:40px;
}
.dynamicFieldPhoneNumberUS4
{
width:40px;
}
Having a width of 90% on your page wrap may not be the best idea. Setting a pixel value (say 800px) will eliminate some of the issues you may be having with jumping content.
Also, you should modify div#title and div#logindisplay
#title
{
width: 600px;
float:left;
}
#logindisplay
{
font-size:1.1em;
float:right;
text-align:right;
padding:10px;
color:White;
width:150px;
}
It seems like you want your page centered. IE6 needs a little help. (text-align:center;)
body
{
background-color: #5c87b2;
font-size: .75em;
font-family: Verdana, Helvetica, Sans-Serif;
margin: 0;
padding: 0;
color: #696969;
text-align:center;
}
Is it worthwile trying to make it look good in IE6. It is on the way out and very few people use it. If you create web sites for IE7 + 8 and also Firefox 2 + 3 then you have covered 80% of your market.