Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 1 of 2 12 LastLast
Results 1 to 15 of 22
  1. #1
    Regular Coder
    Join Date
    Nov 2002
    Location
    Southern California
    Posts
    110
    Thanks
    0
    Thanked 0 Times in 0 Posts

    spacer.gif vs  

    I have been pondering this for a while and I sdon't know the answer.


    Whenever I try to code a page I avoid using any type of spacer.gif image or even <spacer type=block width="50bajillion">. What I do is use tables and set blank cells with an &ampnbsp; inside if I need to space objects. I am of the opinion that it's poor coding to use spacer.gifs and the <spacer> tag. Am I wrong, is there a real reason to use all those spacer.gifs? Is ther a benefit to use gifs instead of empty table cells? In my work environemnt everything is tabled that we publish live so maybe this has affected my thinking.... Anyone care to chime in with their own $.02?
    Everyone has the right to be stupid, some just abuse the privilege.

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Posts
    676
    Thanks
    1
    Thanked 0 Times in 0 Posts
    cit...
    /me just a uses® the spacer.gif method 'cause thennn /me just a knows® it will/should look the sammme to everyone...

    n' just a seems® to think that the & n b s p ; would be variable sized just a ccording® to the viewers font settings??? aka small medium n' large???

    /me just a reminds® ya /me stilll isnt programmed to think...lol...


    just a ps®...
    'cept /me just a knows® thattt /me lovvves your website...hehehe...wherrre was it when /mes boys were small??? lol...
    Last edited by justame; 02-06-2003 at 12:15 AM.

  • #3
    Regular Coder
    Join Date
    Nov 2002
    Location
    Southern California
    Posts
    110
    Thanks
    0
    Thanked 0 Times in 0 Posts
    It actually doesn't change the positioning at all depending on platform or font size. This is because I dictate the width of the cell and use &nbsp; only once so IE doesn't see it as an empty cell.


    I have viewed the results on Mac's and PC's using IE 5 and NS 4.72 as well as mozilla.


    If it is poor coding practice I'll switch to spacer.gif's, but I just hate to use them...
    Everyone has the right to be stupid, some just abuse the privilege.

  • #4
    Regular Coder
    Join Date
    Jun 2002
    Posts
    676
    Thanks
    1
    Thanked 0 Times in 0 Posts
    cit...
    /me just a started® 'thinkin' just a bout® this sooo /me headed to good ol' google.com n' found these...

    http://www.sun.com/smrc/web/specs/graphic.html
    Using the dot.gif SPACER
    Use the dot.gif SPACER to create precise spacing in your html page.
    For more general spacing use & n b s p ; for horizontal spacing and <br> for vertical spacing.
    Like any image, try to limit usage in order to conserve the number of server calls--not all browsers download only one instance of an image.

    www.student.utc.sk/~matrix/abdesign2.shtml
    just a brings® up the point of ...what just a if® the viewer has 'images' turned off???

  • #5
    Regular Coder
    Join Date
    Jul 2002
    Location
    Raleigh, NC
    Posts
    484
    Thanks
    0
    Thanked 0 Times in 0 Posts
    If a user has images turned off they should not expect to see things normally. A transparent 1x1 pixel gif doesnt take that long to load regardless of how much you need to stretch it to space things. I rarely use & nbsp; because I hate to see code that has twenty of them just to indent a few pixels. With a spacer image it is always easier to control vertical alignment compared to & nbsp; tags. As with anything like this it is a matter of personal preference but I'm stickin with the spacer.gif.
    -WebMark Art
    Programming is 80% thinking and 20% spelling

  • #6
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    Use CSS, and do it correctly. Forget about browser hacks, this is the 21st century.

  • #7
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I agree - spacer gifs and tables-based presentation are *both* bad practise; CSS is the way.

  • #8
    Regular Coder
    Join Date
    Jun 2002
    Location
    Iowa / Notre Dame
    Posts
    538
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I would have to agree with brothercake and jkd: Css is the way to go. Try messing around with margins, and padding. If you are worried about your layout getting messed up in old browsers, atleast know this: while it may not look the exact way you want it to, it will still be functional. And plus, how many people using NS4.7 and below do you think don't realize that their browser messes pages up?
    My Site {Mike's Adventures}

    Yikes, forums are almost too much fun.

  • #9
    Regular Coder
    Join Date
    Nov 2002
    Location
    Southern California
    Posts
    110
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Originally posted by brothercake
    I agree - spacer gifs and tables-based presentation are *both* bad practise; CSS is the way.
    That may be the case, but our proprietary publishing system does not easily or smoothly allow for CSS based layouts. Given this, exact placement of items can be done in tables with just one &ampnbsp; in the cell....

    <tr><td width="219">&ampnbsp;</td></tr>



    Even our new publishing system that is being developed internally will not allow for CSS based layouts. Maybe I should talk to them about this and shake things up. Cool..more people to get pissed at me in the office.
    Everyone has the right to be stupid, some just abuse the privilege.

  • #10
    Regular Coder
    Join Date
    Nov 2002
    Location
    Southern California
    Posts
    110
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Originally posted by pardicity3
    I would have to agree with brothercake and jkd: Css is the way to go. Try messing around with margins, and padding. If you are worried about your layout getting messed up in old browsers, atleast know this: while it may not look the exact way you want it to, it will still be functional. And plus, how many people using NS4.7 and below do you think don't realize that their browser messes pages up?

    Since we are a family site and we cater to midwest families as well, our minimum requirements for the site are pretty low. For this business reason CSS is not going to be allowed. Take a look at our minimum requirements:


    PC Compatible
    Processor: Pentium 166 MHz MMX MMX
    Memory: 32 MB RAM
    Video: 800x600x16M
    Sound: 16Bit SB Compatible
    Modem: 33.6KBps
    OS: Windows 95
    Netscape: V.408
    Internet Explorer: V4.01
    AOL: V4.0


    Apple
    Processor: Power PC 132 MHz
    Memory: 32 MB RAM
    Video: 800x600x16M
    Sound: 16Bit SB Compatible
    Modem: 33.6KBps
    OS: V8.5
    Netscape: V4.08
    Internet Explorer: V4.01
    AOL: V4.0


    Plugins
    Acrobat Reader V4.0
    Shockwave V7.0-8.0
    Flash V4.0-5.0
    Real Player V7.0/G2
    QuickTime V4.0


    Pretty outdated I know, but we do get a fair amount of traffic from Netscape 4.* users.
    Everyone has the right to be stupid, some just abuse the privilege.

  • #11
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    With respect, if your major user base is people on low-spec machines, that's *more* of a reason to use CSS, not less.

    Despite what is commonly thought, transparent spacer gifs do take up rendering resources (albeit not very much) - a layout which is heavily dependent on them (eg, dozens on each page) may be a problem for people with very low-spec video cards.

    Netscape 4 users are not a problem if you plan it carefully - a well made [x]html document should be perfectly useable with no CSS at all; design youre fundamental layout without styling, then use the @import or @media method to block ns4 from reading any CSS at all, and go from there.

    If you really insist on rick content for netscape 4, you can use a 'halfway house' technique such as http://www.evolt.org/article/Assigni...732/index.html


    <aside>

    Don't take my insistence as evidence of puritanicalism - justame has a very good point that, at least, spacer gifs give reliable results. But I had an XHTML epiphany quite recently, and despite what I was expecting, I've found that coding to strict XHTML/CSS without tables or spacers is actually *easier* than the traditional, hacky methods we're used to.

    </aside>
    Last edited by brothercake; 02-06-2003 at 07:02 PM.

  • #12
    New Coder
    Join Date
    Jan 2003
    Location
    Auckland New Zealand
    Posts
    25
    Thanks
    0
    Thanked 0 Times in 0 Posts
    back to the original question....

    I use them for three key reasons...

    1) I can postition a image in a cell (set to align="left") to a pixel perfect spot. By having a spacer gif first, then the image to it's right, I can "nudge" the main image pixel by pixel to the exact place I want it.

    2) I can set and hold the exact height or width of any cell with a spacer gif

    3) I attach a copy of the key words (from the meta tags to 1 x 1 Spacer gifs at the bottom of the page. Search engines read alt tags. this helps with searcgh engine optimisation.

    having said that, I use & N B S P ; to ensure a cell has content, I really try to avoid the situation where I need to fill an otherwise empty cell by planing my layout carefully..

    I am very interested in the overall outcome of this discussion.


    Tonz
    The Cybertooth Tiger is here

  • #13
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The overall outcome? - here's IMO:

    The notion of pixel perfect accuracy in HTML has got to go; webpages are not online DTP, they are semantic logical entities, of which their visual output is merely one possible example. As little as possible of your design scheme should be hard-coded into your HTML - preferably none at all.

    Remember, anyone can reformat any page they're viewing with their own style sheet, making it look and behave any way they want.

    But ... well it's obvious what the anti-argument to that is - it's about style and design; you want your website to look and feel the way you want it; your client wants their webpage to look like the brochure; exactly like the brochure.

    Well fine - that's what CSS is for


  • #14
    Regular Coder
    Join Date
    Nov 2002
    Posts
    672
    Thanks
    1
    Thanked 1 Time in 1 Post
    Spacer tag? How long has that been around? Most of all the tags I know in HTML 4.0 I got from a adendum file in the Arachne 1.70 package (I got lost at w3.org again as usual). Is this a generic tag or is it actually standard?

  • #15
    New to the CF scene
    Join Date
    Feb 2003
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    I'm new and I'm confused...

    Are you saying that CSS works in v4 Browsers??

    I made a page using divs and it didn't work in v4.

    divs and CSS seem to always be talked about together - so it's confusing.


    Thanks, Margaret


  •  
    Page 1 of 2 12 LastLast

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •