Welcome to WebmasterWorld Guest from 18.104.22.168
Forum Moderators: not2easy
i have created a background image for my web site that is 800x 600x in photoshop and saved it as a gif.
i created a body background css and alined it in the center of the page..
but i need to be able to type text in the far right of the page and have no idea how to. i used the layout table and cell and entered some text but when i viewd it, it moved to the top of the page. i hope someone can please help me with this question. I want the text to align on the far right of my image and the only way i can do this is by the layout tables but like i said, it then moves.
i hope this made sense to sombody as it is my first post and i dont really know how esle to explain it.
thank you for any help
thank you for the very speedy responses guys.
If not, I think the best way is to create a 100% width table within which you could create another 800px width tabe and attach your bg to it. You then align this new table to the center (which will move according to the screen size hence your 800px table will always be in the middle). Now you just have to divide your 800px table into 2 colums and write your text in the right columns. You should also change the td code for the right column to <td background=""> otherwise in older NN browser your graphic will start again in the right section.
If you don't want the table to be centered in the browser windo, just get rid of the CSS style for the body and remove the 100% table.
2:29am at the mo time for bed (aus time)
god bless and thanks again
Anyway, the CSS way to handle this is..
<body style="height:100%;background: #000022 url(yourpic.jpg) center center;">
<div style="position:absolute;top:0px;right:0px;width:50%;height:100%;border:1px solid black;">
Lots of text here.
Hope thats what you needed. Bit neater than those nasty old tables.
Obviously you can (and probably should) move the CSS to an external stylesheet instead. I've put a black border around where the text will go. To get rid of it just remove the 'border' settings on the div.
So I'd rather save myself the hassle and just write nice, clean standards-compliant code, rather than spend months tearing my hair out and using dodgy markup to satisfy a broken browser that will be dead soon. :)