Solving CSS compatibility [closed] - html

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 9 years ago.
Improve this question
I decided to use nvd3 library and downloaded the both required js libraries files and the CSS needed.
I placed the <svg/> somewhere at my html document. But all I'm getting is an ugly representation of chart:
I'm using some CSS templates I found around. And these are the ones messing the correct rendering.
I generated a new simpler html document with any css but the one form library. And all goes on ok:
I tried placing the svg tag inside another div but got not results.
How could I fix this?

Clearly the CSS template(s) you are using are not appropriate for the type of chart you are trying to render. It is setting the fill property on what is a line-only chart.
I am not familiar with nvd3 so this is only a generic answer I am afraid. You probably need to select a fifferent template that is applicable to line graphs. The one you are using was probably intended for other types of graphs such as bar or pie charts.

Related

Change LongListSelector's SelectedItem's ItemTemplate [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 8 years ago.
Improve this question
I'm new to Windows Phone and writing an application that uses LongListSelector with group to display data. What I can't implement is, I'm trying to change LongListSelector's ItemTemplate from code by selecting an item of LLS. I tried lots of things but I think they're all for loading, I cannot change an item's template.
What should I use to change an item's template of LLS by selecting it?
Sorry for the late reply, I must have missed a notification.
So, my second suggestion still won't work. It's only for static templates, meaning once your Items DataTemplate is loaded, there's no way to change them.
What you can do though, is have the XAML of your normal and selected templates in a style and tweek their visibility based on VisualState. I've edited the sample disklosr posted to illustrate what I mean, notice how the StoryBoard of the CustomUserControl changes the visibility of the NormalGrid and SelectedGrid. You can have any layout you wish inside those two grid's bound to your dataItems.
Sample

How to highlight syntax? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I want to lean how to highlight syntax of various programming and markup languages. I admit that I have no prior knowledge of this so this might as well be off-topic.
Say, for example, I want to highlight HTML tags. What I think can be done is to use RegEx to find tags.
You can find tags using RegEx and then get their start and end position. Then, you can change the color of that particular text.
However, the above approach will not work if the tags had attributes with them. <img src="...">
So, can someone please guide me as how how this can be achieved.
A third-party API is fine but I would like to learn how this can be done :)
You simply want to highlight HTML code? You can use the SyntaxHighlighter JavaScript library for this.
If you want to learn how, see CSS SyntaxHighlighter 2.0: short tutorial on how to create your own syntax highlighter.
Also, try a simple search for “how to build a syntax highlighter”.

HTML page editing [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 8 years ago.
Improve this question
In an attempt to learn HTML, I thought it may be a good idea to edit some simple code. So, I navigated to what I figured was a simple layout on a website and copied the source to my desktop. I made minor changes and attempted then to reopen the HTML file in a browser to see the changes.
Instead of the same layout with a few minor adjustments, the entire scheme was deformed. The wording was all there(no longer formatted), but the background was now white and all the links appeared structrually in one column on the left side of the screen.
So, in essense, what is the best way to learn HTML and why didn't my attempt at editing work? Are there more files required than provded by a simple source save provides?
The HTML likely references things by RELATIVE PATH, e.g. a CSS File included with /styles/... not http://originaldomain.com/styles/... So if you just saved the HTML, none of the relative paths will resolve. Most browsers allow you to file --> save page as, which will copy not just the file but also the resources.
Try www.w3schools.com/html/ should give you a good start and a good understanding. Don't try and run before you can walk! And try learning CSS aswell
The file you needed was an external CSS file. It is linked to in the head of the document. This site is better than w3schools, www.w3fools.com
There are a lot of videos out there. Try www.reddit.com/r/learnprogramming
That community is much laid back and friendly!

Text appearing stacked in page pseudo CSS3/HTML5 [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Improve this question
I'm making a web page for a charity and the text on the page is appearing stacked without my intention. I decided to play around with CSS3 and HTML5 (badly) so it won't be fully compliant.
I've tried searching and looked at some articles about how to stack with css3 but it doesn't seem that I've accidently implemented any of these by accident. It's in PHP for no other reason than to use 'include' and because I plan on expanding it so all the html and css you can see on the page is all that's going on.
The footer is appearing behind the main body of text.
http://aberystwythslsc.org/activities.php
Any help would be greatly appreciated.
Your <section> has a set height. Simply remove that and you'll be good to go.

How to convert a html div to pdf [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
Hello I have an html page that through php pulls reports about sales and puts them in charts and graphs. It works great however I am looking for a way to convert a div box into a pdf so whoever is using the sight can print specific graphs and charts that are in selected div boxes. Is there a simple way to do this or is this unfeasible?
Thanks!
There are lots of answers here merely talking about making a PDF. That's the easy part - the hard part is finding an engine that renders the CSS well.
This question has been raised before, and the issue doesn't lie with feasibility (it's very possible and there are lots of solutions), but they vastly differ on their capabilities to translate CSS into PDF. Many just completely fail altogether.
From my research it looks like WKHTMLtoPDF is your best bet, as it uses a full WebKit engine to render the HTML first, then translate that into a PDF (I found a tutorial in addition to the docs).
The downside? It's command-line, so you'll need to engineer a solution involving either python or php to execute the program. Here's the PHP manual on executing a program.
Edit:
I have personally used FPDF before, which is a surprisingly light-weight solution with a caveat that you have to provide it with all of the HTML (edit:) line-by-line, rather than being able to use the browser-rendered result of a HTML page (a result that would include a rendered chart). I'm providing it merely as a suggestion and to help you work out where you can go from here, but it's not directly applicable to your complex CSS/chart problem.