473,385 Members | 1,630 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

CSS: Comments Please...

TAM
Hi,

I have redesigned one html page by removing all the tables. You can
see this test page at http://www.ngrain.com/css/home1.htm. Only
home1.htm has been redesigned without tables. Rest of the site uses
tables for layout.

I would appreciate if you can take a look at this page and CSS and
comment on the coding.

The page looks fine in IE but when I open up the page in Dreamweaver
or FrontPage, I see that all the div's are everywhere. Is it common or
something is wrong with the code?

This page looks fine in IE 6 but for some reason some parts of the
page are messed up in NN, Opera, Mozilla and FireFox. Do I need to
create a separate style sheet for NN, Opera, Mozilla and FireFox
browsers?

Thanks in advance and I look forward to your comments.

TM
Jul 20 '05 #1
2 1630
TAM wrote:
Hi,

I have redesigned one html page by removing all the tables. You can
see this test page at http://www.ngrain.com/css/home1.htm. Only
home1.htm has been redesigned without tables. Rest of the site uses
tables for layout.

I would appreciate if you can take a look at this page and CSS and
comment on the coding.

The page looks fine in IE but when I open up the page in Dreamweaver
or FrontPage, I see that all the div's are everywhere. Is it common or
something is wrong with the code?

This page looks fine in IE 6 but for some reason some parts of the
page are messed up in NN, Opera, Mozilla and FireFox. Do I need to
create a separate style sheet for NN, Opera, Mozilla and FireFox
browsers?

Thanks in advance and I look forward to your comments.

TM


Validate the CSS as well, at
http://jigsaw.w3.org/css-validator/validator-uri.html

BTW: http://tinyurl.com/68g9h is the result for the CSS at
http://www.ngrain.com/styles/basic_cross_plat.css
--
/Arne
Jul 20 '05 #2
On 20 Aug 2004 09:48:38 -0700, TAM <gr*******@canada.com> wrote:
Hi,

I have redesigned one html page by removing all the tables. You can
see this test page at http://www.ngrain.com/css/home1.htm. Only
home1.htm has been redesigned without tables. Rest of the site uses
tables for layout.

I would appreciate if you can take a look at this page and CSS and
comment on the coding.

The page looks fine in IE but when I open up the page in Dreamweaver
or FrontPage, I see that all the div's are everywhere. Is it common or
something is wrong with the code?

This page looks fine in IE 6 but for some reason some parts of the
page are messed up in NN, Opera, Mozilla and FireFox. Do I need to
create a separate style sheet for NN, Opera, Mozilla and FireFox
browsers?
Basically, I think it looks spiffy in Opera. A nice overall look.
Thanks in advance and I look forward to your comments.

TM


Wow, this turned out long...

The scrollbar styles are not "valid" CSS. Be aware they will not function
in all CSS browsers. DOn't have to actually remove them, I don't think
they do any harm, just don't claim valid CSS.

The most important goal in web design is making the text readable. When
you size fonts in points, IE users cannot resize the text. There is no way
of determining how many points or pixels are too small for your many
users, so this unit is not useful for the WWW.

Instead, use 100% which is based on the default font-size of the UA, which
has either been customized by the user or works well enough that the user
has seen no need to adjust it. Use 90% at minimum for non-critical content
like legal stuff. Serve any content you want every user to read at
font-size: 100% or higher.

When you use Verdana with its large x-height (it's like 7 or 8) it's
natural to make it small, as the x-height makes it legible at smaller
sizes. Now, if we could guarantee that each user had Verdana, it wouldn't
be so bad. But since we know some users don't have it, what will they see?
Arial or Helvetica, or their default sans-serif, all of which will have an
x-height of about 5. Smaller x-height = harder to read. Therefore, those
users will have difficulty accessing the content. Unless you make the
font-size such that Verdana looks stupidly big, the backup fonts will not
be legible. Solution: only use fonts in web pages whose x-heights are
about 5, or serve large x-height fonts conservatively large.

Be sure you set styles which apply to many elements higher up the tree. If
all (or most of) the text on your page is sans-serif or 100% or green, set
that in body and change it where needed. If many selectors will get almost
the same style, do it once:

..one, .two {font: italic 105% serif; border: 1px solid red; color: green;
background: white;}

and then make a small change to one.
..two {font-size: 110%;}

What we see in your CSS is typical generated output. The tool is dumb, you
be the brains.

Be cautious when setting widths as absolutes (pixels). As the goal is to
make the font-size right for the user, in some renderings there may be
overflow. Wisest to stick to ems for widths. Or, use % to make use of the
whole canvas - pixel-based widths inevitably end up shoved way over, or
centered with wide blank space either side, in say 25% of UAs, and in
another 25% it's wider than the viewport and invokes the user-unfriendly
horizontal scrollbar. That's what happens with your site, too.

A lot of web designers make the error of designing the website as if it
was an 8 1/2 x 11 sheet of paper. The paper's size is an unknown in web
design, and the best designers work with that rather than attempt to
eliminate it, as if it were a bug of browsers that they can be resized! If
you could make this flex to the user's viewport width, that would be an
improvement. It would be a little complicated, but doable.

A:link.topNav {color:#465465;text-decoration:none}

How do I know it's a link? Underlining on the WWW is universally
understood to mean "this is a link". Unless you have made absolutely clear
in some other way, leave in the underline.

Develop the habit of always specifying color and background together. If
the user has a custom stylesheet it may overrule your style, and make it
illegible. Although user stylesheet writers should be careful to avoid it
on their end, this is simple enough. Set color as inherit, or background
as transparent.

padding-top: 10px;
padding-right: 0px;
padding-bottom: 5px;
padding-left: 0px;

Use shorthand here. And no need for units on 0.

padding: 10px 0 5px;

Finally, I notice you have two divs nested in the HTML.

<div id="contain" class="container">
<!-- container begins -->
<div id="MainBody" class="body">
<!-- MainBody begins -->

....

</div><!-- MainBody ends -->
</div><!-- container ends -->

These divs are not used in the stylesheet. Why have this?
Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Michael Kalina | last post by:
Hi everybody! I have three questions, maybe somebody could help me with it. 1. "If you have a minute or two..." I usually do not do a lot with CSS, but I decided to have my site run on pure...
8
by: slawek | last post by:
Hi i have following stylesheet: ..linklist { width: 100%; font-size: 75%; background: #EEEEEE; margin: 5px; height: 300px; overflow: auto;
8
by: TAM | last post by:
Hi, I have two pages designed using CSS (without tables), http://www.ngrain.com/CSS/home1.htm designed for IE and http://www.ngrain.com/CSS/home2.htm designed for NN, Mozilla, FireFox...
4
by: Rob Ireland | last post by:
I'm working an a page... http://www.start.ca/users/bbscentr/ and I'm trying to get CSS set up so I can change the menu/menu options as I change sections on the site (The whole point of CSS, of...
15
by: Davide R. | last post by:
Ciao a tutti, vi spiego il mio problema Ho una pagina HTML che referenzia un CSS esterno. Ho alcuni elementi HTML che appartengolo ad una classe (chiamiamola "class1"). Avrei la necessità,...
32
by: Alan Silver | last post by:
Hello, I shamefully admit to be an old web designer, from before the days of CSS. In those heady days, tables were king and were used for every possible kind of alignment. When CSS came along,...
19
by: Dr Clue | last post by:
I'm not really an expert with RegExp() , although I do use it. The problem I have is that I want to strip comments out of a CSS file using RegExp() The reason is that I'm loading and parsing to...
7
by: Trammel | last post by:
Im trying to do something which I hoped would be alot easier than it seems. Im trying to design the layout of the page in CSS to avoid table, etc but having problems making the bottom "fade"...
5
by: =?Utf-8?B?SmVycnkgQw==?= | last post by:
I have a machine running IIS 6.0. I just replaced the web.config and several aspx pages in the application and now the style sheets are not working. the images from the themes work but not the css...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.