Forum Moderators: open

Message Too Old, No Replies

Space problem

Space problem in HTML

         

sundarm

8:57 pm on Nov 18, 2006 (gmt 0)

10+ Year Member



Hai all,

I have a problem in HTML that for giving space &nbsp can be applied but for giving more then the space like giving in winword which tag is used. Please clear my doubt any.

[edited by: encyclo at 9:18 pm (utc) on Nov. 18, 2006]
[edit reason] no email addresses please, see forum charter [/edit]

penders

12:15 pm on Nov 19, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Hi sundarm, welcome to WebmasterWorld... well, for 2 or 3 'spaces' you could just use    or     (non-breaking spaces) - but for any more this could become messy.

The old way was to use a single pixel (transparent) gif image and set the width and height on the IMG tag to space elements with pixel precision. This will still work (particularly in older browsers), but it goes against the rules of separating content from presentation, as the two are mixed, and it can make your markup confusing if used too much.

So I think the prefered method these days is to set the margin/padding and/or position:relative (with left: and top: set) in your external CSS file to perhaps space your elements. But the method used will depend on what you are trying to achieve.

To you have a particular example?

lucianp

7:20 pm on Nov 28, 2006 (gmt 0)

10+ Year Member



most of us are using the table format.
in this way your page can be structured as you want.
The choice is yours.