Remove white spaces between img - html

i'm using blogger and I want to know how can I remove the white spaces between a img and a text, because is a lot separated. Blogger contains a class called separator but I don't know what to do for fix that.
Here's a image:
How can I remove it?
This is my css
.separator{
margin: 0;
display: block;
padding: 0;
}
.post img {
display: block;
text-align: center;
padding: 0px;
margin: 0px;
}
CSS
/* Posts-----------------------------------------------*/
h2.date-header{margin:1.5em 0 .5em;display:none;}
.wrapfullpost{display: block;}
.post{
display: block;
margin: 0;
}
.post img {display: block;
margin: auto;
text-align: center;
padding: 0;
}
.post-title{color:#333333;margin:0 0 10px 0;padding:0;font-family:Arial,Helvetica,Sans-serif;font-size:24px;line-height:24px;font-weight:bold;}
.post-title a,.post-title a:visited,.post-title strong{display:block;text-decoration:none;text-decoration:none;}
.post-title strong,.post-title a:hover{text-decoration:none;}
.post-body{
font-size: 17px;
display: block;
margin: 0;
}
.entry-content{ padding: 0; margin: 0; display: block;
}
.separator{
margin: 0;
display: block;
padding: 0;
}
.post-footer{margin:5px 0; font-weight: 300;}
.comment-link{margin-$startSide:.6em}
.postmeta-primary{color:#999;font-size:12px;line-height:18px;padding:0 0 5px 0}
.postmeta-secondary{color:#999;font-size:12px;line-height:18px;padding:0 0 10px 0}
.postmeta-primary span,.postmeta-secondary span{padding:3px 0 3px 20px;background-position:left center;background-repeat:no-repeat}
.meta_date{background-image:url(http://2.bp.blogspot.com/-paWPYJvQDqA/UC7eiuIKgUI/AAAAAAAAAvw/af410sUcO2w/s000/date.png)}
.meta_author{background-image:url(http://3.bp.blogspot.com/-reTaoyVmDXA/UC7ejgVBQbI/AAAAAAAAAv4/u6d-iPeLZi0/s000/author.png); border-right: 1px solid #ccc;
padding-right: 10px!important;
m
argin-right: 5px;}
.meta_comments{background-image:url(http://2.bp.blogspot.com/-zZgvwATiF3E/UC7ej-cvmbI/AAAAAAAAAwA/THMs0579MII/s000/comments.png) }
.meta_edit{background-image:url(images/edit.png)}
.meta_categories{background-image:url(http://1.bp.blogspot.com/-g-ptS39XbNM/UC7ekTJsEXI/AAAAAAAAAwI/t8fMhUuUvQI/s000/category.png)}
.meta_tags{background-image:url(http://3.bp.blogspot.com/-fZuK3yymXmo/UC7ek6kEDLI/AAAAAAAAAwQ/-J16r4bHvFo/s000/tags.png)}
.readmore{margin-bottom:5px;float:right}
.readmore a{color:#F85B48;background:#EAEAEA url(http://4.bp.blogspot.com/-m6AJDK0k2xA/UC7emOYbEbI/AAAAAAAAAwY/Q4o73QiZdc4/s000/readmore-bg.png) left top repeat-x;padding:8px 14px;display:inline-block;font-size:12px;line-height:12px;text-decoration:none;text-transform:uppercase}
.readmore a:hover{color:#fff;background:#E74F3D url(http://4.bp.blogspot.com/-m6AJDK0k2xA/UC7emOYbEbI/AAAAAAAAAwY/Q4o73QiZdc4/s000/readmore-bg.png) left -126px repeat-x;text-decoration:none}
And this is what blogger add in HTML
<div class="separator" style="clear: both; text-align: center;">
<img border="0" src="http://3.bp.blogspot.com/-DGgnyTkp3xc/VAtkSdWZLxI/AAAAAAAAAb4/oXctHDcrSRk/s1600/Sinopsis%2Bwissar.png" height="160" width="640" /></div>

Since you didn't share any of your code, It's hard to explain where is the problem (You may get negative rep).
but i can suggest you to look at your style classes. try following, it's just a removal of Padding, and Margin
.imageClass{
padding: 0px;
margin: 0px;
display: block;
}
.textClass{
padding: 0px;
margin: 0px;
display: block;
}

Within the seperator class there is a blockquote which contains the text, and an a tag which is a link containing the image. Both of these have margins that you do not want. Try this.
.seperator blockquote {
margin: 0px;
}
.seperator a {
margin-right: 0px;
}
Note: Remove what was in my previous answer.
If you can't get it to work, go to the section on your webpage that you want to change, right click -> inspect element. This will bring up the HTML inspector. You can then click on different elements and see the css on the right hand side that relates to that element. Try unticking different css statements or changing them/adding new ones. Just continue to play around with it until you can get it. I really can't be of any more help.

Solved, just added the next
.separator {
display: block;
line-height:0;
margin: 0;
padding: 0;
}
.separator blockquote {
margin: 0;
}
.separator a {
margin-right: 0;
}
Thanks to Yep_It's_Me who helped me a lot.

Related

CSS isn't showing up on a specific part of the page

So I'm working on a website I'm building and am in the process of consolidating stylesheets. I'm currently having a problem where one div section of the page is not connecting to the stylesheet. The rest of the page is fine but it's just this one section and I have no idea why. I copied and pasted it (html and style) from the first draft and am using the same fonts and bootstrap cdn (bootstrap fonts 4.1 and bootstrap cdn 3.3.7) but am getting different results. Would appreciate any help you could offer.
here's the html
<div class="main">
<div class="container">
<header>
<center><h2>My Work</h2></center>
</header>
<div class="box">
<span class="image featured"><img src="laptopstock.jpg" alt="" /></span>
<h3>Arris SURFboard SBG6700-AC Wireless Gateway Manual</h3>
<p>The Arris SURFboard SBG6700-AC wireless gateway is the premier modem on the market today. It's top of the line security, simple user interface and blazing fast speeds make it the number one consumer choice for modems. With this guide you can set up your home wireless network in 30 minutes.</p>
<br>
<p>Learn More</p>
</div>
</div>
</div>
here's the css
main {
padding: 8em 0;
}
main.header {
text-align: center;
margin: 0em 0 3em 0;
padding-top: 1000em;
}
/* difference between padding and margin?
padding is on the inside.
margin on the outside.*/
/* this is the gray space between the header and the image */
main.header h2 {
font-size: 2.75em;
margin: 0;
letter-spacing: .005em;
color: #000;
}
body.landing main {
margin-top: -14em;
}
.container {
margin-right: auto;
margin-left: auto;
padding-right: 15px;
padding-left: 15px;
width: 100%;
}
.box {
margin: 1em;
overflow-x: hidden;
padding: 2em 2em !important;
}
.box.features .features-row {
border-top: 0;
padding: 0;
}
.box.features .features-row section {
border: 0;
border-top: solid 1px #e5e5e5 !important;
float: none;
margin: 2em 0 0 0 !important;
padding: 2em 0 0 0 !important;
width: 100%;
}
.box.features .features-row:first-child section:first-child {
border-top: 0 !important;
margin-top: 0 !important;
padding-top: 0 !important;
}
.box .image.featured {
margin-left: -2em;
width: calc(100% + 4em);
}
.box .image.featured:first-child {
margin-bottom: 2em;
margin-top: -2em;
}
.box .image.featured:last-child {
margin-bottom: -2em;
margin-top: 2em;
}
Your element selector is wrong. From your html, 'main' is a class, 'header' is an element. To refer to class in css, use '.' as in .main, to refer to element, use the tag name directly. Writing main.header means and element 'main' that has class 'header' which is not what you want. Use the Css instead;
.main {
padding: 8em 0;
}
.main header {
text-align: center;
margin: 0em 0 3em 0;
padding-top: 1000em;
}
/* difference between padding and margin?
padding is on the inside.
margin on the outside.*/
/* this is the gray space between the header and the image */
.main header h2 {
font-size: 2.75em;
margin: 0;
letter-spacing: .005em;
color: #000;
}
That should work. Let me know how it goes.
center tag is deprecated in your html header. Replace with text-align in css. An example would be: h2 { text-align: center; }

H2 and P on same line (HTML, CSS, PHP)

Hi i would like to have my h2 heading and p on the same line with 2 empty spaces between them. I have tried almost all solutions but i dont know what im doing wrong. Here is my CSS and HTML:
h3 {
float: right;
padding: 0;
margin: 0;
left: 20px;
display: inline;
color: #00cccc;
}
publish_date {
text-align: left;
padding: 0;
margin: 0;
color: #ff0033
}
<publish_date>Lorem ipsum</publish_date>
<h3>Sit amet</h3>
Test this out!
CSS:
p, h3{
display: inline-block; /* display on the same line */
}
h3{
position: relative;
left: 20px; /* this will not work without setting position property */
padding: 0;
margin: 0;
color: #00cccc;
float: right;
}
p{
padding: 0;
margin: 0;
color: #ff0033
text-align: left;
}
HTML:
<p><?php echo $the_publish_date ?></p><h3><?php echo $article_title1 ?></h3>
Just for your information, as Muhammad Usman stated, "<publish-date> is not a valid HTML tag", and whilst you are able to do this, there is no real point to it. You might as well just stick to the native <p> or <span> tags.
Hope it helps!
JSFiddle: https://jsfiddle.net/n3kmd9ye/
Add to h3 float:left; margin-right:10px;
float:left will put the next to each other and with the margin-right you can control the distance between them.
h3 {
float: right;
padding: 0;
margin: 0;
left: 20px;
display: inline;
color: #00cccc;
float:left;
margin-right:10px;
}
publish_date {
text-align: left;
padding: 0;
margin: 0;
color: #ff0033
}
<publish_date>Lorem ipsum</publish_date>
<h3>Sit amet</h3>
I know this is a bit outdated here but this is the way how I solved it.
Put a wrapper around the two elements like this:
<div class="publish-wrapper">
<publish_date>Lorem ipsum</publish_date>
<h3>Sit amet</h3>
</div>
And then use a flexbox.
.publish-wrapper {
display: flex;
flex-direction: row;
}

Why is there more space on the bottom of the div?

I have a header with a div inside of it, for some reason there is more space under the div then above. I tried setting all the padding to 0 in hope to see which one was causing it but it seems to not be a padding at all.
HTML
<header>
<div class="logo">
<div class="centrDivInDiv">
<h1>Welcome to Planet Earth</h1>
<p>The best planet after Pluto.</p>
</div>
</div>
</header>
CSS
body {
margin: 0px;
}
h1 {
margin-bottom: 0px;
}
header {
background-color: #E74C3C;
padding: 10px;
}
header p {
line-height: 0%;
}
.logo {
line-height: 80%;
padding: 10px 20px 10px 20px;
margin: 0px;
background-color: #2C3E50;
display: inline-block;
}
.logo p {
margin-top: 24px;
}
.centrDivInDiv {
display: table-cell;
vertical-align: middle;
margin: 0;
}
JsFiddle
Add vertical-align:middle to your .logo div (and you can remove it from .centrDivInDiv):
.logo {
line-height: 80%;
padding: 10px 20px 10px 20px;
margin: 0px;
background-color: #2C3E50;
display: inline-block;
vertical-align: middle;
}
jsFiddle example
Your problem is caused by the display: inline-block of your CSS. If you remove that or change it for display: blockit will be fine. You should also set your width: 50%
All of that in your .logo
check the fiddle
jsFiddle
The problem exists because you're using display: inline-block; in .logo
The best way to solve this problem is to set font-size to 0 in header so it will be like this:
header {
background-color: #E74C3C;
padding: 10px;
font-size: 0;
}
Also you should set font-size in .logo so it will be like this
.logo {
line-height: 80%;
padding: 10px 20px 10px 20px;
margin: 0px;
background-color: #2C3E50;
display: inline-block;
font-size: 16px;
}
Maybe this link will help you, it has more details
Fighting the Space Between Inline Block Elements | CSS-Tricks

Using css sprites without html

I have created a css sprite image for multiple images. The css for sprite is:
.sprites {background-image:url("/images/max.png");background-color:transparent;background-repeat:no-repeat;}#image_5306605314403955_gif {height:10px;width:10px;background-position:0 0;}#image_2814089791124994_gif {height:8px;width:8px;background-position:-10px 0;}#image_05699283026450497_gif {height:36px;width:50px;background-position:-18px 0;}#image_23591702358881883_gif {height:9px;width:11px;background-position:-68px 0;}#image_9167572062810537_gif {height:10px;width:10px;background-position:-79px 0;}#image_21043553959746242_gif {height:16px;width:16px;background-position:-89px 0;}
Now I want to assign the first image from this sprite to an li element. Currently the first images is assigned using background:url property of this li as:
li{margin-top:0;padding:3px 0 3px 25px;background:url(../images/arrow.gif)
How can bring the first image from sprite and assign to the li element. I have seen an example which suggests to use:
<div class="sprites" id="image_5306605314403955_gif"></div>
But I want to see if adding HTML can be avoided and use CSS only for that purpose. The li element on my page looks like:
<li>ABC</li>
I am not sure if that is what you are looking for or not, but the below code should do it:
HTML:
<li class="sprites"><a id="image_5306605314403955_gif" href="http://www.xyz.com">ABC</a></li>
<li class="sprites"><a id="#image_9167572062810537_gif" href="http://www.xyz.com">ABC</a></li>
CSS:
.sprites {background-image:url("/images/max.png");background-color:transparent;background-repeat:no-repeat;}
#image_5306605314403955_gif {height:10px;width:10px;background-position:0 0;}
#image_2814089791124994_gif {height:8px;width:8px;background-position:-10px 0;}
#image_05699283026450497_gif {height:36px;width:50px;background-position:-18px 0;}
#image_23591702358881883_gif {height:9px;width:11px;background-position:-68px 0;}
#image_9167572062810537_gif {height:10px;width:10px;background-position:-79px 0;}
#image_21043553959746242_gif {height:16px;width:16px;background-position:-89px 0;}
If what you are looking for is not to use class or id, then I think it is impossible, as your CSS needs an identifier to differentiate between your items (which are inherited from the same class <li>)
body {
overflow-y: scroll
}
.mini_iframe,
.serverfbml_iframe {
overflow-y: visible
}
.auto_resize_iframe {
height: auto;
overflow: hidden
}
.pipe {
color: gray;
padding: 0 3px
}
#content {
margin: 0;
outline: none;
padding: 0;
width: auto
}
.profile #content,
.home #content,
.search #content {
min-height: 600px
}
.UIStandardFrame_Container {
margin: 0 auto;
padding-top: 20px;
width: 960px
}
.UIStandardFrame_Content {
float: left;
margin: 0;
padding: 0;
width: 760px
}
.UIStandardFrame_SidebarAds {
float: right;
margin: 0;
padding: 0;
width: 200px;
word-wrap: break-word
}
.UIFullPage_Container {
margin: 0 auto;
padding: 20px 12px 0;
width: 940px
}
.empty_message {
background: #f5f6f7;
font-size: 13px;
line-height: 17px;
padding: 20px 20px 50px;
text-align: center
}
.see_all {
text-align: right
}
.standard_status_element {
visibility: hidden
}
.standard_status_element.async_saving {
visibility: visible
}
img.tracking_pixel {
height: 1px;
position: absolute;
visibility: hidden;
width: 1px
}

Can't align my image to the left

At my wordpress theme at http://www.iam-us.nl/over-i-am-us I can't align my image to the left.
I have added those WordPress Generated Classes to the css
/******************************************
* Align box
******************************************/
img.centered, .aligncenter, div.aligncenter {
display: block;
margin-left: auto;
margin-right: auto;
}
img.alignright {
padding: 4px;
margin: 0 0 2px 7px;
display: inline;
}
img.alignleft {
padding: 4px;
margin: 0 7px 2px 0;
display: inline;
}
.alignright {
float: right;
}
.alignleft {
float: left;
}
But somehow the css is not read well. When I open firebug there is no class added to the picture at all.
I checked your whole style.css and found that you have a bad comment here:
/** Coin Slider HACK by aSeptik * 14/06/2011 16.37.38 * fix navigation button z-index */
#slider {
margin: 0 0 10px 0;
padding: 0;
width: 950px;
height: 350px;
/*background-image: url('http://www.iam-us.nl/wp-content/themes/iamus/images/De-mens-op-de-juiste-plek.png');
}*/
you commented out the last curly brace!! }
so change it to this:
height: 350px;
/*background-image: url('http://www.iam-us.nl/wp-content/themes/iamus/images/De-mens-op-de-juiste-plek.png');*/
}
and that's it