Skip to main content
Participant
November 22, 2019
Answered

Center a page in Dreamweaver?

  • November 22, 2019
  • 4 replies
  • 2204 views

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!! 

This topic has been closed for replies.
Correct answer Nancy OShea

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/

 

4 replies

Gail5ECD
Known Participant
April 21, 2021

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>

- &quot;Good English is an Art.&quot;
Nancy OShea
Community Expert
Community Expert
April 21, 2021

This question was already correctly answered by @anissa_thompson in 2019. 

I think the OP is long gone by now, don't you?  😉

 

Nancy O'Shea— Product User & Community Expert
Liam Dilley
Inspiring
April 23, 2021

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.

Nancy OShea
Community Expert
Nancy OSheaCommunity ExpertCorrect answer
Community Expert
November 22, 2019

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/

 

Nancy O'Shea— Product User & Community Expert
B i r n o u
Legend
November 22, 2019

completing what Anissa said, you also get some online tool that can be sometimes helpfull to figurate code

http://howtocenterincss.com/

this one is only one among others

 

anissa_thompson
Community Expert
Community Expert
November 22, 2019
Hope this helps! Make sure to press "✔ Correct Answer" on this post if this answers your question. Happy Creating!Anissa • @anissat