tumblr preview renders text styling differently then the actual site - html

Hey this is extremely frustrating and i can NOT figure it out. I am a novice html/css coder. this problem is specifically with the links and text styling. It appears correct in the theme preview editor... but when i open up my blog directly from its url it is not the same here is what what I have in reference to the problem code.
Please help this is driving me crazy, the url is http://www.ensu3.tumblr.com
the meta for custom options
`
<style type="text/css">
body {
background: {color:Background} url('{image:Background Image}')
{text:BackgroundProperties};
}
.wrapper {
width: 960px;
margin: 0px auto;
padding-top: 25px;
background-color: white;
}
a:link, a:visited {
text-decoration: none;
}
a:hover, a:active {
text-decoration: none;
}
.header {
width: 100%;
padding: 5px 0px 5px 0px;
margin: 0px;
background-color: gray;
}
#logo img {
margin: 0px;
padding: 0px;
text-align: center;
}
#title {
margin: 0px;
padding: 0px;
text-align: center;
font-family: {font:Title};
font-size: {text:HeaderSize};
color: {color:Title};
}
#title h1 {
margin:0px;
padding:0px;
text-transform: uppercase;
color: black;
}
#title a:link, #title a:visited {
text-decoration: none;
}
#title a:hover, #title a:active {
color: {color:LinksHover};
}
#title a {
transition: color .7s;
-moz-transition: color .7s;
-webkit-transition: color .7s;
-o-transition: color .7s;
}
#nav {
margin: 0px;
padding: 0px;
background-color: blue;
color: {color:Links};
font-family: {font:Links};
letter-spacing: 1.5px;
margin: 0px;
padding: 15px 0px 15px 0px;
word-spacing: 10px;
text-align: center;
}
#nav ul {
list-style-type: none;
margin: 0px;
padding: 0px;
}
#nav li {
display: inline;
text-transform: uppercase;
margin: 0px auto;
padding: 0px;
}
<div class="header">
{block:IfLogoImage}
<div class="header" id="logo"><img src="{image:Logo}" /></div>
{/block:IfLogoImage}
{block:IfNotLogoImage}
<div class="header" id="title"><h1>{Title}</h1>
{/block:IfNotLogoImage}
</div>
<div class="header">
<ul id="nav">
{block:AskEnabled}
<li>{AskLabel}</li>
{/block:AskEnabled}
{block:SubmissionsEnabled}
<li>{SubmitLabel}</li>
{/block:SubmissionsEnabled}
{block:HasPages}
{block:Pages}
<li>{Label}</li>
{/block:Pages}
{/block:HasPages}
<li>TestLink</li>
<li>TextLink2</li>
</ul>
</div>`

Did you remember to hit save?
Also, it can take a while for changes to show up, since Tumblr caches page templates very aggressively.

Related

List is moving when I'm hover a tags

Hey I'm trying to create a web with a nav bar. However when I hover one a tag(link) all the others moves for some reason and I can't find a solution , guess some play with css which I'm still learning.... any help for what's wrong here?
.container {
width: 85%;
margin: auto;
overflow: hidden;
}
header {
background-color: #262626;
color: white;
padding-top: 20px;
min-height: 70px;
}
header a {
color: white;
text-decoration: none;
text-transform: uppercase;
font-size: 16px;
transition: color 0.3s;
display: block;
padding: 8px 16px;
}
header a:hover {
padding: 8px 16px;
border-color: #2a2a2a;
color: #D52B1E;
letter-spacing: 1.5px;
border: none;
cursor: pointer;
outline: none;
display: block;
}
header li {
display: inline;
padding: 0 20px 0 20px;
display: inline-flex;
}
header #logo {
float: left;
}
header #logo h1 {
margin: 0;
font-family: 'Dancing Script', cursive;
}
header nav {
float: right;
margin-top: 10px;
}
<header>
<div class="container">
<div id="logo">
<h1>Coupon<span style="color:#D52B1E">System</span></h1>
</div>
<nav>
<ul>
<li><a routerLink="/home">Home</a></li>
<li><a routerLink="/about">About</a></li>
<li><a routerLink="/contact">Contact</a></li>
</ul>
</nav>
</div>
</header>
appreciate any help, thanks guys!
You should add letter-spacing: 1.5px; in your header a class not on hover thats why its moving when you hover a li.
If you really want to show a little movement on hover you can try below method.
.container {
width: 85%;
margin: auto;
overflow: hidden;
}
header {
background-color: #262626;
color: white;
padding-top: 20px;
min-height: 70px;
}
header a {
color: white;
text-decoration: none;
text-transform: uppercase;
font-size: 16px;
transition: color 0.3s;
display: block;
padding: 8px 16px;
letter-spacing: 1.5px;
position: relative;
}
header a:hover {
padding: 8px 16px;
border-color: #2a2a2a;
color: #D52B1E;
letter-spacing: 1.5px;
border: none;
cursor: pointer;
outline: none;
display: block;
right: 2px;
}
header li {
display: inline;
padding: 0 20px 0 20px;
display: inline-flex;
}
header #logo {
float: left;
}
header #logo h1 {
margin: 0;
font-family: 'Dancing Script', cursive;
}
header nav {
float: right;
margin-top: 10px;
}
<header>
<div class="container">
<div id="logo">
<h1>Coupon<span style="color:#D52B1E">System</span></h1>
</div>
<nav>
<ul>
<li><a routerLink="/home">Home</a></li>
<li><a routerLink="/about">About</a></li>
<li><a routerLink="/contact">Contact</a></li>
</ul>
</nav>
</div>
</header>
I found a solution:
letter-spacing: 1.5px;
I forgot this line in the a tag
You're adding letting spacing to the header a:hover. This means whenever you hover over the link, letter spacing will be added.

CSS for changing display of targeted sections

I have a combined local docs, group docs, and f.a.q. page I've been collating my documentation into. It's turning out very well and is easily updated and added to. There's a static navbar at the top with drop-down menus to navigate to parts of the document. Ideally, I'd like to hide all content other than that which is currently linked.
CSS:
<style>
/* Block Elements */
body { margin-bottom: 150px; background-color: white; }
section { margin-left: 35px; }
/* Select/Display Elements */
section:not(#welcome) { display: none; }
section:target { display: block; }
...
</style>
I've also tried:
section:active { display: block; }
section:focus { display: block; }
I've also tried to add !important to the section:target { display: block !important; } without success. In a simpler page without additional CSS I can get it to work, but I can't seem to get it to work with my full styles.
Suggestions?
Edit: A sample that seems to work as I'd like albeit with divs and not sections:
<html>
<head>
<title> Test Target Selector </title>
<style>
div { display: none; }
div:target { display: block; }
</style>
</head>
<body>
<nav>
1
2
3
</nav>
<section>
<div id="1"> <h2> 1 </h2> <p> Content 1 </p> </div>
<div id="2"> <h2> 2 </h2> <p> Content 2 </p> </div>
<div id="3"> <h2> 3 </h2> <p> Content 3 </p> </div>
</section>
</body>
</html>
Edit2: Adding original full CSS and framework HTML.
<html>
<head>
<style>
/* Block Elements */
body { font-family: "Antic Slab", "Source Sans Pro", Helvetica, sans-serif; margin-bottom: 150px; background-color: white; }
section { margin-left: 35px; }
/* Select/Display Elements */
section:not(#welcome) { display: none; }
section:target { display: block; }
/* Block Elements Continued */
h1 { padding-top: 70px; text-align: left; font-weight: bold; font-size: 1.4em; }
h2 { padding-top: 70px; text-align: left; font-weight: bold; font-size: 1.3em; }
h3 { padding-top: 70px; text-align: left; font-weight: bold; font-size: 1.2em; }
h4 { padding-top: 70px; text-align: left; font-weight: bold; font-size: 1.1em; }
h5 { padding-top: 70px; text-align: left; font-weight: bold; font-size: 1.0em; }
p { text-align: justify; font-size: 1.0em; margin-right: 50px; }
blockquote { margin: 15px 0 0 15px; margin-right: 50px; }
blockquote p { padding-left: 15px; margin-right: 50px; }
ol, ul, dl { margin: 15px 0 0 15px; margin-right: 50px; }
li { padding: 5px; }
dt { padding: 5px; font-weight: bold; float: left; }
dd { padding: 5px; }
img { display: none; border: 1px solid black; margin: 20px; padding: 0; width: 200px; }
/* Inline Elements */
a { text-decoration: none; color: blue; }
a:hover { color: cyan; }
code { font-family: monospace; font-size: 1.1em; }
cite { color: darkgray; font-style: italic; }
cite a { color: navy; }
cite a:hover { color: cyan; }
code { font-family: monospace; font-size: 1.10em; }
blockquote.email { margin: 25px; border-left: 1px solid lightgray; }
/* Classes */
.email { border-left: 1px solid gray; }
.lower-alpha { list-style-type: lower-alpha; }
.outdated { color: red; }
.indent { margin-left: 50px; }
.center { text-align: center; }
.indent { margin-left: 25px; }
.no-wrap { white-space: nowrap; }
.outdated { text-decoration: none; font-size: 0.9em; color: lightgray; }
/* Main Navigation */
nav ul { margin: 0 2px; position: fixed; top: 0; width: 100%; list-style: none; background-color: black; padding: 0; text-align: center; }
nav ul li { position: relative; float: left; color: white; background-color: black; display: inline-block; text-align: center; margin: 0; padding: 10px; font-size: 0.90em; }
nav ul li:before { content: ""; }
nav ul li a { color: white; margin: 0; padding: 10px; text-decoration: none; -webkit-transition: color 0.2s linear, background 0.2s linear; -moz-transition: color 0.2s linear, background 0.2s linear; -o-transition: color 0.2s linear, background 0.2s linear; transition: color 0.2s linear, background 0.2s linear; }
nav ul li a:hover { color: white; }
nav ul li:hover > a { background: black; }
/* Drop-Down Navigation */
nav ul li:hover > ul { visibility: visible; opacity: 1; }
nav ul ul, nav ul ul li ul { list-style: none; margin: 0; padding: 10px; visibility: hidden; opacity: 0; position: absolute; z-index: 99999; width: 180px; background: white; -webkit-transition: opacity 0.2s linear, visibility 0.2s linear; -moz-transition: opacity 0.2s linear, visibility 0.2s linear; -o-transition: opacity 0.2s linear, visibility 0.2s linear; transition: opacity 0.2s linear, visibility 0.2s linear; }
nav ul ul { top: 43px; left: 1px; }
nav ul ul li ul { top: 0; left: 181px; }
nav ul ul li { clear: both; width: 100%; border: 0 none; border-bottom: 1px solid #c9c9c9; }
nav ul ul li a { background: none; padding: 7px 15px; color: white; text-decoration: none; display: inline-block; border: 0 none; float: left; clear: both; width: 150px; }
/* Lists */
ul { margin: 25px; list-style-type: none; }
ul li { padding: 5px; font-size: 0.90em; text-align: justify; }
ul li:before { content: "\2022"; }
ol { margin: 25px; }
ol li { padding: 5px; font-size: 0.90em; text-align: justify; }
ol li.lower-alpha { list-style-type: lower-alpha; }
/* Tables */
table { margin: 25px 25px auto; border-collapse: collapse; }
table caption { margin: 25px 0 25px 0; text-align: left; color: gray; }
th, td { padding: 5px; border: 1px solid lightgray; vertical-align: center; }
th { font-size: 0.8em; font-weight: bold; text-align: center; }
td { font-size: 0.8em; text-align: justify; white-space: nowrap; }
td:hover { background-color: lightcyan; }
</style>
</head>
<body>
<nav>
<ul id="sitemap">
<li class="h1"> Site Doc
<ul>
<li class="h2"> Backup </li>
<li class="h2"> Data </li>
</ul>
</li>
<li class="h1"> Notes
<ul>
<li class="h2"> Manual </li>
</ul>
</li>
</ul>
</nav>
<section id="welcome">
<h1> Documentation Page </h1>
<p> Welcome to the documentation page. </p>
<p> This page is under development. </p>
</section>
<section id="site_doc">
<h1> Site Doc </h1>
<section id="backup">
<h2> Backup </h2>
<p> Backup procedures. </p>
</section>
<section id="data">
<h2> Data </h2>
<p> Data storage procedures. </p>
</section>
</section>
<section id="notes">
<h1> Notes </h1>
<section id="manual">
<h2> Manual </h2>
<p> Manual. </p>
</section>
</section>
</body>
</html>
The only reason your simplified example didn't work is because you had all sections wrapped in yet another section. Replace that wrapper with something else and it will work. As for the more generic problem with your other CSS, there's two ways of approaching it: either find out which rules are mixing up your custom CSS, or add more specific rules, e.g. CSS classes to your toggable sections.
<html>
<head>
<title> Test Target Selector </title>
<style>
section { display: none; }
section:target { display: block; }
</style>
</head>
<body>
<nav>
1
2
3
</nav>
<div>
<section id="1"> <h2> 1 </h2> <p> Content 1 </p> </section>
<section id="2"> <h2> 2 </h2> <p> Content 2 </p> </section>
<section id="3"> <h2> 3 </h2> <p> Content 3 </p> </section>
</div>
</body>
</html>

White space over body when margins are set to 0

I am unsure why this is happening as nothing in the developer tools is showing the body going over top of the white space. The only thing that shows over the white space is when I hover my mouse over the html in my source code, in the developer element tool.
I have the body margin set to 0, so I cannot figure out why I have a white space there.
Anyone have any ideas what is causing it?
<body>
<header class="header">
<div class="header_wrap">
<span class="nav-btn"></span>
<ul class="nav_list">
<li>Home</li>
<li>Spray Foam Insulation</li>
<li>Portable Spray Foam Kits</li>
<li>Polyurea</li>
<li>Personal Protective Equipment</li>
<li>Financing</li>
<li>Contact us</li>
</ul>
</div>
</header>
<div id="lower-header">
<div id="logo-wrap">
<img src="http://sprayfoamequipmentinsider.com/images/SFEI Logo & CSS/Spray Foam equipment insider 3.jpg" id="header-logo1">
<img src="http://sprayfoamequipmentinsider.com/images/Contractor Images/top ad.png" id="header-logo2">
</div>
<div id="topnav">
<ul>
<li class="last">TECH/PARTS/REPAIRS</li>
<li>SPRAY FOAM SCHOOL</li>
<li>USED/BUY/SELL</li>
<li>SPRAY FOAM RIGS</li>
<li>SPRAY FOAM EQUIPMENT</li>
</ul>
</div>
<br class="clear" />
</div>
body{margin:0; padding:0; font-size:13px; font-family:Georgia, "Times New Roman", Times, serif; color:#666666; background-color:#FFFFFF;}
.header {
margin: 0;
background-color: #333;
height: 50px;
}
.header_wrap {
text-align: center;
margin: 0 auto;
position: relative;
}
.nav-btn {
display: none;
}
.nav_list {
text-decoration: none;
background: #333;
color: #FFF;
list-style: none;
position: relative;
z-index: 1;
}
.nav_list > a {
display: inline-block;
padding: 15px 12px;
text-decoration: none;
transition: ease-in-out .5s;
}
.nav_list > a:first-child {
padding-left: 0px;
margin: 0;
}
.nav_list > a > li {
text-decoration: none;
font-size: 1.1em;
color: #FFF;
}
#topbar {
display:block;
position:relative;
width:960px;
margin:0 auto;
}
/* ----------------------------------------------Header------------------------------------- */
#lower-header {
margin: 0 auto;
padding: 10px 0 20px;
z-index: 1;
color: #666666;
background: #000000;
border-bottom: 1px solid #363636;
width: 100%;
overflow: hidden;
}
#logo-wrap {
width: 960px;
margin: 0 auto;
}
#header-logo1 {
float: left;
width: 400px;
height: 93px;
}
#header-logo2 {
float: right;
width: 310px;
height: 75px;
}
#header-logo1, #header-logo2 {
border: none;
}
/*#lower-header h1, #header p, #header ul{margin:0; padding:0; list-style:none; line-height:normal;}*/
#topnav {
float: left;
padding-top: 22px;
width: 100%;
text-align: center;
font-size: 1.1em;
background: #000000;
font-family: Georgia, "Times New Roman", Times, serif;
}
#topnav li {
display: inline-block;
padding: 10px 12px 0 12px;
border-top: 2px solid transparent;
}
#topnav li:hover {
border-top: 2px solid #0C3;
color: #0C3;
}
#topnav a li {
color: #FFF;
line-height: 1.3em;
text-decoration: underline;
}
It's probably the default margins on ul.nav_list that are interfering by collapsing with its ancestors (up to and including body). Zeroing out those margins should fix it.
In console following style sheet create the spacing problem.
ul, menu, dir {
display: block;
list-style-type: disc;
-webkit-margin-before: 1em;
-webkit-margin-after: 1em;
-webkit-margin-start: 0px;
-webkit-margin-end: 0px;
-webkit-padding-start: 40px;
}
see below screenshot :
to remove this problem overwrite margin in '.nav_list' css class
Example below:
.nav_list {
text-decoration: none;
background: #333;
color: #FFF;
list-style: none;
position: relative;
z-index: 1;
-webkit-margin-before: 0px;
-webkit-margin-after: 0px;
-webkit-margin-start: 0px;
-webkit-margin-end: 0px;
}

Space above navigation bar?

I currently have a gap above my navigation bar and I'm not sure how to remove it. Any ideas? I would like to have a gap of about 5-10px above my navigation bar. I think new fresh eyes are needed to look at my code.
The HTML:
<body>
<!-- Naigation Code -->
<nav class="navigation-main">
<ul class="navigation-right">
<li>Contact</li>
<li>Store</li>
<li>Projects</li>
<li>Forum</li>
</ul>
</nav>
<div class="homepage-container">
<h2 class="navigation-logo">Code Depot</h2>
<br>
<i class="fa fa-angle-double-down" style="font-size: 40px; color: #FFFFFF; margin-top: 55px; margin-bottom: 20px;"></i>
The CSS:
li {
list-style-type: none;
text-decoration: none;
}
.navigation-main ul li {
display: inline;
padding: 10px;
border-radius: 2px;
float: right;
}
.navigation-main ul li a {
color: #ffffff;
}
.navigation-main ul li a:hover {
color: #ffffff;
}
.navigation-right {
float: right;
font-size: 18px;
}
/*Icon CSS*/
.large-icon {
font-size: 1.5em;
}
/*Logo CSS (15 inch display)*/
.navigation-logo {
font-family: 'Raleway', sans-serif;
font-weight: 100;
color: #FFFFFF;
font-size: 85px;
padding-top: 200px;
text-align: center;
}
/*
.button-logo{
background-color: rgba(0, 0, 0, 0.2);
text-align: center;
font-size: 20px;
color: #ffffff;
padding: 18px;
border-radius: 8px;
border: solid #ffffff;
font-weight: 50;
}
.button-logo {
transition: all 0.25s ease-in-out; /* Hover off */
}/*
.button-logo:hover {
-moz-filter: blur(4px);
-webkit-filter: blur(4px);
filter: blur(4px);
transition: all 0.2s ease-in; /* On hover */
}
/*Footer CSS*/
.footer-main{
margin-top: 125px;
margin-left: 10px;
}
.footer-main-right{
float: right;
margin-right: 10px;
}
/*Content CSS*/
.homepage-container{
text-align:center;
margin:auto;
}
.white-info{
font-size: 20px;
text-align: center;
}
.white-info-title{
text-align: center;
margin-top: 80px;
}
.white-background {
position: relative;
background: white;
width: 100%;
height: 450px;
margin: 0 auto;
padding: 20px;
resize: both;
overflow: auto;
color: black;
font-size: 40px;
}
Help will be 100% appreciated guys.
Thanks for helping out :D
Just a guess but I think you haven't yet removed the standard margin around the entire page.
Try adding this:
*, body {
margin: 0px;
padding: 0px;
}
margin and padding to 0 will not help you. Use:
body { float: left; }
This should fix problem for you.
Here is an example: https://jsfiddle.net/77275ae9/

Getting menu stick to the bottom of header

I'm trying to let my menu stick to the bottom of my header. I've already tried getting it down, with deleting the float's, adding some, playing with padding/margin (this isn't an option seems to me?
<div id="header">
<div id="logo">
<h1>blah</h1>
<h3>Blah</h3>
</div>
<div id="menu">
<ul>
<li>qsdfqsdfqsdf</li>
<li>qsdfqdsfqsdf!</li>
<li>qdsf</li>
<li>qdsf</li>
</ul>
</div>
</div>
CSS:
/** HEADER */
#header {
height: 125px!important;
background: #000;
position: fixed;
top: 0;
width: 100%;
}
/* Logo */
#logo
{
float: left;
width: 250px;
padding: 20px 0px 0px 50px;
text-transform: uppercase;
}
#logo h3{
color: #fff;
margin-left: 1em;
font-size: 1em;
}
#logo h1
{
padding: 5px 10px 0px 0px;
}
#logo h1 span, #logo h3 span{
color: #000;
}
#logo h1 a
{
text-decoration: none;
font-size: 1.5em;
font-weight: 300;
color: #FFFFFF;
}
#logo p
{
display: block;
margin-top: -10px;
padding: 0px 0px 0px 0px;
letter-spacing: 1px;
font-size: 1.2em;
color: #FFFFFF;
}
#logo p a
{
color: #FFFFFF;
}
/* Menu */
#menu{
float: right;
width: 600px;
margin: 2em 2em 0 0;
}
#menu ul{
float: right;
margin: 0;
padding: 0;
list-style: none;
line-height: normal;
position: relative;
display: inline-table;
}
#menu li
{
float: left;
}
#menu a
{
display: block;
letter-spacing: 1px;
text-decoration: none;
text-transform: uppercase;
font-size: 18px;
font-weight: 300;
color: #FFFFFF;
padding: 1em;
text-decoration: none;
}
#menu a:hover{
color: #000;
text-decoration: none;
background: #fff;
}
#menu ul li {
float: left;
}
#menu ul li:hover {
}
Here an example:
http://jsfiddle.net/2wmSt/
Almost there mate, just position the menu absolute to the bottom of the header.
#menu{
position:absolute;
bottom:0;
right:0;
}
jsfiddle example