Forum Moderators: not2easy

Message Too Old, No Replies

2 beginner beginner CSS questions

         

bruticus75

11:25 pm on Jun 23, 2007 (gmt 0)

10+ Year Member



I have a few questions i'd hope I could have answered here....

1. Does CSS dictate the layout of the page at all or just the colors, text fonts and colors?

2. Why does my page flash like this: (you'll see a white flash before the actual page loads)

Thanks!

[edited by: DrDoc at 11:27 pm (utc) on June 23, 2007]
[edit reason] No URLs, thanks. See TOS #13 [WebmasterWorld.com]. [/edit]

DrDoc

11:32 pm on Jun 23, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



CSS can be used to size, lay out, position, layer, restrict, expand, and colorize ... and much more. Whenever you find yourself thinking: "I wish this particular element looked this or that way" ... CSS can do it. Want rounded borders? Want colored form inputs? Want stacked images? Want expanded text? You've got it!

Please note, however, that the support for certain "advanced" features of CSS is lacking in certain browsers ... mostly IE.

And, the "white flash" ... It's commonly referred to as a "flash of unstyled content" (or "FOUC"). Googling that term should turn up a wide variety of articles explain what it is, why it happens, and what can be done about it.

In short: A single <link> or <script> element inside the document <head> will get rid of the FOUC.

<script type="text/javascript">
//prevent FOUC
</script>

bruticus75

3:33 pm on Jun 24, 2007 (gmt 0)

10+ Year Member



hey Dr.Doc thanks a ton man, i'm still trying to find out what my FOUC is. Maybe it as another HTML snippet without and style tags...

coyoteRick

12:09 am on Jun 26, 2007 (gmt 0)

10+ Year Member



Depending on how you design your page (or how fast your web server is or a endless number of other variables), you could get very garish and slow FOUC.

If you design/layout your HTML design with tables, it could be the source of your problem. Tables load considerably slower, from top-left cell to the right.

Still, the FOUC will display with CSS div-based designs, however, they're usually much less annoying than those from tables.

A simple and easy way to eliminate the brief flash of white would be to make certain your have background colors defined for your DIVs or your TABLEs/TRs/TDs. This will make the FOUC a bit more colorful and not as noticable at times.

Hope it helps. :)

[edited by: coyoteRick at 12:11 am (utc) on June 26, 2007]