How to get a title bar - text

I would like to be able to add picture that always shows at the top part of the screen. I want a bar that stays at the top of it all the time. I do not know how to do it but I believe YouTube has something like it. Except I want it without the content on the side because that is a little annoying.

In order to do this, you have to use absolute positioning. This requires you to use CSS with your HTML (if you are talking about web design).
Here is the CSS
img {
position: fixed;
left: 0px;
top: 0px;
}
Here is the HTML:
<img src="YOURIMAGE.jpg" height="100" width="100">
Not to be disrespectful, but it seems as though you are not familiar with web design. I would recommend looking at W3 schools and try to grasp some of the concepts there before you continue.

Related

Making md-fab bigger in Angular Material design

Was playing around with md-fab, but wanted a REALLy big md-fab button (100px) rather than the 48 and 64 px size, but seems quite problematic to achieve that, thought maybe I could be smart and just create a class as follows
.bigfab {
width: 100px;
height: 100px;
border-radius: 50px;
}
Then a button as
<button class="md-fab bigfab" >Click<br>me!</button>
While it does work, it goes quite ugly, and the highlight dies. So any suggestions?
Found a (possible) solution
Skip md-fab, use md-raised, you get a square shadow, but such is life :)
<md-button class="md-raised md-warn bigfab" >Makes clothes!</md-button>

Different Styling for Captions on Two Different Nivo Sliders on One Page

I am trying to put two Nivo sliders on one page. Some of the attributes are different. So I have simply created two scripts for these attributes, "slider" and "slider2". That's no problem.
However, I want to make the title style a little different for the second slider. I noticed that the text style of the slide title is controlled by this style:
.nivo-caption p {
padding:8px;
margin:0;
color: #000;
font-size: 16px;
}
However, I don't see that css style called within my html. (When I look at the web page source code I see it but not when I'm actually looking at the code file itself.)
I'd love to simply create a new style for my second slider, something like:
.nivo-caption2 p {
margin:0;
color: #000;
font-size: 12px;
}
But I need to know how to actually call that within my html. Can anyone help? Thanks.
Actually, I figured it out. Since I have ids of "slide" and "slide2" for each slide show, I simply appended that to my new style and that worked.

AngularJS - multiple layouts

I am just starting with AngularJS, which I know is meant to be an SPA. For the app we are building, all of the pages--except the index page--will have a two-column layout. We'd like the index page, however, to be a one-column, fullwidth page. Is this functionality possible with AngularJS?
I'd suggest posting a plunkr or jsfiddle, since I'm not sure I'm actually answering your question, or if there's more to your question I'm missing.
If you're doing all the pages via routing (ng-view), then just apply classes to differentiate the style for that one-column version. Something like:
.column_1, .column_2 { margin: 0; width: 50%; float: left; }
#firstpage .column_1, #firstpage .column_2 { margin: 0; width: 100%; float: none; }
and then in the html (on that firstpage only), wrap everything in div id="firstpage". Don't include that div in the routed pages, and the style will only apply for the first page. Or if you have some other set up, you can always use styles around the ng-view, too:
<div class="classname">
<div ng-view></div>
</div>
If you've got a side-column that's sitting outside your ng-view and that's what you want to turn off/on, then I'd suggest including the class on the first page (to make it go full-width), and at the same time use some kind of logic with ng-hide/ng-show on that first column.

Bar graphs on a website

I'm by no means a web designer, so I'd like as detailed help as you're willing to give.
I'd like to make a website that that tracks some data I enter using a bar graph from 0-100%. I'd enter the maximum number the graph could go to and then some data point would be updated occasionally, which the completion bar graph would reflect.
How would I go about doing this?
I know basic HTML and PHP, but have not used either in a very long time.
I think most of the suggestions are overkill. No need to have an extra library / dependency when all you need is some simple bargraphs. Plain HTML/CSS should do...
PS: quick code sample, only tested in Firefox 3.x
<style type="text/css">
.bar
{
background-color: green;
position: relative;
height: 16px;
margin-top: 8px;
margin-bottom: 8px;
}
</style>
<div id="barcontainer" style="width:200px;">
<div id="bar1" class="bar" style="width:43%;"></div>
<div id="bar2" class="bar" style="width:12%;"></div>
<div id="bar3" class="bar" style="width:76%;"></div>
<div id="bar4" class="bar" style="width:100%;"></div>
</div>
You can change the width of individual bars easily with javascript (just change the width).
I know you said you're new, but you should take a look at the google visualization api. It's got some good stuff to do the kind of thing you might want.
http://code.google.com/apis/visualization/
There are two ways you could tackle this problem; generate the graph on the backend (probably using PHP in your case) or do it on the client side using javascript.
I'm not sure the specifics of doing it in PHP, as I don't really know the language, but I'm sure there is alot of info out there on graph generation in PHP.
For the javascript approach, I've used both flot (for jquery) and flotr (for prototype) before. I like them alot, and there is some good documentation and examples for both libraries on how to generate all kinds of charts, including bar charts.

Why isn't my sIFR text wrapping on a liquid design?

I have a simple line of text I'm replacing with sIFR for a header on my site. The site is liquid so it scales when the browser window changes width. But when I shrink the browser window down, the alt text (when I turn it on for testing) wraps to another line, but the sIFR text doesn't.
I've seen written elsewhere on the web that people implement in the sifr.js code a preventWrap=false function, but being new to JavaScript I'm not sure where to put it to make it work.
Here's the relevant CSS:
.sIFR-hasFlash h2 {
visibility: hidden;
letter-spacing: 1px;
font-size: 18px;
text-align: center;
line-height: 1.5em;
}
And the relevant JavaScript:
sIFR.replaceElement(named({sSelector: "h2",
sFlashSrc: "flash/h2_font.swf", sBgColor: "#006633",
sColor: "#FFFFFF", sFlashVars: "textalign=center", sWmode: "transparent"}));
Not sure where I would put the preventWrap=false, or if that's even the way to go.
sIFR 3 should fix this.
I had a similar problem, adding position:relative to your CSS might fix it.

Resources