I have a standard flask project in which there are images file under:
static/images/thump.png
Now I want to display it in this area:
<div class="recommendation">results: </div>
<img src="{{url_for('static', filename='images/thumup.png')}}" />
But the image isn't displayed at all.
Also, I don't want it to be displayed under div tag, but want it to be displayed after the text:
results:
How can I do that?
It would seem that the div with the text and the image together form a 'recommendation'. In that case this structure might be appropriate:
<div class="recommendation">results:<img src="....." /></div>
That will more easily allow placing of the text in relation to the image as well as grouping the whole results info together.
Here's an example - a plain snippet which uses flex to position the text mid-point down the image:
<div class="recommendation" style="display: flex; align-items: center;">results:<img src="https://i.stack.imgur.com/WFkeW.jpg" /></div>
Related
I am using an online survey tool (alchemer.com) previously known as surveygizmo.com. I need to create an Arabic survey, which means that the alignment must be from right to left. The tools support some configurations which aloowed me to align the text from right to left. However, the problem is that their settings did not change the alignment of the radio buttons (the answer choices) to be from right to left. I contacted the support, which pointed to me that there is CCS and HTML customisation. I find this HTML code. Can you help me make the HTML page to be aligned from right to left (including the radio buttons and not text only). See the code and the image that illustrate the problem.
<div class="sg-wrapper">
<div class="sg-header">
<div class="sg-header-hook-1"></div>
<img class="sg-header-image" src="[template("header image url")]" alt="[template("header image text")]"/>
[template("survey title")]
<div class="sg-header-hook-2"></div>
</div>
<div class="sg-content">
<div class="sg-content-hook-1"></div>
[template("error message")]
[template("page title")]
[template("page description")]
[template("page contents")]
<div class="sg-content-hook-2"></div>
<div class="sg-footer">
<div class="sg-footer-hook-1"></div>
[template("button bar")]
[template("progress bar")]
[template("footer text")]
<div class="sg-footer-hook-2"></div>
</div>
</div>
</div>
The problem is shown here where the radio buttons should appear in the right before the text starts. I could not align them. Is there anyway to do this from the HTML or CCS?
I'm trying to find a way to create an HTML layout and display it as text.
for example, i want to "paint" an area over the dummy html layout according to a selection.
I've made an example using images but my question is how to replace the images part with pure HTML / CSS?
just a side note, i'm working with a .Net environment (MVC)
jsFiddle example
CSS:
img{
display: none;
}
img:target {
display: block;
}
HTML:
<div>
Top Head |
Bottom Head |
Top Bottom |
Bottom Head
<div>
<img id="topHead" src="https://s29.postimg.org/fjuguwv2f/htmlTopHead.png" alt="">
<img id="bottomHead" src="https://s29.postimg.org/qtn6pv03r/htmlBottomHead.png" alt="">
<img id="topBody" src="https://s29.postimg.org/vgt8rmngn/htmlTopBody.png" alt="">
<img id="bottomBody" src="https://s29.postimg.org/q2ugk2xqf/htmlBottomBody.png" alt="">
</div>
</div>
Take a look at: http://www.freeformatter.com/html-escape.html
This will replace the characters that are reserved in HTML and must be replaced with their corresponding HTML entities.
What about a syntax highlighter like prism? there are many others which can fit to your requirements.
If this doesn't help, your best option is coding the html file, and put inside each tag the scaped version, with your own styling.
I'm trying to display images from my PC on my website, i've tried using floats but nothing works. Everything I try ends up the same:
<div class="feat">
<img src="nirvana.jpeg" style="width:50%;height:50%;" align="left";>
<img src="pup.jpg" style="width:50%;height:50%;" align="right";>
</div>
Remove the align left and right and white space between image tags.
<div class="feat">
<img src="nirvana.jpeg" style="width:50%;height:50%;"><img src="pup.jpg" style="width:50%;height:50%;">
</div>
Read up this blog post about white space. Here is a working plunkr (without your images, obviously): http://embed.plnkr.co/sytM7HeFUVDPT1p3HoXN/preview
I have a template where the images are full width & the post content is wrapped in a container. The container sets the width of the content but the image is full width and in a separate container. I was hoping that in Ghost I could wrap the markdown image with some sort of code to end a wrapper and what not. Heres the code output i'm trying to achieve:
<div class="container">
<p>Something</p>
</div>
<div class="blog-post-image">
<img src="image" />
</div>
<div class="container">
<p>Something</p>
</div>
I was hoping I could add some code so that Ghost would add output the image markdown code something like this:
</div>
<div class="blog-post-image">
<img src="image" />
</div>
<div class="container">
Is this possible? I would add the code into the posts manually but I don't then want to in 6 months change the template and have to edit a load of posts.
you can include parts of HTML in your MD, so just create some in your article where you need to special format anything
I am trying to place a member's photos next to their comments. I am working from a wireframe that requires side by side image and text.
On the default tab there are 3 comments. I am trying to also display the members photo on the left of the comment, but can't get it to render for some reason.
Any idea why the photo isn't rendering on the left and how I can align it? I am looking in Firebug, but somehow can't find the problem.
Here is your problem
<div style="float:left><img src=/img/member_photo/1/mid_thumb.jpeg width="100" ></div>
it should be:
<div style="float:left"><img src="/img/member_photo/1/mid_thumb.jpeg" width="100" ></div>
You missed the quotes
bad html
http://i.stack.imgur.com/orinI.jpg
edit
http://i.stack.imgur.com/mSLnw.jpg