Jump to content

brian1010011010

Members
  • Posts

    7
  • Joined

  • Last visited

brian1010011010's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. davej - I think it was because I was using height and width both as percentages using img width. The problem stemmed from the fact that resizing the window would resize my divs, which would make the text change the height of the div and thus effect the Y-dimension of the image. (overflow:hidden would fix that, but at the cost of losing all the text that kerned below the div). I'll make an example and post it later. As of right now, it looks like img style inline works just as well and passes validation. (Thanks, Ingolme!) dsonesuk - Interesting idea, and might work if I substitute the aspect ratio of the image for it's strict width. The aspect ratio would be a cleaner estimate of how many pixels it would occupy at a given percent width. Might make these guys with the long banners think twice, and encourage them to submit logos that are closer to 1:1 to optimize their footprint. Thanks, everyone!
  2. Well, yes, except I don't use 50% on every tag. I actually approximate the square area of each of my advertiser's logos so that someone can't make a logo that nets them much more space by making it taller. They're aware of the policy. As a result, most of the images on my sponsor page have a tag that's tailored to the image. I could probably make a js that automatically scaled each image for square area total, but it defies my need for elegance and low overhead. The question remains: If every browser supports scaling by width="n%", why does the validator trip?
  3. I know you're normally a wealth of information, Foxy, but I'm not sure you understood my question. I'll elaborate:I use CSS to define my columnar layout using width="n%".I resize the window and everything scales nice. Cool enough.Now, I add an image and want it to occupy 50% of my content column's width... I have tried in the past to define the img element with class, etc. but the result was always the same. I would get an image that would look right at only one specific page width because defining it's dimensions in CSS would result in an image whose proportions were dependent on the kerning of the text above and/or below it changing the length of the column.To work around this, I started defining all my image sizes as so: <img src="./image.jpg" width="50%">Resulting in an image that scales properly in both axes and an overall columnar layout that has good cross-browser consistency and looks the same at every screen size (until the div elements are shrunken far enough that no text is visible, anyway).My question is: Why does this result in validation errors when it appears to be a perfectly legitimate cross-platform solution? More importantly, can someone show me an example of where this method might result in anything janky and weird so that I might avoid the pitfall?As it is right now, I'm baffled as to why the w3c validator doesn't recognize "%" as a legitimate width attribute descriptor.
  4. I hope someone else gets you an answer that more directly answers your question, but I feel I'd be remiss if I didn't mention this bit of wisdom from User Interfaces 101..."If your drop-down needs a scrollbar, you should probably use a listbox instead."Imagine trying to navigate a two-column drop-down on a touch screen and you might decide to change your strategy.
  5. Databases require a database engine to be running on a server. The interface to that engine can be accessed through HTML but browsers do not (usually) have a built-in database engine.You'll need an SQL server and php (or similar) script to make the web server "talk" to it.Edit: This is a gross oversimplification, but it sounds like you're trying to literally open a database file with a browser, skipping the SQL server entirely. If that's not the case, then I apologize.
  6. I tried to use the w3c code validator and it was quite helpful in some respects. I found a few nested div elements that were unnecessary and eliminated some pointless code.However, I also got 64 errors that told me that my image width= tags should only contain non-negative integers.I use a few 3-column liquid layouts and define ALL my elements by percentage width. Resultantly, my sites look identical on every device.Why would I sacrifice the flexibility of percentage scaling?Why does the code validator spring this as an error when it works just fine on every browser I've tried?The one and only downside is that some of my elements move slightly the first time the page is loaded. I know that this is because I only define the width of elements, and I'm OK with that. I code the sites lightly enough that they load quite fast and most people, even on mobile, don't even see the flash of unformatted space.I'm not just complaining here. If there's a valid way to accomplish what I've been doing, I want to know, but I don't actually see a problem with the way it works now.Anyone know why it's wrong to define a liquid layout using width percentages?
×
×
  • Create New...