|
Donkey -> Positioning with CSS (9/8/2003 14:06:55)
|
I am still playing with test pages trying to learn CSS, and I have just spent all afternoon trying to resolve 2 problems that are really getting to me. Problem 1. I am using a positioning layout of <div> columns expressed as percentages. All columns add up to a total of 100%. Within some of the <div> columns are images, I have enclosed these in <p> classes that use the command "text-align: center". This centralises the images when the page expands and works OK. I have a logo image which is inserted as a server side include, on the include page I have done exactly the same thing i.e. a <p> within a <div>. The logo <div. is 14% wide and it sits on top of another include which is also 14% wide (navigation). The logo won't centralise it stays to the left. Is there another way of centralising the logo image within the <div>. Problem 2 I have a header within a <div> that is intended to line up horizontally with the above mentioned logo. By trial and error I got it to work in IE, Mozilla, Opera and Netscape, then I validated the page and added the strict doctype declaration, and suddenly the header position had dropped down considerably in NN and Mozilla. I have tried changing margins, absolute position, padding and using in-line styles to change the vertical alignment, but nothing works for all four browsers. It's as though Netscape/Mozilla automatically add about 3% to the "top" value, but the strange thing is that the logo (which is an include) is perfectly positioned. Is there a way of adjusting the position only for Netscape/Mozilla? I hope I'm just doing something stupid that will be obvious to the experts out there. Thanks in advance. Peter
|
|
|
|