WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Site Design > Graphics & Design Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

Graphics & Design Discussion Forum Post your graphics design questions/comments/ideas in here. Ask questions, post tutorials, discuss trends and best practices. Sub-forum for website accessibility and usability.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-05-2006, 11:51 PM
Orion's Avatar
Orion Orion is offline
WebProWorld Veteran
 

Join Date: Sep 2003
Location: Halton Hills, ON
Posts: 570
Orion RepRank 2
Default Firefox bug with content display

Hey all,

Maybe it's too late at night or something, lol. Got a bug I can't figure out the solution to, though I'm sure it's something simple.

http://www.welshminerslamps.com/new/...fullsize.shtml

The above page displays simply wonderfully in IE, however in FF you'll notice at reduced resolutions 800x600 etc. the content (class .description) overlaps the next product.

I've set up each product in a <div class="product"> with style="height: Xpx;" where X = a bit more than the height of the img. Product class has display: block; which is wonderful in IE.

The descriptions are in a separate div so that I can line them up 240px in to allow room for the product images. (we're going to be redoing all the product images).

Style sheet is here: http://www.welshminerslamps.com/new/includes/styles.css

I think I'm missing something here, probably starring me in the face... Anyone have some insight??

Thanks in advance!
__________________
Ron Boyd
Web design & site management :: Ron's blog
Reply With Quote
  #2 (permalink)  
Old 06-06-2006, 03:02 AM
Easywebdev's Avatar
Easywebdev Easywebdev is offline
WebProWorld Veteran
 

Join Date: Apr 2004
Location: Donegal, Ireland.
Posts: 322
Easywebdev RepRank 1
Default

By specifying the height of the div you are stopping it from expanding when it needs to. Do away with the height in class .product and add
Code:
.product img {
margin: 10px;
}
To give you a little bit of a margin above and below your images for the same effect but the div can now expand as needed.

Nice site btw, I like the markup too, nice and clean don't know what that containing table is doing in there though :)
Reply With Quote
  #3 (permalink)  
Old 06-06-2006, 02:55 PM
Orion's Avatar
Orion Orion is offline
WebProWorld Veteran
 

Join Date: Sep 2003
Location: Halton Hills, ON
Posts: 570
Orion RepRank 2
Default

Tried it, it doesn't work...

http://welshminerslamps.com/miners_lamps_medsize.shtml

there's a page with the height removed. the height is the only way to allow the display: block; to work correctly and the products to not run over each other... again FF only, has this issue. Don't get me wrong I prefer FF to IE.

the table was just a quick way to allow for duplicate backgrounds and solve the issue of the left background to allow it to tile all the way to the bottom of the page. I haven't figured that one out as yet either lol. Never enough time eh!

Thank you for the comments, I try to make the code clean and as little as possible.
__________________
Ron Boyd
Web design & site management :: Ron's blog
Reply With Quote
  #4 (permalink)  
Old 06-06-2006, 05:52 PM
rms7design rms7design is offline
WebProWorld Member
 

Join Date: Mar 2006
Posts: 38
rms7design RepRank 0
Default an idea

just my 2 cents... why don't you define a minimu width for the website instead of letting it being reduced to whatever the size of the window is? If I re-size the window (width) to a minimum, the whole content part move to the right.... specify a minimum width and this should not happen again... Does that make sense??
__________________
RMS7Design
Huntersville web design
Huntersville Real Estate
Reply With Quote
  #5 (permalink)  
Old 06-06-2006, 06:06 PM
carol's Avatar
carol carol is offline
WebProWorld Member
 

Join Date: Jul 2003
Location: New Jersey, USA
Posts: 79
carol RepRank 0
Default

I'm certainly not a CSS expert, but... you're floating the images left, and if you don't have enough text to "clear" the bottom of the floated image, the next image will move up next to the prior float. (Did that make sense?) So you need to clear the float in between the products.

Like, .clearthem {clear:both}
and then maybe
<div class="clearthem"></div>
<div class="description">

Or am I missing the boat on what you are asking?
carol
Reply With Quote
  #6 (permalink)  
Old 06-06-2006, 09:21 PM
Orion's Avatar
Orion Orion is offline
WebProWorld Veteran
 

Join Date: Sep 2003
Location: Halton Hills, ON
Posts: 570
Orion RepRank 2
Default

rms7design... how do you define a minimum width for the site?

do you mean go static? cause that would lose the accessibility for the site.

carol... I tried clear: both; on the .product style class.. didn't work. or do you propose to create a new div and class between the img and the description?
__________________
Ron Boyd
Web design & site management :: Ron's blog
Reply With Quote
  #7 (permalink)  
Old 06-06-2006, 09:48 PM
weegillis weegillis is offline
WebProWorld Pro
 

Join Date: Oct 2003
Location: Alberta, Canada
Posts: 222
weegillis RepRank 1
Default

As Carol mentioned, you will need to clear your floats for each instance.

This may seem like a bit more markup than you want, but it will definitely help your overlap problem:
Code:
<style type="text/css">
div.clear{clear:both;height:1px;line-height:1px;margin:0;visibility:hidden}
* html div.clear{padding:0;display:none}
</style>

<div>
	<div class="product">
		...
	</div>
	<div class="clear"></div>
</div>
There are some really good clearing methods out there. This one works quite well in this type of situation.

As for height, this problem will go away once you clear the float. I agree with Easywebdev. You don't need to specify the height.

You may also need to specify a width for your float to keep it from breaking in IE MAC. width:auto 'might' do the trick, but don't quote me on this.

A couple of technical notes:

1. Your HEADING hierarchy is not well formed, there is no H1 before the H2.

2. Your FORMS lack a LEGEND and LABELs on the input controls.

3. There should be a text link corresponding with the IMG A, for added clarity. (Okay, I know this sounds corny, but it is just good practice.)

4. FF and NN do not display tool-tip for ALT text. Include an equivalent TITLE attribute to activate the tool-tip in those browsers. In the case of an anchor wrapped image, put the TITLE on the anchor, and the ALT on the image. If not a link, put both on the image.

5. I would recommend setting a base font size in the body to 100%, and then set the reduced size in the wrapper. For instance:
Code:
font:normal 100% Verdana, Arial, Helvetica, sans-serif;
6. Always specify background color BEFORE the image. You could reduce the code to shorthand with good results. For instance:
Code:
color:#1F0D15;
background:fixed #BB9564 url(/new/images/bg_right.jpg) no-repeat 170px 100%;
7. overflow:visible; is the default. This rule is not required.

8. It is always a good practice to include a system language and a human language in the head. For instance:
Code:
<html lang="en" xml:lang="en" ...>
AND
<meta http-equiv="Content-Language" content="en-CA" />
Browsers and SEs will both thank you.

9. I don't have the expertise to go into why, except that it is recommended elsewhere to encode with UTF-8.

10. To pass TIDY, you might need to revamp your URLs to include &amp;. This will rid the two issues: malformed URL, and UNKNOWN entity.

11. Lastly, an empty summary="" on the TABLE will satisfy that requirement. I would move the CSS to the stylesheet, and drop the cellspacing attribute. The padding:0px covers that. For good measure, include TD in the this rule.
__________________
Volunteer for something in your community today!
Reply With Quote
  #8 (permalink)  
Old 06-06-2006, 10:16 PM
Orion's Avatar
Orion Orion is offline
WebProWorld Veteran
 

Join Date: Sep 2003
Location: Halton Hills, ON
Posts: 570
Orion RepRank 2
Default

hey weegillis...

I'll give that a try in a couple mins here.. thanks a bunch...

on the other items, I'm still getting to many of them, as the content is copy pasted from the existing site http://www.welshminerslamps.com which is still live atm.

1. The HEADING hierarchy is well formed as the main heading is in H1 the secondary heading h2 etc.. actually specifying them in the order they appear will mess up the se's placing higher emphasis on the secondary title not the main site title.

2.& 12. all the forms and tables were copy and pasted, haven't tweeked everything as yet, but thanks for the input on it for sure. I haven't used legends much but always use labels, great for accessibilty too as you can click on the label to select a box also.

3. all the img links are being swapped out anyway right now they (from original site) link to a larger version (where avail) of the original image, they will link to a popup window with a larger version on an actual page.

4. yes need title but not necessarily for what you say. ALT is alternative to img, for text and speech browsers, it should describe the img i.e alt="company logo". TITLE gives a title and in IE overrides alt fr the tooltip, it might say title="click here to buy brass miners lamps for sale" providing information and direction to the site visitor.

5. nice one on the base font I'll play with that, I've always gone to px size as 100% displays different cross browser / platform. But I will check it out see how it looks as your way is the better way to go.

6. didn't know about the background-color: before img. much of the CSS about 60% I let dreamweaver create, the code is a mix of hand / and editor created though.

8. on the language part. do you have any documentation on it's use? It's very very old code and considered bad form wherever I've researched before. here's my meta-tag research here, if I'm wrong I'd love to updated it: http://www.orionsweb.net/metatags.shtml

Fantastic information, thanks, I'll follow up here let you know how the float clearing goes.... Hope to hear back on the other items there.

Thanks!
__________________
Ron Boyd
Web design & site management :: Ron's blog
Reply With Quote
  #9 (permalink)  
Old 06-06-2006, 10:16 PM
weegillis weegillis is offline
WebProWorld Pro
 

Join Date: Oct 2003
Location: Alberta, Canada
Posts: 222
weegillis RepRank 1
Default Accesible forms

Here is the AAA code for your FORMs:
Code:
<style type="text/css">
div.description fieldset{border:none}
div.description legend{display:none}
</style>

<fieldset>
	<legend>Select a quantity from the list</legend>
	<label for="item4120"><select name="item-4120|..." id="item4120">
		<optgroup title="Quantity" label="#">
			<option value="1" selected="selected">1</option>
			<option value="2">2</option>
			<option value="3">3</option>
			<option value="4">4</option>
		</optgroup>
	</select></label>
	<input type="submit" name="add_to_cart" value="Add to Cart" />
</fieldset>
__________________
Volunteer for something in your community today!
Reply With Quote
  #10 (permalink)  
Old 06-06-2006, 10:21 PM
carol's Avatar
carol carol is offline
WebProWorld Member
 

Join Date: Jul 2003
Location: New Jersey, USA
Posts: 79
carol RepRank 0
Default

yes - new class and div...

all the other stuff is great advice, but get this part working first. It's essential regardless of browser. Clear the float! (Reference: Stylin' with CSS - Charles Wyke-Smith, page 119 - 121)
Reply With Quote
  #11 (permalink)  
Old 06-06-2006, 10:37 PM
Orion's Avatar
Orion Orion is offline
WebProWorld Veteran
 

Join Date: Sep 2003
Location: Halton Hills, ON
Posts: 570
Orion RepRank 2
Default

hehe didn't say I didn't know how to put in legends, but always appreciated!

The cart will be the final part cause it's a bit of a pain. have to play with it see what breaks it and what still works.
__________________
Ron Boyd
Web design & site management :: Ron's blog
Reply With Quote
  #12 (permalink)  
Old 06-06-2006, 11:20 PM
Orion's Avatar
Orion Orion is offline
WebProWorld Veteran
 

Join Date: Sep 2003
Location: Halton Hills, ON
Posts: 570
Orion RepRank 2
Default

weegillis...

didn't work... clear:both; kicks the second product below the nav.

... same as just placing clear:both in the .product class
__________________
Ron Boyd
Web design & site management :: Ron's blog
Reply With Quote
  #13 (permalink)  
Old 06-06-2006, 11:41 PM
weegillis weegillis is offline
WebProWorld Pro
 

Join Date: Oct 2003
Location: Alberta, Canada
Posts: 222
weegillis RepRank 1
Default Natural (audience) Language versus Text Processing language

From W3C:
Note that UTF-8 can be used for all languages and is the recommended charset on the Internet. Support for it is rapidly increasing.

More from W3C:
Authoring Techniques for XHTML & HTML Internationalization: Specifying the language of content 1.0
__________________
Volunteer for something in your community today!
Reply With Quote
  #14 (permalink)  
Old 06-06-2006, 11:44 PM
weegillis weegillis is offline
WebProWorld Pro
 

Join Date: Oct 2003
Location: Alberta, Canada
Posts: 222
weegillis RepRank 1
Default Floats and CLEAR

Ron,

Are there other open floats, besides these?

Did you 'double wrap?'
__________________
Volunteer for something in your community today!
Reply With Quote
  #15 (permalink)  
Old 06-06-2006, 11:49 PM
Orion's Avatar
Orion Orion is offline
WebProWorld Veteran
 

Join Date: Sep 2003
Location: Halton Hills, ON
Posts: 570
Orion RepRank 2
Default

I have to update my template to utf-8 I was refering to the documentation regarding reviving the depricated meta-language tag.

only other float:left; is #header h3 shouldn't affect the rest I would think?
__________________
Ron Boyd
Web design & site management :: Ron's blog
Reply With Quote
  #16 (permalink)  
Old 06-06-2006, 11:53 PM
weegillis weegillis is offline
WebProWorld Pro
 

Join Date: Oct 2003
Location: Alberta, Canada
Posts: 222
weegillis RepRank 1
Default Might be an idea to clear the header float

Probably wouldn't hurt to make an effort to clear the header float, too. All open floats are 'bad' and can lead to all manner of unexplained behaviors. At least that's what I've come to believe. (Not that floats themselves are bad...)

To clarify above, have you wrapped the product div in another div, with the float at the close of the outer wrap?
__________________
Volunteer for something in your community today!
Reply With Quote
  #17 (permalink)  
Old 06-06-2006, 11:58 PM
weegillis weegillis is offline
WebProWorld Pro
 

Join Date: Oct 2003
Location: Alberta, Canada
Posts: 222
weegillis RepRank 1
Default Deprecated Content-:Language metadata

If its deprecated, that's news to me. The document I linked to is last updated in 2005, which is NEW by w3 standards.

It makes perfect sense to tell user agents and SEs what the language of your intended audience is (metadata) and what the text processing language is (lang and xml:lang).

Language shifts are done with lang, such as span lang="fr-CA", and so.
__________________
Volunteer for something in your community today!
Reply With Quote
  #18 (permalink)  
Old 06-07-2006, 01:00 AM
Orion's Avatar
Orion Orion is offline
WebProWorld Veteran
 

Join Date: Sep 2003
Location: Halton Hills, ON
Posts: 570
Orion RepRank 2
Default

cool on the content-language info,thanks! So much to keep up on eh! Here's a couple more tid-bits that many leave out these (all three I guess now) should all match.

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> the charset number in this case iso-8859-1 can actually refer to the specific language in question.

http://www.iana.org/assignments/character-sets there's a list of all the different charsets, these should match the xml lang definition also.

back to the floats...

Quote:
To clarify above, have you wrapped the product div in another div, with the float at the close of the outer wrap?
huh? ..

the .product div is the wrapper then I have in that wrapper I have img and description. between each .product div I placed a .clear div.

does that sound about right? or did I totally miss something there.
__________________
Ron Boyd
Web design & site management :: Ron's blog
Reply With Quote
  #19 (permalink)  
Old 06-07-2006, 01:32 AM
weegillis weegillis is offline
WebProWorld Pro
 

Join Date: Oct 2003
Location: Alberta, Canada
Posts: 222
weegillis RepRank 1
Default

The clearing div cannot be inside the product div. It could be at the start of each, as opposed to the close. That way the float will be cleared before drawing the product div. The fact that it is in the outer layer should make it apply the same, either way.
__________________
Volunteer for something in your community today!
Reply With Quote
  #20 (permalink)  
Old 06-07-2006, 01:39 AM