21 replies [Last post]
mridang_agarwalla
Offline
Regular
Last seen: 11 years 27 weeks ago
Joined: 2007-10-30
Posts: 20
Points: 0

Hi guys,

I have this issue I need to resolve.

I have this page

http://www.mridang.info/gallery/themes/classic/bloggallet.html

If you scroll down you will see that the pink coloured box is inside the main content box. It is my footer and i want it to appear below the main content box. Somethisn like the design on

http://www.mridang.info/blog/

Any help? Shouldn't take long for you CSS gurus. Smile

Thanks in advance guys. I'm off to walk home and brave the nasty Finland winter. Tongue

DanA
DanA's picture
Offline
Elder
Last seen: 9 years 18 weeks ago
Timezone: GMT+2
Joined: 2004-08-14
Posts: 1087
Points: 2

Validate your html first

Validate your html first :
HTML VALIDATION
Then your css :
CSS VALIDATION
Then place the footer out of #content.
You may have to add height:1%; in #footer to set hasLayout for IE 6

mridang_agarwalla
Offline
Regular
Last seen: 11 years 27 weeks ago
Joined: 2007-10-30
Posts: 20
Points: 0

Hey, I found a lot of CSS

Hey,

I found a lot of CSS and HTML validation errors.

I rectified most of them. There are still 50 errors in the HTML. This is due to the two lines of JS in line 220 and 225. If you delete those lines. It validates just fine. I tried everything i could to fix this but it refuses to validate the JS snippet. Tongue Any help? As for the CSS, it has a couple of minute errors and most of them are for the -mozoutline atrtribute and the opacity attribute which i do need for use with my moo.fx JS library. That shouldn't be and issue.

I tried placing the footer div outside the content and all sorts of places but it doesn't work. Sad need to solve this ASAP. i hope you guys manage helping me out.

thepineapplehead
thepineapplehead's picture
Offline
Guru
Last seen: 1 year 4 weeks ago
Timezone: GMT+1
Joined: 2004-06-30
Posts: 9668
Points: 801

Quote:Error Line 220,

Quote:
Error Line 220, Column 75: document type does not allow element "div" here.

That sounds like a pretty big issue if you're trying to get a CSS layout to work Wink

Verschwindende wrote:
  • CSS doesn't make pies

mridang_agarwalla
Offline
Regular
Last seen: 11 years 27 weeks ago
Joined: 2007-10-30
Posts: 20
Points: 0

Okay. It validates now. I

Okay. It validates now. I commented out the JS. Could you please take a look now.

DanA
DanA's picture
Offline
Elder
Last seen: 9 years 18 weeks ago
Timezone: GMT+2
Joined: 2004-08-14
Posts: 1087
Points: 2

The footer is where it

The footer is where it should. See attached image.
Move the footer out of #content.

AttachmentSize
mridang.png 1.48 KB
mridang_agarwalla
Offline
Regular
Last seen: 11 years 27 weeks ago
Joined: 2007-10-30
Posts: 20
Points: 0

Look at the source. The

Look at the source. The footer div is outside the content div. But the DOM still shows it as inside the content. Please see the page source.

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 1 hour 2 min ago
Dallas
Timezone: GMT-5
Joined: 2004-06-25
Posts: 9742
Points: 3821

Have you moved/deleted the

Have you moved/deleted the page?

Quote:
[http://www.mridang.info/gallery/themes/classic/bloggallet.html]
Page not found
The page you are looking for might have been removed,
had its name changed, or is temporarily unavailable.
Please try the following:

If you typed the page address in the Address bar, make sure that it is spelled correctly.

- Click the Back button in your browser to try another link.
- Use a search engine like Google to look for information on the Internet.
HTTP 404 - File not found

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

mridang_agarwalla
Offline
Regular
Last seen: 11 years 27 weeks ago
Joined: 2007-10-30
Posts: 20
Points: 0

http://www.mridang.info/galle

mridang_agarwalla
Offline
Regular
Last seen: 11 years 27 weeks ago
Joined: 2007-10-30
Posts: 20
Points: 0

any help?

any help?

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 1 hour 2 min ago
Dallas
Timezone: GMT-5
Joined: 2004-06-25
Posts: 9742
Points: 3821

First, some

First, some suggestions:

Don't bump the thread. Six hours is not enough time to allow an international forum to respond. My post requesting a good link was at 2:30AM my time. I went to bed. Even now, it's only ten hours later.

When formatting your code, convert tabs to spaces (2 or 3 spaces per tab) before saving. Too many source viewers tab eight spaces. Even a few nested levels means the lines start 50%+ across the window. If your editor won't do that, use HTMLTidy to pretty print the code.

Now, to the issue:

Your #footer is a child of div.spacing and sibling to #thumbdisplay. Div.spacing is already nested five deep below <body>.








And, that is looking at the source.

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

mridang_agarwalla
Offline
Regular
Last seen: 11 years 27 weeks ago
Joined: 2007-10-30
Posts: 20
Points: 0

hey kk5st, i checked the

hey kk5st,

i checked the code throughly in Dreamweaver, even revalidated it and tidied it. I can't see what you're talking about. All the divs have been closed properly. There is the






COuld you just modify the HTML and show me. I have checked and checked and checked but i still can't figure it out.

DanA
DanA's picture
Offline
Elder
Last seen: 9 years 18 weeks ago
Timezone: GMT+2
Joined: 2004-08-14
Posts: 1087
Points: 2

Move the 4 closing div

Move the 4 closing div before </body> before the page footer comment.
You should the have 5 closing div between the gallery comment and the footer comment :

and 3 closing div before the end of body: CSS

mridang_agarwalla
Offline
Regular
Last seen: 11 years 27 weeks ago
Joined: 2007-10-30
Posts: 20
Points: 0

Doesn't seem to work or i

Doesn't seem to work or i cant understand.

I have three closing divs before the end of body but i have no clue what you mean 5 closing divs between the start of gallery and start of footer. I have a dozen divs inside it and all are 'closed'. My code even validates just fine which means i have a blanced number of open divs and closed divs. Can anyone just modify the source and send it to me. It would be mch simpler and I would be able to understand where exactly i'm going wrong. With code snippets this discussion seems to be going nowhere. After every reply I feel I'm back to sqaure one!

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 1 hour 2 min ago
Dallas
Timezone: GMT-5
Joined: 2004-06-25
Posts: 9742
Points: 3821

Look at the structure





That your markup is valid does not imply that your structure is what you want. The point is that your footer is nested within wrapper⇒content⇒gallery⇒clear⇒spacing.

It is my thought that you want it as a child of content rather than as the great-great-grand-child.

gary

ps. Configure Tidy to convert tabs to two spaces, re-run it against your source and upload the cleaned up source. Following the indentions forty or fifty spaces across is entirely too much effort. --g

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

mridang_agarwalla
Offline
Regular
Last seen: 11 years 27 weeks ago
Joined: 2007-10-30
Posts: 20
Points: 0

Hi again,

oops...accident

mridang_agarwalla
Offline
Regular
Last seen: 11 years 27 weeks ago
Joined: 2007-10-30
Posts: 20
Points: 0

Hi, <body> <div

Hi,






The above code is from the HTML file. i removed all the useless stuff and left only the DIV's for reference. My footer is onyl nested in the wrapper. How did you see that my footer is nested 5 levels deep. First is my header section, then is the content and then is the footer section. Then why does the footer appear withing the content even within the DOM layout. This topic seems even more complex than calculus. Tongue sorry guys, for being so stoopid.

Ed Seedhouse
Ed Seedhouse's picture
Offline
Guru
Victoria British Columbia
Last seen: 41 weeks 3 days ago
Victoria British Columbia
Timezone: GMT-8
Joined: 2005-12-14
Posts: 3570
Points: 675

mridang_agarwalla wrote:The

mridang_agarwalla wrote:
The above code is from the HTML file. i removed all the useless stuff and left only the DIV's for reference.

Bad idea. We ask to see all your code for a reason, you know. I can't tell you how often the error turns out to be something nowhere near where or what the poster thinks it is.

The code you posted has no doctype declaration for instance. That alone will screw up many browsers, but we can't tell from a snippet if your original code actually doesn't have one or if you've removed it as "irrelevant".

If you are going to post your code post all of it. All your html from the very top to the very bottom of the file, and all your CSS. Every ding-dang bit.

Or, even better, a link to the site because then we can see all of that much more easily and also see how it looks in our browsers. Since you are asking for free help here isn't it to your interest to give us what we need to help you with as little work as possible?

Ed Seedhouse

Posting Guidelines

Watch out! I am carrying irony, sarcasm and satire, and know how to use them.

mridang_agarwalla
Offline
Regular
Last seen: 11 years 27 weeks ago
Joined: 2007-10-30
Posts: 20
Points: 0

Well, the small snippet of

Well, the small snippet of code that i posted is from the HTML whose link is give a few posts above. The only HTML referred to in this discussion is the one in the link. Do you still need me to post the whole code, when its easier to click the link and then choose 'View Page Source...' from the context menu?

DanA
DanA's picture
Offline
Elder
Last seen: 9 years 18 weeks ago
Timezone: GMT+2
Joined: 2004-08-14
Posts: 1087
Points: 2

Replace <div class="clear"

Replace

by

mridang_agarwalla
Offline
Regular
Last seen: 11 years 27 weeks ago
Joined: 2007-10-30
Posts: 20
Points: 0

Yipppeee! The damned thing

Yipppeee! The damned thing works!

Now, could someone tell me why it was not working. I thought you could use '/>' when u dont have any content within a TAG. This eliminates the need for a closing

Does this also mean i should write <BR></BR> instead of <BR />?

thepineapplehead
thepineapplehead's picture
Offline
Guru
Last seen: 1 year 4 weeks ago
Timezone: GMT+1
Joined: 2004-06-30
Posts: 9668
Points: 801

Well spotted DanA

Well spotted DanA Wink

Regarding the BR tag, no, you can use <br />

Every element must be closed in XHTML. Most elements (divs, paragraphs, etc) have ending </> tags, but for those without (eg HR and BR) you don't need an ending tag, you can just use the slash.

However please for the love of all that is good convert tabs into spaces as suggested above!

Verschwindende wrote:
  • CSS doesn't make pies