Jump to content

Layout Problem


feeta

Recommended Posts

Hello,I'm currently trying to get my head around CSS and have run into a bit of a problem.I'm working on a very simple 3 colum layout here.I'm sure you'll be able to see the problem. The footer overlaps the 'right bar' when it should act as if it were either the left bar or the centre content (with the footer underneath - depending on which colum is longest)The other problem, I'm not sure whether it's solvable or not, is when the page is shrank right down to very narrow, the image in the center colum moves down and the content and content title of the centre section shrinks. What would be causing this?I've included a link to the CSS file on the page so you might be able to see the problemsAny help would be very greatly appreciated.Many thanks,feeta :)

Link to comment
Share on other sites

Well, I haven't examined it completely, but I recommend replacing the IDs by classes. IDs are compulsory to be unique, so if the names are the same, use classes instead. (and in the stylesheet a dot instead of a hash)And because your doctype is Xhtml, you are supposed to follow the rules :)

Link to comment
Share on other sites

Hi Dan,Thanks for your reply. I've updated the ID's to Classes and the stylesheet too. Thanks for that.What are the rules I'm meant to be following for XHTML? I know about the closing tags with a / etc but are there some obvious ones I've missed? Sorry if I'm being naieve, I'm not really up to scratch with the latest compliances etc.I cant figure out why the footer would be doing that. Tried all different positioning etc and still no luck. I've tried the float and clear tags too but to no avail.Thanks again for your help.Feeta :)

Link to comment
Share on other sites

Well, for me it is too complicated to analise the whole stylesheet, as I never ever use the clear property, nor the float one. When you just display everything without those additions, they should do fine I guess :)It might be reasonable to start over again with the stylesheet, and add each statement one by one to see what happens to the page, using only the ones that actuially affect the page correctly how you want them to.For the rules, well, just keep in mind Xhtml was meant to leave well organised documents, not omitted tags, quotes, etc and no uppercase tags. You seem to know that already, so you know the basics. Rules further on will go into detail, you should be able to find them between the lines in the tutorial. You do have read it, don't you?

Link to comment
Share on other sites

Well, for me it is too complicated to analise the whole stylesheet, as I never ever use the clear property, nor the float one. When you just display everything without those additions, they should do fine I guess :)It might be reasonable to start over again with the stylesheet, and add each statement one by one to see what happens to the page, using only the ones that actuially affect the page correctly how you want them to.For the rules, well, just keep in mind Xhtml was meant to leave well organised documents, not omitted tags, quotes, etc and no uppercase tags. You seem to know that already, so you know the basics. Rules further on will go into detail, you should be able to find them between the lines in the tutorial. You do have read it, don't you?

No it won't...they are trying to create a 3 column layout without tables, using CSS....you need to use hte float and clear properties to acheive this.
Link to comment
Share on other sites

Yeah, you do need to use them, I'm just not quite sure how :) Yeah, I think I'm ok with the XHTML rules. I'm mainly just trying to get the layout to work at the moment and then I'll format the tags correctly once i've got it working.Cheers :)

Link to comment
Share on other sites

Dan look here for some reasons why you should use CSS instead of tables for layoutshttp://w3schools.invisionzone.com/index.php?showtopic=4126oh and W3C has set it as the standard :)Tables are for tablular data only! But there always has to be some exceptions....somethings are just not possible with pure css at this point due to browser limitations.

Link to comment
Share on other sites

That will be the only thing I'll ignore, of W3C :)Tables are not just for tabular data, they must also be allowed to used to get data in a tabular formation :) :)

um...exactly...if you were arranging your data in a grid or spreadsheet style then tables is okay...for everything else (ie. layouts)...W3C wants you to use CSS
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...