css layouts, web standards
Moderator: General Moderators
-
d3ad1ysp0rk
- Forum Donator
- Posts: 1661
- Joined: Mon Oct 20, 2003 8:31 pm
- Location: Maine, USA
You use two DIVs and set one of them to float to the right, both with 50% width.
Having the odd table here and there in a CSS/XHTML website doesn't do any harm though.. and in most cases makes life a lot easier. Personally I always tend to use one or two tables in my website layouts for the more complicated structures.
Having the odd table here and there in a CSS/XHTML website doesn't do any harm though.. and in most cases makes life a lot easier. Personally I always tend to use one or two tables in my website layouts for the more complicated structures.
Sometimes tables are necessary to assist XHTML+CSS layouts (although they're not needed as much as people seem to believe they are). Namely it's because of the excessively poor CSS support in a particular market-leading web browser (no names, Internet Explorer).
And Gen-ik, you can make any tag do anything you want, if you know what you're doing with it. Looking at my site ( http://www.skyzyx.com ), the "Skyzyx.com" banner along the top is an <h1>. Apply a background-image, and a bit of CSS, and it looks like a normal image. Voila!
If you want to learn how to do anything with XHTML+CSS, check out my web resources section. You might learn something.
And Gen-ik, you can make any tag do anything you want, if you know what you're doing with it. Looking at my site ( http://www.skyzyx.com ), the "Skyzyx.com" banner along the top is an <h1>. Apply a background-image, and a bit of CSS, and it looks like a normal image. Voila!
If you want to learn how to do anything with XHTML+CSS, check out my web resources section. You might learn something.
Tables should only be used for what they were intended - tabular display. That's the whole point of changing to semantic XHTML/CSS-based layouts. You can make DIVs do pretty much anything with a few lines of CSS, if you're willing to learn how.
http://www.alistapart.com/ is a good place to do that learning.
http://www.alistapart.com/ is a good place to do that learning.
Yes thank-you, I know how to use CSS.Skyzyx wrote:And Gen-ik, you can make any tag do anything you want, if you know what you're doing with it. Looking at my site ( http://www.skyzyx.com ), the "Skyzyx.com" banner along the top is an <h1>. Apply a background-image, and a bit of CSS, and it looks like a normal image. Voila!
If you want to learn how to do anything with XHTML+CSS, check out my web resources section. You might learn something.
I was simply saying that I personally prefer to use DIVs for various types of text, and obviously other people will prefer to use other methods of working.
At the end of the day though if you get the result you want it really doesn't matter how you get there.
regaurdless of using it one time or 100 times, width and height are actually deprecated, and i believe unsupported in xhtml strict. therefore using css is the ONLY way to go.. it's how i've gone for sizes i specify. i found that out while moving the majority of my site to cssGen-ik wrote:Sorry to burst your bubble but it's not valid XHTML yet....
...sorry had to check. A lot of pages on the web claim to be valid XHTML but when checked there are always unchecked errors in there.This page is not Valid XHTML 1.0 Transitional!
Below are the results of attempting to parse this document with an SGML parser.
Line 15, column 76: required attribute "alt" not specified.
...es/thingy.gif" width="720" height="100" /></div>
You need to include the ALT tag on all images.
<img src="anImage.gif" width="10" height="10" alt="" />
Also if you are using an image more than two or three times on a page then it's better to size it using CSS instead of including the WIDTH and HEIGHT tags on the actual <img>.
<img class="anImage" src="anImage.gif" alt="" />
Use this page to validate your website..... http://www.w3schools.com/site/site_validate.asp
But yeah the actual site looks ok
I wasn't implying that you didn't. I'm sorry if you took it that way.Gen-ik wrote:Yes thank-you, I know how to use CSS.
Sorry, but I couldn't disagree more. It does matter how you get there. The web is not just for viewing on computer screens. The web is data. The web is also viewed by PDA's, Cell Phones, Printers, Screen Readers, and numerous other devices, which I'm sure you're aware of. Although there is nothing wrong with using divs, per se, using them non-semantically can potentially be more harmful than good... even if you think it "just works."Gen-ik wrote:At the end of the day though if you get the result you want it really doesn't matter how you get there.
Using proper, semantic coding (including <h?> tags) makes more sense to non-standard devices which are gaining a greater market share day by day. On top of that, it's highly recommended by the W3C, and Google will rank your pages higher. Use less markup so that there is a higher content-to-markup ratio in your pages, off-load style and layout code to an external CSS document, and you will never have to pay anyone to get your pages to rank higher in search engines again!
I'd say, check out Design Rant.
I personally agree with this as well, but it does kinda depend on the type of website(s) you are creating, for example viewing this website on a PDA would be pretty much impossible... but as you say moving as much of the 'style' content as possible to a CSS file is the best method of working no matter what type of website you are creating.Skyzyx wrote:The web is not just for viewing on computer screens. The web is data. The web is also viewed by PDA's, Cell Phones, Printers, Screen Readers, and numerous other devices, which I'm sure you're aware of. Although there is nothing wrong with using divs, per se, using them non-semantically can potentially be more harmful than good... even if you think it "just works."
Using proper, semantic coding (including <h?> tags) makes more sense to non-standard devices which are gaining a greater market share day by day. On top of that, it's highly recommended by the W3C, and Google will rank your pages higher. Use less markup so that there is a higher content-to-markup ratio in your pages, off-load style and layout code to an external CSS document, and you will never have to pay anyone to get your pages to rank higher in search engines again!
I don't think there is strictly a single correct way of developing a website because the 'rules' will vary slightly depending on what type of website you are creating. Not all websites are designed to run all every possible medium out there... some (if not most) are geared towards normal website browsing (PC/MAC/MONITOR).
But there's no reason to block out other devices/platforms. Why wouldn't you make it work (or at least make sense) everywhere? There'd be very little changing of code. You wouldn't use any more code if you did it right.Gen-ik wrote:Not all websites are designed to run all every possible medium out there... some (if not most) are geared towards normal website browsing (PC/MAC/MONITOR).
If it's just a matter of a stubborn preference, then fine. Have it your way. But using an excuse like this is simply invalid, based on a false premise.
And here's an example: you might choose to style chapter titles with a CSS class applied to a <p> tag - or <div> or whatever.
However, if you use <h1> <h2> tags (and nest them logically eg <h1> for title, <h2> for chapter headings) a screen reader can skip through the titles allowing a blind user to find what they want without having to wade through the whole page.
There are no drawbacks to doing this, and it's better code since the tags reflect the structure of the document.
However, if you use <h1> <h2> tags (and nest them logically eg <h1> for title, <h2> for chapter headings) a screen reader can skip through the titles allowing a blind user to find what they want without having to wade through the whole page.
There are no drawbacks to doing this, and it's better code since the tags reflect the structure of the document.
I didn't say that I (or anyone else) 'block out' other devices or platforms, and it certainly isn't 'stubborn preference'Skyzyx wrote:But there's no reason to block out other devices/platforms. Why wouldn't you make it work (or at least make sense) everywhere? There'd be very little changing of code. You wouldn't use any more code if you did it right.Gen-ik wrote:Not all websites are designed to run all every possible medium out there... some (if not most) are geared towards normal website browsing (PC/MAC/MONITOR).
If it's just a matter of a stubborn preference, then fine. Have it your way. But using an excuse like this is simply invalid, based on a false premise.
http://deviantart.com and http://deskmod.com are good of examples of what I'm talking about here.
I agree, but I also think that it will be a while before the internet is as accessible as we all want it to be, mainly due to compatibility problems and large corporations such as Microsoft and Netscape always bitching.McGruff wrote:Accessibility is very important these days. You won't get much work if you don't generate good, accessible code.
If there was one true standard that everyone had to follow then things may change. Who knows, one day it might happen... if we're lucky.