The Cache: Technology Expert's Forum
 
*
Welcome, Guest. Please login or register. September 23, 2019, 12:13:22 AM

Login with username, password and session length


Pages: [1]
  Print  
Author Topic: what do you use for empty space ?  (Read 1681 times)
NYDAz
Expert
****
Offline Offline

Posts: 212

The Night Stalker


View Profile
« on: November 11, 2009, 06:39:57 PM »

what html tag do you use for creating empty space between two vertical images !

I know that < br / > is to tell that begin a next row ! it's good !

Or it's good to use JUST <p></p> for an empty space ?

Sorry for this n00b question

 D'oh!  D'oh!  D'oh!
Logged

what's up?
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« Reply #1 on: November 11, 2009, 06:55:24 PM »

Don't install empty space, put margin in the image itself.

< img src="/graphics/blah.jpg" style="width: 100px; height: 100px; margin-bottom: 25px;" >

Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
NYDAz
Expert
****
Offline Offline

Posts: 212

The Night Stalker


View Profile
« Reply #2 on: November 11, 2009, 07:25:23 PM »

hmmm ... right on perk !

But I wonder ... it's bad if I did something like that ?

 Embarrassed
Logged

what's up?
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« Reply #3 on: November 11, 2009, 07:38:38 PM »

Bad .. you mean just putting a < p > < /p > into the page?

No, not essentially "bad" but certainly not optimal. The deal is that the spacing will then be defined by font size and/or the P size for the document for the current document, and will flex by browser and OS. So it's bad only in the sense that you are surrendering a certain amount of control. Imagine, for a moment that you define the spacing for a P in your CSS file ... you say you want so much margin, to much padding etc... the page is looking good, then you decide you want 5 more pix below each paragraph - your images will be more spread out as well.

By placing the margin in the image, you are precisely calling out a specific amount of distance between the elements, regardless of any external factors. Just better coding.
« Last Edit: November 11, 2009, 07:40:20 PM by perkiset » Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
NYDAz
Expert
****
Offline Offline

Posts: 212

The Night Stalker


View Profile
« Reply #4 on: November 11, 2009, 07:55:26 PM »

better coding for smart coders !

 Grin
Logged

what's up?
Pages: [1]
  Print  
 
Jump to:  

Perkiset's Place Home   Best of The Cache   phpMyIDE: MySQL Stored Procedures, Functions & Triggers
Politics @ Perkiset's   Pinkhat's Perspective   
cache
mart
coder
programmers
ajax
php
javascript
Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS!