Adding margin/space to paragraph [closed] - html

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 3 years ago.
Improve this question
I was wondering what the best way is to get some white space below paragraphs and other elements. I have seen man websites that have empty p-divs in the html(created by ), but this is probably bad practise, isn't it? Is it recommended to use margins in this case?

As noted in the comments, use margin styling. You can add a class to you divs and style on that, or you can add a default style to all tags of a certain type, etc.
<p class="my-paragraph">
Here is some text.
</p>
.my-paragraph {
margin: 15px;
}
or if you want to apply it to all
p {
margin: 15px;
}
And you can target different margin directions:
p {
margin-top: 15px;
margin-bottom: 20px;
margin-left: 50px;
margin-right: 15px;
}

Related

How to apply effects to a unicode character in CSS? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
How can I apply various effects, like increasing its size etc., using CSS to this arrow
https://jsfiddle.net/tnfLc58h/
So far I've been able to change its color.
HTML
<div class="down-arrow">
</div>
CSS
.down-arrow:after {
content:'\2193';
color: red;
}
edit: I want to make it responsive.
Since a pseudo element is an inline element, you need for example to give it display: inline-block (or block) for it to respond to width/height settings (though not if only to change font properties of course, as some comments assumed I meant).
.down-arrow:after {
content:'\2193';
display: inline-block; /* or block */
background: lightgray;
color: red;
height: 32px;
width: 40px;
font-size: 24px;
text-align: center;
}
<div class="down-arrow">
</div>
To increase the size of the content, you should set the font-size
Like so :
.down-arrow:after {
content:'\2193';
color: red;
font-size: 20px; // change to whatever
}
See updated EXAMPLE

CSS for a HTML Newsletter [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
I have the following CSS:
#Wrapper {
width: 600px;
background: #FFFFFF;
margin: 0 auto;
padding: 5px;
border-radius: 10px;
}
And the following HTML:
<div id="Wrapper">
...
</div>
But for some reason the wrapper's CSS styling does not extend the full length of the HTML.
I'm missing something obvious I'm sure but can't see the wood for the trees right now and pasting all the code would just make my post look a mess.
Any thoughts...?
Use tables for emails to be consistent across all clients.
Then you should read up on CSS use within emails.
margins, border-radius are not acceptable.
http://www.campaignmonitor.com/css/

Adding directed edges to a CSS-based graph visualizer [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
See this CSS-based visualization for graphs. Any idea what is the easiest way to add directions to edges (e.g. arrows on edges)?
Wrap your <li> contents with <span> tags and style the pseudo elements to achieve a proper result. You may not use ASCII characters, backgounds or even pure CSS triangles.
http://jsfiddle.net/ndozdw00/1/
.tree li span:after{
content: "▼";
position: absolute;
left: 50%;
width: 10px;
margin-left: -5px;
top: 10px;
z-index: 100;
}

I can't fill in the blanks in my code [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I wrote code.
I can't fill in the blanks in my code.
Why I can't do it?
...
<style type="text/css">
...
#content
{
margin: 0px;
padding: 0px;
width: 100%;
background-color: black;
color: white;
}
...
<div id="content">
AAAAAAAAA<br>AAAAAAAAA<br>AAAAAAAAA<br>AAAAAAAAA<br>AAAAAAAAA<br>AAAAAAAAA<br>AAAAAAAAA<br>AAAAAAAAA<br>AAAAAAAAA<br>AAAAAAAAA<br>AAAAAAAAA<br>AAAAAAAAA<br>AAAAAAAAA<br>AAAAAAAAA<br>AAAAAAAAA<br>AAAAAAAA<br>AAAAAAAAA<br>AAAAAAAAA<br>AAAAAAAAA<br>AAAAAAAAA<br>AAAAAAAAA<br>AAAAAAAAA<br>AAAAAAAAA<br>AAAAAAAAA<br>AAAAAAAAA<br>AAAAAAAAA<br>AAAAAAAAA<br>AAAAAAAAA<br>AAAAAAAAA<br>AAAAAAAAA<br>AAAAAAAAA<br>AAAAAAAAA<br>AAAAAAAAA<br>AAAAAAAAA<br>AAAAAAAAA<br>AAAAAAAAA<br>AAAAAAAAA<br>AAAAAAAAA<br>AAAAAAAAA<br>AAAAAAAAA<br>AAAAAAAAA<br>
</div>
My site's address is http://www.clover.lrv.jp.
This is due to a browser pre-set margin. Put this at the top of your code, it will reset the margins and padding:
*{margin: 0; padding: 0;}
You need to define your height as well. Note don't add height in percent here. For eg. add this line: height: 200px; in your #content.

Unspecified height of div [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 8 years ago.
Improve this question
My page here on the left hand nav is showing the categories (div.cat) spaced out at 48px height and I can't work out why.
There's no padding or margins or height specified. If someone could have a look on an inspector to see what could be causing it that'd be great.
The clearfix is causing issues within the child. The whole structure is a tangle of block and inline elements that should be cleaned up in one way or another. Any block elements within each category seem unnecessary. You probably also want to use a ul for greater semantic meaning.
There is class .cat declared in the css file.
.cat, .cat a {
padding: 0 5px;
color: #444066;
}
remove the padding from there or reduce the padding from 5px to 0px
and another thing is found is in the body class
body {
line-height: 1.6;
font-size: 15px;
}
which increses line-height of all divs and elements