placing text over image in navbar bootstrap 4 dreamweaver - image

i am trying to build a responsive website using bootstrap and dreamweaver.
I would like to place an image in my navbar, and place a text link over the image. Im having some trouble getting the text to sit over the image.
Any help would be greatly appreciated.
Here is the source code:
</head>
<body>
<nav class="navbar navbar-fixed-top">
<div class="container-fluid">
<a class="navbar-brand" href="index.html">
<img src="files /button images/swirl 1 11.svg" alt="" width="130" class="d-inline-block align-top">
Tom
</a>
</nav>
Here is my own css sheet i linked to override bootstarps:
body{
background-color:#F00;
}
nav a{
font-size: 24px;
font-family: Arial, Helvetica, sans-serif;
color: #000;
background-color: transparent;
font-style: normal;
}

In that case, you need to add a bit of custom css like so:
.navbar-brand {
background: url("https://placeimg.com/130/40/animals") no-repeat center;
background-size: cover;
min-width: 130px;
}
Replace that with your SVG and you should be good to go.
That creates a background image for the element with the navbar-brand class.

Related

Create pdf for signature list using Laravel and dompdf

I'm stuck on a problem that I thought should be straightforward, but dompdf refuses to make my pdf as I want it. I want a pdf that my end user should print out containing a list with users with their names and a line where they should sign. Something like this:
I'm trying to do it like this:
<style>
.lineContainer div {height: 30px;}
.nounderscore {border-bottom: 0px;float:left;}
.underscore {border-bottom: 1px solid #000; overflow: hidden;}
</style>
#foreach($users as $user)
<div class="lineContainer">
<div class="nounderscore">{{$user->name}}</div>
<div class="underscore"></div>
</div>
#endforeach
This works fine when rendered as html, but when I use it for a pdf file it ends up with my underline starting from the far left end of the page, so also the names are underlined. Any ideas how to do this in a way that works with dompdf?
<style>
li{
padding-bottom: 25px;
list-style: none;
}
.line{
padding-right: 15em;
margin: 0 1em;
border-bottom: 1px solid grey;
}
</style>
<ul>
#foreach($users as $user)
<li>{{$user->name}}<span class="line"></span></li>
#endforeach
</ul>
Answer preview for static data:
https://jsfiddle.net/wz1vpsnx/

li works inline but not otherwise

my html is
<div id="heading1">
<ul class="heading">
<li>Geelong</li>
</ul>
</div>
and css is
.heading {
font-size: 24px;
text-align: center;
list-style-image: url('img/stationary/marker.png');
}
If I do the css inline it works but not otherwise.
With that code:
<div id="heading1">
<ul class="heading">
<li>Geelong</li>
</ul>
</div>
.heading{
font-size: 24px;
text-align: center;
list-style-image: url('https://www.google.fr/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png');
}
The list is displaying correctly with Google logo as bullet.
It seems that your problem is the image's URL that is wrong. You may verify that it points to an image that exists (think that it's a relative link)

Converting svg to png using imagemagick 6.5.4, text not displayed on the resulting png

I am new to the whole SVG and imagemagick, so still learning things as I go. I have this image in a svg format, which I would like to convert to png. This is how the SVG looks like when opened using Chrome:
The original SVG file also has some white spaces, which I would like to trim out. After doing some searching, I found out the "trim" option that can be used in "convert".
I tried the following:
convert -trim example_image.svg example_image.png
Which seems to trim out any unnecessary white spaces and most of the SVG file is converted. However, the text portion of this image is no longer visible in the png file:
I went through some forums and most of them seems to suggest to start by checking the DELEGATES section that I can read using "convert -list configure", and look out for tags such as "freetype" and "gs". So it seems like those two tags are available. Is there anything else I could do to diagnose the issue? I don't necessarily generate these SVG files (it is generated by one of the colleagues at work), so not sure where to look exactly. However, I am attaching a snippet of the SVG "code" that prints the text portion. I hope this might help somebody diagnose the issue:
<g transform="translate(0, 480)">
<g transform="translate(50.000000, 0)">
<switch x="0" y="0">
<foreignObject height="300" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" width="1150">
<p style="font-family: Arial; font-size: 20px" xmlns="http://www.w3.org/1999/xhtml">Figure 1. Putative Fusion-translocation event. The 5&apos; (in the fusion) transcript EWSR1-001(ENST00000397938) from the gene EWSR1(ENSG00000182944) on the forward strand is drawn top left with its corresponding breakpoint at 22:29684366. The 3&apos; (in the fusion) transcript FLI1-004(ENST00000525560) from the gene FLI1(ENSG00000151702) on the forward strand is drawn top right with its corresponding breakpoint at 11:128664210. Exons are drawn to scale relative to other exons in the same drawing. Introns are scaled to make up approximately 1/4th of the final drawing. This is predicted to be an IN-frame fusion. Domains include: </p>
<div style="display: table; font-family: Arial; font-size: 20px" xmlns="http://www.w3.org/1999/xhtml">
<div style="display: table-row; font-family: Arial; font-size: 20px; font-weight: bold" xmlns="http://www.w3.org/1999/xhtml">
<div style="display: table-cell" xmlns="http://www.w3.org/1999/xhtml">Domain Name</div>
<div style="display: table-cell; padding-left: 20px" xmlns="http://www.w3.org/1999/xhtml">External identifier(s)</div>
</div>
<div style="display: table-row; font-family: Arial; font-size: 20px" xmlns="http://www.w3.org/1999/xhtml">
<div style="display: table-cell; font-family: Arial; font-size: 20px" xmlns="http://www.w3.org/1999/xhtml">Ets</div>
<div style="display: table-cell; font-family: Arial; font-size: 20px; padding-left: 20px" xmlns="http://www.w3.org/1999/xhtml">PF00178</div>
</div>
<div style="display: table-row; font-family: Arial; font-size: 20px" xmlns="http://www.w3.org/1999/xhtml">
<div style="display: table-cell; font-family: Arial; font-size: 20px" xmlns="http://www.w3.org/1999/xhtml">RRM_dom</div>
<div style="display: table-cell; font-family: Arial; font-size: 20px; padding-left: 20px" xmlns="http://www.w3.org/1999/xhtml">PF00076</div>
</div>
<div style="display: table-row; font-family: Arial; font-size: 20px" xmlns="http://www.w3.org/1999/xhtml">
<div style="display: table-cell; font-family: Arial; font-size: 20px" xmlns="http://www.w3.org/1999/xhtml">Znf_RanBP2</div>
<div style="display: table-cell; font-family: Arial; font-size: 20px; padding-left: 20px" xmlns="http://www.w3.org/1999/xhtml">PF00641</div>
</div>
</div>
</foreignObject>
</switch>
</g>
Your help would be greatly appreciated.

location of drop down menu is left when div center aligned

I'm using a bit of javascript to create a dropdown that appears when an image is clicked. Currently the initial image is centered, but the drop down is appearing at the left of the frame... and I'm stumped. Help would be greatly appreciated. My code is below:
<div align="center" class="dropdown">
<img alt="Select Your District Here" onclick="showMenu()" src="images/buttons/select_district.png" style="width: 200px; height: 36px;" />
<ul aria-labelledby="dLabel" class="dropdown-menu" id="district-dd2" onmouseout="hideMenu()" role="menu" style="display:none">
<li>
Arbuckle</li>
<li>
Country Estates</li>
<li>
Strawberry</li>
<li>
Walnut Ranch</li>
</ul>
<script type="text/javascript">
function showMenu(){
document.getElementById("district-dd2").style.display="block";
}
function hideMenu(){
document.getElementById("district-dd2").style.display="none";
}
</script></div>
Site can be seen here: http://www.waterutilitymanagementservices.com/deloro/water-districts.html
EDIT: CSS for dropdown-menu added. FYI, this site is using joomla beez template with bootstrap, with css heavily modified. the code below comes from bootstrap.css
.dropdown-menu > li > a {
clear: both;
color: #333333;
display: block;
font-weight: normal;
line-height: 20px;
padding: 3px 20px;
white-space: nowrap;
}
EDIT 2: More CSS - After scouring all my css files, it looks like all the references to dropdowns are in bootstrap.css. Rather than past all of them here (which would be long), i posted the CSS as a txt file here: http://www.waterutilitymanagementservices.com/boostrap.txt

HTML problem, only works in Webkit

This works fine in Webkit, but when I go to Firefox (Or IE8) it totally messed up. I've been staring at this for so long that I can't find any errors at all with it, so maybe one of you guys can point out where I'm going wrong.
CSS:
body {
font-family: Georgia, serif;
margin: 0px;
padding: 0px;
background: #222;
}
header {
background: #fff url('images/header-border.gif') bottom repeat-x;
width: 980px;
margin: 0px auto;
height: 100px;
padding: 0px 0px 0px 20px;
-moz-border-radius-topright: 4px; -moz-border-radius-topleft: 4px;
-webkit-border-top-right-radius: 4px; -webkit-border-top-left-radius: 4px;
border-top-right-radius: 4px; border-top-left-radius: 4px;
}
section {
}
article {
}
footer {
clear: left;
}
nav {
width: 980px;
margin: 0px auto;
height: 70px;
padding: 10px 0px 10px 0px;
font-size: 21px;
font-weight: bold;
font-family: Arial, serif;
}
nav a {
color: #fff;
text-decoration: none;
padding: 10px;
}
nav a:hover {
background: #060606;
}
#content {
width: 980px;
background: #fff;
padding: 0px 0px 0px 20px;
margin: 0px auto;
}
nav ul li {
float: left;
list-style: none;
width: 155px;
}
#left-column, #logo {
width: 560px;
margin: 0px auto;
float: left;
}
#right-column, #share {
width: 380px;
margin: 0px auto;
float: left;
height: 100%;
padding: 0px 0px 0px 20px;
border-left: 1px solid #d9d9d9;
}
address {
display: inline;
}
a img {
border: 0px;
}
.clear-left {
clear: left;
}
And the HTML:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="text/html; charset=UTF-8" />
<title>Webtint </title>
<link rel="stylesheet" href="http://localhost/wp-content/themes/clean/style.css" type="text/css" />
<link rel="pingback" href="http://localhost/xmlrpc.php" />
</head>
<body>
<nav>
<ul>
<li>home</li>
<li>tutorials <img src="http://localhost/wp-content/themes/clean/images/arrow.gif" alt="Arrow" /></li>
<li>resources <img src="http://localhost/wp-content/themes/clean/images/arrow.gif" alt="Arrow" /></li>
<li>articles <img src="http://localhost/wp-content/themes/clean/images/arrow.gif" alt="Arrow" /></li>
<li>contact</li>
<li>follow us</li>
</ul>
</nav>
<header>
<section id="logo">
</section>
<section id="share">
</section>
</header>
<div id="content">
<section id="left-column">
<article>
<h2>
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>">
<?php the_title(); ?>
</a>
</h2>
<time><?php the_time('F jS, Y') ?></time> by <address><?php the_author(); ?></address>
<?php the_excerpt(); ?>
<br /><br />
Read More
<?php comments_popup_link(
'<span class="boxed">No Responses »</span>',
'<span class="boxed"> 1 Response »</span>',
'<span class="boxed">% Responses »</span>'); ?>
</article>
<hr />
</section>
<section id="right-column">
<h2>Popular Posts</h2>
</section>
</div>
<footer>
</footer>
</body>
</html>
Screenshot in Firefox:
http://imgur.com/wvhI0.gif
Screenshot in Chrome: (How it's supposed to look)
http://imgur.com/sQK8S.gif
Screenshot in IE8:
http://imgur.com/7OnEJ.gif
Thanks for any help in advance :)
Basically, you're using mostly HTML5 specific elements, and they're not supported everywhere properly yet, especially IE8 out of those you listed.
For a quick look, Here's the list of elements added in HTML5.
Try using a debug tool like Firebug or the IE developer toolbar to figure out which elements are being placed wrongly and why.
Both let you hover your mouse over blocks and will highlight the corresponding HTML. You will be able to see exactly which element it is that is being placed incorrectly, and view the CSS to try and figure out why.
Johnny, does your solution also fix the incorrect rendering in Firefox 2 and Camino 1? Interesting, as I only know of the Javascript solution. Just to give you some more feedback on this: to learn more about getting HTML5 rendered properly in all major browsers, read this article by Nico Hagenburger. You can also use this script to render HTML5 in IE.
A more general article about HTML5 and CSS3 support in IE (e.g., your corners aren't rounded) in this article. For rounded corners in all major browsers (also in Opera) please read this one. There also exist general tables about support in all major browsers of HTML5 and CSS3.
EDIT: I just read an article about HTML5 pages not rendered properly when printing from within IE, because this JavaScript solution isn't loaded when printing a page. More info on doctype.com.

Resources