The Praetorian Posted November 13, 2006 Share Posted November 13, 2006 Right. So I'm using a code to pull things out of a database. Well, when the results appear, they don't have any spaces between them. (They come out in a column, a list of entries.) How can I add spacing between each entry? I've tried putting <br /> above and below them, but that doesn't work. Neither did padding. Suggestions?Here's the code I'm using. while ($r = mysql_fetch_array($result)){ if ($r['word'] != "") { echo '<h2>'.$r['word'].'</h2><br />'; if ($r['category'] != "") echo '<span class="blue">Category:</span> '.$r['category'].'<br />'; if ($r['pronounce'] != "") echo '<span class="blue">Pronunciation:</span> '.$r['pronounce'].'<br />'; if ($r['definition'] != "") echo ''.$r['definition'].'<br />'; if ($r['definitiontwo'] != "") echo ''.$r['definitiontwo'].'<br />'; if ($r['related'] != "") echo '<span class="blue">Related Entries:</span> '.$r['related'].'<br />'; }} Link to comment Share on other sites More sharing options...
reportingsjr Posted November 13, 2006 Share Posted November 13, 2006 add another <br />, one line break will push the content after it down one line, so it is on the next line, 2 line breaks will push it down 2 lines so there is a line in between the content. Link to comment Share on other sites More sharing options...
The Praetorian Posted November 13, 2006 Author Share Posted November 13, 2006 No no. The content I showed there is fine. It shows up the way I want it. But that block there, when more than one entry is pulled out, appears repeatedly. And there isn't any space between the blocks. Here. Take a look.Multiple resultsWhat I want to add is space between the bottom of one entry and the top of the next. Link to comment Share on other sites More sharing options...
aspnetguy Posted November 13, 2006 Share Posted November 13, 2006 yes, and by adding an extra <br/> to the last echo will put a space between that block and the next one, etc,ect Link to comment Share on other sites More sharing options...
The Praetorian Posted November 13, 2006 Author Share Posted November 13, 2006 Ah I see. I thought I had tried that already but I guess not. Thanks. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now