tags:

views:

85

answers:

2
+2  A: 

First and foremost id say that your css should be loading in the header, not half way through the body.

The page flashes for me (because of this) but the css does load and I've not been able to replicate the problem beyond that.

Aim to build the page so that it validates as this will make debugging Cake, more like debugging cake (rather than it being an abstract problem on top of messy html)

http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fwww.mytopten.in%2Ftopics%2Findex%2Fordermode%3Apopular

Get the page to a state where it resembles XHTML 1.0 first :o) (XHTML 1.0 Transitional as you've set)

The validator output is pretty verbose but in the case of your css, if you wish to use the same style repeatedly, and wish to attribute it on each element you want it to apply to (rather than using parent:child) you should use class (.mystyle // class="mystyle") for repeated styles and id (#myid // id="myid") for unique elements. An ID should only occur once on a page.

Chris M
thanks man, there was some problem in the inclusion of the css. You gave me a perfect suggestion.
Gaurav Sharma
+2  A: 

Find the \app\views\layouts\default.thtml file.

Your current code looks like this

<title>MyTopTen</title>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>

Move the title tag inside of head. Move the CSS link statement

<link rel="stylesheet" type="text/css" href="/css/cake.generic.css" />

to the head too. You are currently loading it after #main and before #sidebar. The CSS must be loaded in <head> or it can cause inconsistent rendering.

Emily
thanks a lot, your suggestion helped a lot.. :-)It also removed my rendering problem. thanks once again.
Gaurav Sharma