Copy link to clipboard
Copied
How do I center my page in Dreamweaver? I know you probably use some type of HTML or CSS code to center the page. I am using a basic template but also have an HTML and CSS coded website I am working on as well. Any help would be much appreciated!!
Take a look:
completing what Anissa said, you also get some online tool that can be sometimes helpfull to figurate code
this one is only one among others
Is your Template based on Bootstrap 4? If yes, there are built-in utility classes for horizontal and vertical centering.
https://mdbootstrap.com/docs/jquery/utilities/horizontal-align/
Copy link to clipboard
Copied
Take a look:
Copy link to clipboard
Copied
completing what Anissa said, you also get some online tool that can be sometimes helpfull to figurate code
this one is only one among others
Copy link to clipboard
Copied
Is your Template based on Bootstrap 4? If yes, there are built-in utility classes for horizontal and vertical centering.
https://mdbootstrap.com/docs/jquery/utilities/horizontal-align/
Copy link to clipboard
Copied
As you will see in your template css the auto settings for margin left and margin right along with other editable appearance settings.
<html><head><style>
.container {
text-align:center;
width: 100%;
padding-right: 15px;
padding-left: 15px;
margin-right: auto;
margin-left: auto;
}
</style></head>
<body>
<div class="container">
<div class="row">
<div class="col-12">
<h1>Your page title</h1>
<p>Your page text</p>
</div></div></div>
</body></html>
Copy link to clipboard
Copied
This question was already correctly answered by @anissa_thompson in 2019.
I think the OP is long gone by now, don't you? 😉
Copy link to clipboard
Copied
If you come across a thread via google and find solutions to something is old...
- Someone may not check the date and try it and it does not work. Browses change, OS changes, code app changes so that solution may not work any more.
- Some may not check the date and waste time implementing the solution.
If you know this does not work or found it does not work and have a modern day solution it is very helpful (And good for the forums) to post your modern day solution and note the old one wont work in x, y use cases.
This should never be discoraged, only if it is clearly spam which would have the post removed.
Copy link to clipboard
Copied
Thanks for your feedback. Page centering today is much the same as it was in 2019. The correct answer originally posted by ACP @anissa_thompson is still correct in 2021. So nothing has changed.
Although the untimely remarks offered by @Gail5ECD are not technically spam, they bring no real "food for thought" either. As everyone knows, a 100% width container cannot be centered. 😞
Should I remove Gail's remarks from public view? Perhaps so but instead I decided to lock this topic because there is nothing more to say.