![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
| news:Xns94EBB9EE42392slimantiCorp (AT) 38 (DOT) 144.126.106: || hi again all, |
|
thanks in advance for any pointers. oh, and feel free to pull apart the rest of the site for bad practice, i'm open to comments to improve the code. cheers -- slim |

#3
| |||||||||
| |||||||||
|
|
feel free to pull apart the rest of the site for bad practice, i'm open to comments to improve the code. XHTML 1.0 Transitional |
|
div id="header"><h1 |
|
div id="navigation" |
|
p span class="current">latest</span |
|
input type="text" name="criteria" style="width:6em;" |
|
|
|
div id="contentwrap" div id="rightcol" h2>latest tees</h2 div class="teeblock_outercontainer" |
|
div class="spacer"> </div |
|
img src='./images/tees/thumbs/t_shitwizard.jpg' class='tee_thumbnail' alt='you are the shitwizard!'/ |
#4
| |||
| |||
|
|
slim <slim (AT) antiCorp (DOT) invalid> wrote: feel free to pull apart the rest of the site for bad practice, i'm open to comments to improve the code. XHTML 1.0 Transitional Using XHTML is silly, Transitional is for legacy documents, newly authored documents should use Strict. |
#5
| |||||||||
| |||||||||
|
|
| news:nsdfa0dnm55j5fgskottsqbpnpcrn1b9c0 (AT) news (DOT) spartanicus.utvinternet.i | e: || slim <slim (AT) antiCorp (DOT) invalid> wrote: feel free to pull apart the rest of the site for bad practice, i'm open to comments to improve the code. XHTML 1.0 Transitional Using XHTML is silly, Transitional is for legacy documents, newly authored documents should use Strict. |
|
div id="header"><h1 Why the div wrapper? H1 is a block level element, styles you have attached to the wrapper div can be added to the H1. |
|
div id="navigation" That's a list. |
|
p span class="current">latest</span That's not a paragraph. |
|
input type="text" name="criteria" style="width:6em;" Move the inline css to the external stylesheet. |
|
Margins should be specified via css. |
|
div id="contentwrap" div id="rightcol" h2>latest tees</h2 div class="teeblock_outercontainer" Div/span soup. |
|
div class="spacer"> </div Again, margins should be specified with css. |
|
img src='./images/tees/thumbs/t_shitwizard.jpg' class='tee_thumbnail' alt='you are the shitwizard!'/ The images should not be resized by the browser, and definitely not by specifying the desired dimensions in css. |
#6
| ||||||||
| ||||||||
|
|
Using XHTML is silly, Transitional is for legacy documents, newly authored documents should use Strict. i tried to change this, checked it out in 3 browsers and found a total mess in ie6 & opera7.1. |
|
Why the div wrapper? H1 is a block level element, styles you have attached to the wrapper div can be added to the H1. when i take away the containing div, the header does not accept all the style attributes i give it and does not display the same. for example, in firefox, there is a gap between the bottom of header.jpg and the bottom border. is there some part of <h> tags that overrules styles i apply? |
|
That's a list. good point. that's kind of done, except i'm still using a div to frame it, or <ul> won't take the style attributes i need to keep the design the same. |
|
Margins should be specified via css. this was used as part of a fix i found whilst browsing: i want to display the dotted boxes containing each t-shirt in a row until they need to break for a new line, this trick was recommended to fix the fact that they float:left and so occupy no space. is there a better way to do this? i am currently using a slightly different version of the same workaround, i'd like to be able to achieve the boxes displaying as i describe legitimately if possible. |
|
Div/span soup. too many? the contentwrap div was used to fix a bug (which has now reappeared) where the right column was appearing after the left column vertically. |
|
the rightcol div is then defined to house the various parts 10em across so as to meet the leftcol - is this not necessary then? |
|
and finally, the divs used to construct the t-shirt dotted boxes were the only way i could see to achieve the look i wanted without using a table - would you be able to suggest a better way of achieving that style with cleaner code? i'm new(ish) to this and willing to learn, but i'm kind of putting things together as i pick it up, so it's not always the best approach. div class="spacer"> </div Again, margins should be specified with css. see my response above. i'd love to know how to eliminate this if possible. |
|
The images should not be resized by the browser, and definitely not by specifying the desired dimensions in css. really? i thought i would be doing the user a favour by defining a fixed aspect ratio in ems so the images would resize with the user's font. could you explain why it is bad practice? |
#7
| ||||||||||
| ||||||||||
|
|
| news:vunga0lvfnfh46oisb6hnfhbaoetmdm02o (AT) news (DOT) spartanicus.utvinternet.i | e: || Switching to Strict results in standard compliant rendering, it exposes faults/omissions in your html/css that are masked by Quirk mode rendering. |
|
A browser applies default style values for any element, it's up to you to change them if these result in undesired rendering. |
|
Again there is no need, <ul> is also a block level element, styles currently attached to the div can be added to the <ul>. |
|
this was used as part of a fix i found whilst browsing: i want to display the dotted boxes containing each t-shirt in a row until they need to break for a new line, this trick was recommended to fix the fact that they float:left and so occupy no space. is there a better way to do this? i am currently using a slightly different version of the same workaround, i'd like to be able to achieve the boxes displaying as i describe legitimately if possible. Make a minimized test case and I'll have a look. |
|
Adding spurious markup is not the way to fix problems, tackle it at the source by learning more about how css works. Ask here if you get stuck, one problem per post and a minimized test case greatly increases your chances of someone helping out. |
|
At most you need 3 generic block level wrappers (<div>'s) for a site like this, one for the header/navbar, one for the left col and one for the content next to the left col. But you've got far more div/span wrappers than that. |
|
Browsers do a poor job at resizing images |

|
Images don't need to resize with a user's font setting |
|
Images larger than needed take longer to download |
|
Images should remain the same size when a page is viewed sans css |
is there a better way to tackle the problem of
#8
| |||
| |||
|
|
Make a minimized test case and I'll have a look. i have made a page here: http://awash.demon.co.uk/vd_test.php |
![]() |
| Thread Tools | |
| Display Modes | |
| |