How would I center a layout and give it a 1 px border?
Printable View
How would I center a layout and give it a 1 px border?
Do you mean the actual code?
Or doing it graphically in photoshop?
Give the BODY the text-align of center maybe (or just use <center> tags which aren't valid though).
Then put the layout in a div and add "border: 1px solid #000000" to it's style.
Css:PHP Code:<style=border>
?PHP Code:.border {
border: 2px solid #color;
then put the <center> at the very beginning after the <html> <head> tags.
I want to make it valid, so iwho knows the way using CSS?
<div align="center">
under the body tag
</div>
before the </body> tag.
If your using tables just add align="center" to the table.
To center the layout add a div around it all I normaly call mine center, and in the css add this:
And if you want a border just use this;HTML Code:.center {
margin-left: auto;
margin-right: auto;
width: (enter the width of your whole design here)px;
}
HTML Code:.center {
margin-left: auto;
margin-right: auto;
width: (enter the width of your whole design here)px;
border: 1px;
}