Jump to content

How to add space between text or images


Joostk

Recommended Posts

When running in standards compliant mode, images have a small space below them by default. This only occurs with Strict and HTML 5 doctypes.You can give the image a bottom margin with CSS if you want some separation.

Link to comment
Share on other sites

If you don't know CSS you'll never make a decent page. HTML is just not intended for designing. W3Schools has a good CSS tutorial and you should look at it. Also, you really should fix the errors that the HTML validator showed you.

Link to comment
Share on other sites

@Joostk - just goto the real website of w3schools... they have greate tutorials about .css... including the image css your talking about... normally i would do somfthing like this: img {margin-bottom: 10px; /*you can change this if liked...*/} and then it would do it for you... but it does that on all of the images, if needing this on one seperate set of images, then make a div box with a class/id around them, and then put a #''div box id name here...' and then at end of that the img, and then it will only do for those images inside that div :)... it is actually that easy :P... but ok, i also had a little trouble understanding the image part when i first began to code... so it is understand able ;)... in anyways... try read up on it!... there are greate tutorials on w3schools website!... just need to find them :)...

Link to comment
Share on other sites

if needing this on one seperate set of images, then make a div box with a class/id around them, and then put a #''div box id name here...' and then at end of that the img, and then it will only do for those images inside that div :)...
You can add classes right on the <img> element to avoid adding redundant code.
Link to comment
Share on other sites

It would be better to have a css file for all the styles, but in youre case add this code just before the </head> tag ends. <style type="text/css">img{margin : 0 0 10px 0;}</style>

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...