PDA

View Full Version : Help me before I end it all


headtied
02-21-2005, 02:19 PM
I have recently left the world of Net Fusion and gone to Dreamweaver 2004 mx, Just so you know I design most of the graphics in Adobe cs.

How do I centre a image on all resoloutions ? My image looks good in 800 x 600 but although you can still see it in 1024 x 768 it is not centred. I am not a programmer so I am using dreamweaver as WYSIWYG. I have played around with percentage and I am building everything inside a table so it will resize with resoloution, but the background image just is not centred.


Have a look at this Restrained dementia

I need it to look like that in 800 x 600 and upwards - Please tell me how ! I am a artist and designer but I am learning PHP soon - ( many headaches I can see ) Sorry to be a pain

Thanks in advance

gmcrone
02-21-2005, 09:11 PM
Can you please give us a URL to look at as I am not sure what you mean by centering an image.

Mike...

headtied
02-22-2005, 05:31 PM
Hi -

Yeah sure have a look at www.restraineddemenita.com - not my site it's a clients. This site was done in Netfusion I need to know how to do the same in Dreamweaver, ie: centering the entire page -

Steve

gmcrone
02-22-2005, 10:01 PM
Here is a basic way of centering all your content in a page and keep it centered for all browsers at all resolutions.


The HTML:
<body>
<div class="wrapper">contents of page</div>
</body>

The CSS:
body {
text-align: center;
min-width: 770px;
}
div.wrapper {
text-align: left;
margin-left: auto;
margin-right: auto;
}


The wrapper div surrounds all your page code and keeps it aligned in the center.

Mike...

headtied
02-23-2005, 02:03 PM
Mike

I can not thank you enough for your help, where in the code do I copy this to ? I am new to programming as I am a designer, I am learning though so I hope I wont have to pester you anymore.

Cheers

gmcrone
02-23-2005, 08:57 PM
body {
text-align: center;
min-width: 770px;
}
div.wrapper {
text-align: left;
margin-left: auto;
margin-right: auto;
}

The above save as a text file called center.css

<body>
<div class="wrapper">contents of page</div>
</body>


At the begining of your web page right after your BODY tag enter in

<div class="wrapper">


At the bottom of your page just before /BODY enter :


</div>


Then in between the HEAD and /HEAD code enter this:

<link rel="stylesheet" href="center.css" type="text/css">


That should do it for you...

Mike...

headtied
02-23-2005, 09:07 PM
I will give that a go, thanks. Can you recommend any books I could but that woudl help me, I have decided to learn PHP, but I need to get a programming book,

Steve

gmcrone
02-23-2005, 09:28 PM
If you mean for PHP,
Books by O'reily, Wrox Press, Sybex, and Wiley Publishing are very well done.

I have never recommended any of the Learn XXX in 24 Hours type of books

Mike...