Any way of getting rid of blank space after heading tags?

Status
Not open for further replies.


I understand the question differently. If I understood it improperly, Stanley is right, if not, I'm wrong.

h1{
display: inline;
}
 
margin will get rid of the space around it
inline will also get rid of the space, but it will no longer be treated as a block
 
thanks guy,..but i got another problem..im testing around stuff and trying to learn how to use phps..and i'm calling a php file into my HTML file and i use echo "<h3>"title"</h3>";
echo "<p>"something else"</p>";

and the space is still there...it's weird. the only way i seem to be able to get rid of the space is
echo "<p><h3>"title"</h3>";
echo ""something else"</p>";
but that for some reason makes my "something else" yellow! haha and i know that isnt the right way to do things. anything i'm doing wrong? when i mean extra space, i mean it in the sense that stanley was telling me to fix it.
 
Change the margin, and/or padding on your 'p' element in addition to the header elements.

p{
padding-top: 0;
margin-top: 0;
}



---------------------------------

On my other post I thought you wanted something like the following:

HEADING let's go

as opposed to

HEADING
let's go



posting your code may be a good idea.
 
Well if you want to display the word "title" as a <h3> in PHP... It'd be

<?php echo "<h3>title</h3>"; ?>

If you wanted the "title" part to be dynamic, then you would use a variable for it:
<?php

$title = "whatever you want your title to be";

echo "$title";

?>

Hope that helps some
 
Status
Not open for further replies.