Sorry I posted already but it’s gone awol, can you help me source correct code for centering a div?


(Gabrielle Vickery) #1

My site is here: http://www.wesmcghee.com/discography/
At the bottom of the page I’m using a smooth scroller stack by Maik Barz and the code looks like this:

back to top
Ack it's removed the code, ok I'm attaching a screen grab.

But how can I center the text? Do I do it within this div code or put it in the css pane and what would the code look like?


(Charlie Lockhart) #2

Hi Gabrielle,

To center the Back To Top text try adding this bit of css code into the Page Inspector custom css window:

.smooth_scroll {text-align:center;}

That seemed to work when I just did a quick test on your site page for that text in the stack. Let me know your results please.

Best,
Charlie


(Becca) #3

What text would you like?

The text goes between the two >< where the ** are below: So you can put anything you like here.

[code]<div id="backtotop">**back to top**</div>[/code]

I haven’t used that stack before so sorry if I got the wrong end of the stick…!


(Becca) #4

oh my eyes… just seen that you wrote center not enter, clearly I’m not wearing my glasses enough!!!


(Gabrielle Vickery) #5

Works perfectly Charlie you star ;-))
Thanks Becca for responding, it’s all appreciated ;-).