Topic: CSS possitioning (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=10991" title="Pages that link to Topic: CSS possitioning (Page 1 of 1)" rel="nofollow" >Topic: CSS possitioning <span class="small">(Page 1 of 1)</span>\

 
FatRod
Bipolar (III) Inmate

From: #
Insane since: May 2002

posted posted 06-19-2003 12:07

Please bear in mind i still have my 'L' plates attached but I am using the CSS layout template on http://glish.com/css/7.asp and within the banner DIV i am calling a ssi page which contains an image among other things, which I cant seem to Horizonally centre. I have searched and searched but cant get my head round how i can get the image centred via external an css file without using a table.

am i being silly here?

ben

FatRod
Bipolar (III) Inmate

From: #
Insane since: May 2002

posted posted 06-19-2003 12:17

Background image maybe should display centretop?


code:
body
{
background-image: url("xxx.jpg");
background-repeat: no-repeat;
background-position: 50% 0%
}




[edit] apparently this falls over in nn4???? any comments?[/edit]


[This message has been edited by FatRod (edited 06-19-2003).]

Suho1004
Maniac (V) Inmate

From: Seoul, Korea
Insane since: Apr 2002

posted posted 06-19-2003 13:33

There's some info on horizontal centering in CSS at bluerobot--maybe you'll find that useful.

FatRod
Bipolar (III) Inmate

From: #
Insane since: May 2002

posted posted 06-19-2003 16:02

thatks soho, i have looked at the bluerobot solutions but I can't work out how to get the content (i.e a gif) within a DIV to centre align properly and be xbrowser compatible.

Suho1004
Maniac (V) Inmate

From: Seoul, Korea
Insane since: Apr 2002

posted posted 06-19-2003 16:05

Well, I must admit that I'm not really sure what you are talking about up there... perhaps a page to look at?

FatRod
Bipolar (III) Inmate

From: #
Insane since: May 2002

posted posted 06-23-2003 17:23

I'll try and post some code when it looks a little better. I think I should have mentioned that doc is coded XHTML strict and The "align" attribute of the div element is not supported in XHTML 1.0 Strict DTD.

ben

DL-44
Maniac (V) Inmate

From: under the bed
Insane since: Feb 2000

posted posted 06-23-2003 18:29

For one thing you're missing a ';' after the background-postion line.

Secondly, NN4x does not support much CSS at all. There's no point trying to satisfy it at this point.

3rd, when it comes to centering a background image, your above psoted code should work, provided the missing semi-colon is put back in. If you want to center a non-background item, then you'll need to set the left and right margin to 'auto'.



Suho1004
Maniac (V) Inmate

From: Seoul, Korea
Insane since: Apr 2002

posted posted 06-24-2003 02:21

Actually, since the declaration with the missing semicolon is the last in the group, I don't think it should break--you can generally get away with leaving the semicolon off the last declaration, although it's a bad practice.

Then again, I could be wrong... it's been known to happen.

DL-44
Maniac (V) Inmate

From: under the bed
Insane since: Feb 2000

posted posted 06-24-2003 02:48

I've had varying resuls with such things.

I've had things that are not required break a page anyway....

May not be the problem, but I've had sillier things cause worse.

=)





Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu