homepage Welcome to WebmasterWorld Guest from 54.167.11.16
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / Site Graphics and Multimedia Design
Forum Library, Charter, Moderators: not2easy

Site Graphics and Multimedia Design Forum

    
No width, height or border on images
Lorel




msg:4224641
 8:17 pm on Oct 31, 2010 (gmt 0)

I was checking out competitor's sites and noticed that several of them link to images without width, height or border. Just the image link and an alt tag. Not even a css reference.

Has there been a new development in how you can display images? The last time I left off the Width/height/border the image came out with borders on IE and doesn't display at all in other browsers.

 

Major_Payne




msg:4224660
 9:25 pm on Oct 31, 2010 (gmt 0)

No change. They just are lousy coders or very lazy. ALWAYS tell browsers what you want it to do by coding everything needed for the presentation of your page(s).

I use this sometimes unless I put it in the CSS:


<img style="width: XXpx; height: YYpx; border: 0;" src="Path to image" alt="Text Description">

Lorel




msg:4224681
 10:32 pm on Oct 31, 2010 (gmt 0)

Thanks Major, I do the same.

I thought maybe I've had my head stuck in SEO threads too long and missed something important.

rocknbil




msg:4224927
 3:49 pm on Nov 1, 2010 (gmt 0)

They just are lousy coders or very lazy.


Not necessarily, many CMS's and shopping carts make it almost impossible to add width and height attributes without hacking the code. And if you do, the next security upgrade will overwrite it.

thecoalman




msg:4226657
 4:29 pm on Nov 4, 2010 (gmt 0)

And if you do, the next security upgrade will overwrite it.


I have a heavily modified phpBB forum, I manually apply changes using Winmerge.

idbit




msg:4263705
 5:22 pm on Feb 7, 2011 (gmt 0)

Where do you guys specify your image sizes? In css or html? I thought it was preferred to do this in css, so that's what I've done for my presentation related images. But for content related images, I have some groups where they are all different sizes. I didn't want to bog down my css file with dimensions for each and every image, so I left them out for many. With content related images, is it best to put the dimensions in the html markup?

rocknbil




msg:4263715
 5:32 pm on Feb 7, 2011 (gmt 0)

The idea is that the inline w/h attributes will provide placeholders for the browser to render the layout *before* the images fully load. That way you don't get the bouncy loading layout, elements floating around until it fully loads. So while it's recommended to use w/h inline, a lot of sites don't.

idbit




msg:4263721
 5:43 pm on Feb 7, 2011 (gmt 0)

Okay, so I'll fix those content images - put the w/h inline for them. But I'm wondering now about all the layout related images I've set w/h for in css. Should I expect the same bouncing around with them? I'm pretty sure the css gets loaded first.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Site Graphics and Multimedia Design
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved