Reply
Random spaces in my template
Old 08-04-2007, 01:39 AM Random spaces in my template
Novice Talker

Posts: 7
take a look at http://niosis.awardspace.com/polend.html .

There are some random spaces in between my images and I can't seem to get rid of them.

And in IE, it looks nothing like what I want....

The reason it's all in a container div is to get the "spacermatrix" images to go where I want them to... if you have another way of doing that, please tell me.

Also if you have a totally different and more effecient way of coding this, please tell me that too. I am new and I highly appreciate anyone who can point me in the right direction early on.

Thanks in advance.
Niosis is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Old 08-04-2007, 08:54 AM Re: Random spaces in my template
bas
Super Talker

Posts: 107
Name: Bas
Location: Belgium
When you design your website, you should first start with a logical mark up structure, for example:


Code:
<h1>Main title</h1>
<h2>slogan</h2>
<ul id=”menu”>
<li><a href=”” title=””>menu-item 1</a></li>
<li><a href=”” title=””>menu-item 2</a></li>
</ul>
<h3>Page-title</h3>
<p>Paragraph one</p>
…
If you use all elements on the correct way, its good searchable by search engines, text readers, … (SEO, accessibility)
Than you can use CSS to give your page a design (if necessary by adding some ‘div’s and or ‘span’s to your mark up).


“design”-images should be used with CSS (background-image etc) and not been included in the page as you have now.
For example, a good header-code could be:
Code:
<div id=”header”>
<h1><span>Site title</span></h1>
<h2>slogan</h2>
</div>
Than you can give your #header’s background-image with CSS, your logo can be added as background image to your h1-ellement, the original content of span in h1 could be hidden with “display:none”, …

Last edited by bas : 08-04-2007 at 08:55 AM.
bas is offline
Reply With Quote
View Public Profile Visit bas's homepage!
 
Old 08-04-2007, 10:56 AM Re: Random spaces in my template
LadynRed's Avatar
Super Moderator

Posts: 6,572
Location: Tennessee
Couple of things...

This is incorrect:
Quote:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" ></meta>
There is no </meta> in HTML. The proper way to close a meta tag (or other tag that doesn't have it's own closing tag) is simply a space />.

Why are you floating EVERYTHING ??? In addition, you are not using floats properly. If you float an element, it MUST have a defined width. I suggest you do some research on the proper use of floats and making a table-less layout.

http://css-discuss.incutio.com/?page=CssLayouts

From the looks of it, you have sliced up your graphics as if you were still using a table for layout, then created a slew of divs to emulate a table. This is simply the wrong approach. Using divs, CSS and the normal document flow, you can create your layout with just a few graphics as background and far, far fewer divs.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!
"Using or working with IE is like having to wear a 1970's polyester suit with pantyhose and a girdle, to work everyday"
Carolina Corvette Club
LadynRed is offline
Reply With Quote
View Public Profile
 
Old 08-04-2007, 03:38 PM Re: Random spaces in my template
Novice Talker

Posts: 7
Quote:
Originally Posted by LadynRed View Post
There is no </meta> in HTML. The proper way to close a meta tag (or other tag that doesn't have it's own closing tag) is simply a space />.
But... whenever I tried to validate it always said that doing what you said to do was incorrect even though I've heard what you're saying before... why is that?
Niosis is offline
Reply With Quote
View Public Profile
 
Old 08-04-2007, 03:45 PM Re: Random spaces in my template
JamieLewis's Avatar
Pretty Much a Big Deal...

Latest Blog Post:
Gooie
Posts: 386
Name: Jamie Lewis
Location: UK
<meta> should be placed inside the <head> section. That is probably why it isn't validating.
JamieLewis is offline
Reply With Quote
View Public Profile Visit JamieLewis's homepage!
 
Old 08-04-2007, 04:19 PM Re: Random spaces in my template
Novice Talker

Posts: 7
Thanks and fixed.

Now..

I realize I am bad at coding CSS, but I couldn't find any guides that helped me with getting my website from image to Good, CSS coded layout. Does anyone know of something that can help me? I've been watching lynda.com guides and looking all over the net but couldn't find anything.
Niosis is offline
Reply With Quote
View Public Profile
 
Old 08-05-2007, 12:11 PM Re: Random spaces in my template
LadynRed's Avatar
Super Moderator

Posts: 6,572
Location: Tennessee
You must not be looking very hard -- or you're looking for the wrong thing. There are TONS of resources on the web to help you learn how to use CSS for layout. The one I gave you is one of them.

You might try looking at layouts on CSS Zen Garden - csszengarden.com
Other places:
http://www.cameronmoll.com/archives/001211.html
http://www.glish.com/css/
http://www.thenoodleincident.com/tut...son/boxes.html
http://www.positioniseverything.net/index.php
http://www.strictlycss.com/articles/...ayout-you-need
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!
"Using or working with IE is like having to wear a 1970's polyester suit with pantyhose and a girdle, to work everyday"
Carolina Corvette Club
LadynRed is offline
Reply With Quote
View Public Profile
 
Old 08-09-2007, 11:37 AM Re: Random spaces in my template
Experienced Talker

Posts: 43
Name: Jan Jelinek
This fish smells to me like padding/margin values not set/set wrong...
__________________
Weapon of mass optimization
Jan Jelinek is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Random spaces in my template
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.14465 seconds with 12 queries