Framework7 messages styling issue in FF - css

We are having an issue with framework7 messages in Firefox. The attached image shows the last message not properly displayed.
This can probably fixed by changing some css properties.
Below is the message template we used. No additional css stylings has been made.
<!-- template7 templates -->
<script type="text/template7" id="messagesTemplate">
<!-- Top Navbar-->
<div class="navbar">
<div class="navbar-inner">
<div class="left sliding"><i class="icon icon-back"></i><span>Back</span></div>
<div class="center sliding mobileNums" data-tonumber="{{#global.activeNumber}}" data-f2pmds="{{#global.f2pmds}}" data-fromnum="{{#global.fromNumber}}">{{#if #global.activeNumber}}{{#global.activeNumber}}{{else}}New Message{{/if}} </div>
<div class="right"><i class="icon icon-bars"></i></div>
</div>
</div>
<div class="pages navbar-through">
<div data-page="messages" class="page no-toolbar toolbar-fixed">
<div class="toolbar messagebar">
<div class="toolbar-inner"><i class="icon icon-camera"></i>
<textarea placeholder="Message"></textarea>Send
</div>
</div>
<div class="page-content messages-content">
<div class="messages">
{{#each messages}}
{{#if dsent}}
<div class="messages-date">{{dsent}}</div>
{{/if}}
{{#if sent}}
<div class="message message-sent">
<div class="message-text">{{body}}
<br />
{{#if time}}<div class="msgDate">{{time}}</div>{{/if}}
</div>
</div>
{{else}}
<div class="message message-received message-with-avatar">
<!---<div class="message-name">Kate</div>--->
<div class="message-text">{{body}}
<br />
{{#if time}}<div class="msgDate">{{time}}</div>{{/if}}
</div>
<div style="background-image:url(http://lorempixel.com/output/people-q-c-100-100-7.jpg)" class="message-avatar"></div>
</div>
{{/if}}
{{/each}}
</div>
</div>
</div>
</div>
</script>

It can't be fixed for Firefox. It just doesn't support CSS masks like in webkit browsers

If your messagebar is a fixed height, like mine, you can try
#-moz-document url-prefix() {
.messages{
padding-bottom: 44px;
}
.message-received > .message-text{
margin-left: 35px!important;
}
}
This works for me, but you can't add the tails on messages in any browser other than Chrome (or Safari).
This is because they are the only browsers to support the -webkit-mask-box-image property.

Related

What is right way to combine (AND) several conditions for nested CSS selectors?

I need to specify that what I want (<b>19</b>, etc) is simultaneously
within class="elem" and class="main" (descending CSS combinator- space)
direct children (CSS > immediate child combinator) of class="numbers" > class="numbers_wrapper" > class="container cleared"
What is the correct way how can I combine all those 5 conditions?
I need to extract this info
<b>19</b>
<b>12</b>
<b>14</b>
<b>23</b>
<b>10</b>
from this pattern in the middle of a web page :
<div class="elem">
<div class="main">
<div class="draw_date" title="08.04.2018 21:00">08.04.2018 21:00</div>
<div class="draw">
8277
</div>
<div class="numbers">
<div class="numbers_wrapper">
<div class="container cleared">
<b>19</b>
<b>12</b>
<b>14</b>
<b>23</b>
<b>10</b>
<b class="extra">02</b>
</div>
</div>
<div class="controls">
<a class="no_visited iconic nonunderline" title="Проверить билет"
href="/5x36plus/check_bulletin">⚲</a>
</div>
</div>
<div class="prize ">
<div class="jackpot_wrapper">
<span></span>
<span>3000000
</span>
</div>
<div class="jackpot_wrapper">
<span></span>
<span>3437960
</span>
</div>
</div>
</div>
Is my guess how to do it right?
div.elem > div.main div.numbers > div.numbers_wrapper > div.container.cleared b
P.S. I am using Jsoup web scraping lib for java (like here in the middle), it grabs info from web page if I correctly specify target CSS selectors combination.
Yes, It's absolutely right. But as far as you've defined your class name differently you can also simply describe your css as .cleared b{}.
div.elem > div.main div.numbers > div.numbers_wrapper > div.container.cleared b{color: red;}
<div class="elem">
<div class="main">
<div class="draw_date" title="08.04.2018 21:00">08.04.2018 21:00</div>
<div class="draw">
8277
</div>
<div class="numbers">
<div class="numbers_wrapper">
<div class="container cleared">
<b>19</b>
<b>12</b>
<b>14</b>
<b>23</b>
<b>10</b>
<b class="extra">02</b>
</div>
</div>
<div class="controls">
<a class="no_visited iconic nonunderline" title="Проверить билет"
href="/5x36plus/check_bulletin">⚲</a>
</div>
</div>
<div class="prize ">
<div class="jackpot_wrapper">
<span></span>
<span>3000000
</span>
</div>
<div class="jackpot_wrapper">
<span></span>
<span>3437960
</span>
</div>
</div>
</div>

fixed top header to show on top of div

This code uses and bootstrap 3.
How can I get the span with class="badge" to vertically line up with the left cell content i.e. baseline with the menuItem? (I tried some text alignment for no avail ) Thank you
body {
padding-top: 70px;
}
//---main.html-------------------------------
<head>
<title>Tasks</title>
</head>
<body>
<header>
<nav class="navbar navbar-default navbar-fixed-top">
<header class="container">
<div class="row">
<h1>
<button class="col-xs-2" type="button">☰</button>
<label class="col-xs-8 text-center">Select item</label>
<button class="col-xs-2" type="button">⋮</button>
</h1>
</div>
</header>
</nav>
</header>
<div>
{{> mainMenu}}
</div>
</body>
//---main_menu.html-------------------------------
<template name="mainMenu">
<div class="container">
<div class="row">
<section class="col-xs-12">
<div class="list-group">
{{#each menuItems}}
<a href="#" class="list-group-item">
<img src="/abc.png">
{{menuItem}} <span class="badge">></span>
</a>
{{/each}}
</div>
</section>
</div>
</div>
</template>
If your list-group-items are fixed height the simplest way to handle this is margin css.
.list-item-group > span.badge {
margin-top: 20px;
}
Other vertical align tricks such as line-height don't work on badges because they already have specific styles.
Here is another possible related solution:
Vertically align Bootstrap 3 badge inside heading
Note: Your question does not actually relate to Meteor, you might have better luck getting answers if you remove the meteor templating from your snippet.

WebKit Issue with negative top margin

I am having trouble getting web-kit to cooperate! You can see from the images that the left column does as intended in FF yet Web-kit browsers (Safari and Chrome) produces the second image. I am lost as how to fix the issue!
Firefox Version
Webkit Version
Code for area on question
<div class="container" style="margin-top: 30px; position: relative;">
<section class="row" ><!--id="content" -->
<div class="content_bckgrnd span9">
<div class="item-page">
<p style="text-align: center;"><img src="http://avanti.websitewelcome.com/~ingles/images/demo/store-locations.png" width="531" height="368" alt="store-locations" /></p>
</div>
</div>
<div class="content_bckgrnd span3 ">
<div class="mod-padding">
<div class="mod_content ">
<div class="custom" >
<p style="text-align: center;"><strong><img src="http://avanti.websitewelcome.com/~ingles/images/demo/Bldg-Background.jpg" width="150" height="47" alt="Bldg-Background" /><br data-mce-bogus="1" />
</strong></p>
<p><strong>Store Search</strong><br />
To search for an Ingles store near you, type in your zip code or enter your city and state. Click 'Find Stores' to see your results</p>
<p>Narrow your search by clicking on the options to the right. Search for stores with Pharmacies, Bakeries, or ones that are open 24 hours.</p>
<p><strong>Your Results Page</strong><br />
'More Information'- click this to see store locations and to get directions to the store.</p>
<p>'Weekly Ads' click this to view your stores weekly ads.</p>
<p><strong>Sort Your Results</strong><br />
Sort your results by clicking Store, Address, City, State or Zip at the top of the results.</p>
</div>
</div>
</div>
</div>
<div class="clear"></div>
</section>
</div>
<div class="wrapper background" id="module-positions">
<div class="container" style=" min-height:65px;">
<!-- module-positions -->
<section class="row"> </section>
<div class="row">
<div class="span6"> </div>
<div class="span6"> </div>
</div>
</div>
</div>
JsFiddle
Link to development site for raw code view
You will define a div #HomeTopBckgrnd with:
height: 1240px;
margin-top: -360px;
fixed heights will ask for troubles.
Why not something like:
<header></header>
<div id="HomeTopBckgrnd"> Your centent here</div>
<footer></footer>
or
<div id="HomeTopBckgrnd">
<header></header>
<div> Your centent here</div>
<footer></footer>
</div>

How to make a column stretch to fill container div (while being responsive)

I'm using Twitter Bootstrap (latest version - 2.3.2) for a site I'm building, and want to achieve the following while keeping the site responsive, and also applying best practices for it.
Here's a very rough sketch of what I want to have:
The site has a basic header with fixed navbar, a content-fluid div which has three inner divs: a span5, span6, and span1 (for a total of 12 columns). After the content div, a sticky footer with company/copyright info and such.
The problem I'm having is with the span1 column. It is basically decorative (it has 4 vertical color bars, sized at 25% width each), but I'd like to have:
Social link icons vertically-centered in the column (Twitter, Facebook, LinkedIn, etc), as shown by the black boxes.
Text rotated 90 degrees counter-clockwise inside each colored bar. It's only one word each, and is not a priority.
Each bar stretching to fill the full height of the parent container (in this case, the content div), since the height of the page is currently set by the highest div, whether it's span5 or span6.
I know there are probably lots of ways to achieve this (pure CSS, javascript, background-image tiling), but I'm looking for the best practices: avoiding extra markup, using right techniques, in order to learn as much as possible. I've tried setting the parent container (and inner bars) to height: 100%; and playing with min-height as well, but min-height doesn't (seem to) work with percentages.
Any help and/or constructive criticism is very welcome.
Edit: JSFiddle and full code added: JSFiddle
Also, link to the original site (in case JSFiddle screws something up): Original page
<!-- Part 1: Wrap all page content here -->
<div id="wrap">
<!-- Fixed navbar -->
<div class="navbar navbar-inverse navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> <span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button> <a class="brand" href="#">Geología y Telecomunicaciones, C.A.</a>
<div class="nav-collapse collapse">
<ul class="nav">
<li>Inicio
</li>
<li>Acerca de
</li>
<li class="active">Contacto
</li>
</ul>
</div>
<!--/.nav-collapse -->
</div>
</div>
<div>
<div class="decorative-lightblue"></div>
<div class="decorative-purple"></div>
<div class="decorative-orange"></div>
<div class="decorative-lightorange"></div>
</div>
</div>
<!-- Begin page content -->
<div class="container-fluid">
<div class="row-fluid content clearfix" style="margin-top: 60px;">
<div class="span5">
<div class="row-fluid">
<div class="span5">
<div class="span12 logo"></div>
<div class="sidebar-intro">Construcción, Adaptación,
<br/>Adecuación y Remodelación
<br/>de <span class="emphasis-red">
locales<br>comerciales<br>empresariales
</span>
</div>
</div>
<div class="span7">
<!-- Responsive iFrame -->
<div class="Flexible-container">
<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/?ie=UTF8&ll=8.561755,-71.204721&spn=0.004716,0.006571&t=m&z=18&output=embed"></iframe>
<br /><small>Ver mapa más grande</small>
</div>
</div>
</div>
<div class="row-fluid">
<div class="contact-wrapper well">
<form>
<div class="control-group">
<label class="control-label" for="inputName"><i class="icon-user"></i> Nombre</label>
<div class="controls controls-row">
<input type="text" class="span12 input-xlarge " id="inputName" placeholder="Su nombre completo">
</div>
</div>
<div class="control-group">
<label class="control-label" for="inputEmail"><i class="icon-envelope"></i> Correo electrónico</label>
<div class="controls">
<input type="text" class="span12 input-xlarge" id="inputEmail" placeholder="nombre#sudominio.com">
</div>
</div>
<div class="control-group">
<label class="control-label" for="inputEmail"><i class="icon-question-sign"></i> Asunto</label>
<div class="controls">
<input type="text" class="span12 input-xlarge" id="inputSubject" placeholder="Asunto de su mensaje">
</div>
</div>
<div class="control-group">
<label class="control-label" for="inputEmail"><i class="icon-pencil"></i> Mensaje</label>
<div class="controls">
<textarea rows="6" class="span12 input-xlarge" placeholder="Haganos llegar sus comentarios, sugerencias, consultas, etc."></textarea>
</div>
</div>
<div class="control-group">
<div class="controls">
<button type="submit" class="btn btn-success">Enviar Mensaje</button>
</div>
<br class="clear">
</div>
</form>
</div>
</div>
</div>
<div class="span6">
<div class="row-fluid span12">
<img class="span9 offset2" src="http://geotelca.com/sitio/assets/img/examples/flyer_back.png">
</div>
<div class="row-fluid">
<div class="row-fluid span12 address"> <address>
Zona Industrial Los Curos, Calle 1, Edif. Geotelca No. A-8, Mérida, Edo. Mérida
</address>
</div>
<div class="row-fluid e-mail">
<div class="span4 offset6"> direccion#geotelca.com
</div>
</div>
</div>
</div>
<div class="span1 social-links">
<div class="row-fluid vertical-bars">
<div class="span3 bar bar-lightblue"></div>
<div class="span3 bar bar-purple"></div>
<div class="span3 bar bar-orange"></div>
<div class="span3 bar bar-lightorange"></div>
</div>
</div>
</div>
</div>
<!--/.container-fluid-->
<div id="push"></div>
</div>
<!--/#wrap-->
<div id="footer">
<div>
<div class="decorative-lightblue"></div>
<div class="decorative-purple"></div>
<div class="decorative-orange"></div>
<div class="decorative-lightorange"></div>
</div>
<div class="container">
<p class="muted credit">Diseñado, codificado y mantenido por #kenshin23
</p>
</div>
</div>
I would say your best bet here would be one of the jQuery plug-in out there to accomplish this ... eqHeight.coffee seems to be pretty well documented:
https://github.com/jsliang/eqHeight.coffee/
As for centering those social links in that vertical space, you'd likely have to use more Javascript to do that. Although, honestly I'd probably put them in a div container with position: fixed; and let them slide up and down that column as the user scrolls.
EDIT:
Just noticed you added your HTML file ... in the case of the first plug-in I linked to, you would need to add a class (perhaps 'eq-height') to each of the columns whose heights you wanted to match (that first outer span5 and span6 and then all the bar column divs individually). Then on jQuery document ready, use:
$(document).ready(function() {
$(".content").eqHeight(".eq-height");
});

Getting CSS Div issue with ie9

Actually i have designed the template for one of my games site. In the when i play the game iam getting some problem in IE9 but no issues with other browsers. For clear understanding the issue please see this
play page Code:
<div style="float:left">
<div class="gameContentsurround">
<div class="gameContentbg">
<div class="gameDiv">
<div align='center'>
<!--game content here-->
</div>
</div>
</div>
<div class="gameboxbelowheight"></div>
</div>
<div style='height:5px'></div>
<div style="clear:both"></div>
<div class="gameDesc">
<!--game description here-->
</div>
<div class="moregamesbg">
<div class="moregameswhitebg">
<!--more games section here-->
</div>
</div>
</div>
<div style="float:right; width:390px">
<!--right column where actual issue comes here in IE9-->
</div>
right_column code:
<div class="playAdsWhiteBg">
<div class='playAdsDiv'>
<center>
google ads
</center>
</div>
</div>
<div style="clear:both"></div>
<div style='height:2px'></div>
<!-- Ads END -->
<!-- Ads -->
<!--<div><?php echo SPONSORS_TITLE;?></div> -->
<div class="playAdsWhiteBg">
<div class='playAdsDiv'>
<center>
google ads
</center>
</div>
</div>
<div style="clear:both"></div>
<div style='height:2px'></div>
<!-- Ads END -->
<!-- Comments Section -->
<div class="playAdsWhiteBg">
<div class='playAdsDiv'>
<div style="overflow:scroll">
fb comments
</div>
</div>
</div>
<div style="clear:both"></div>
<div style='height:2px'></div>
<!-- Rating Section -->
<div class="ratethisgameWhiteBg">
<div class='ratethisgameDiv'>
rating system
</div>
</div>
Add width: 390px to content's first child.
When you use floating elements you should always set their width

Resources