stuck!

  You are currently not logged in. You can view the forums, but cannot post messages. Log In | Register

03-Oct-17 10:39
I am designing a website, and I have a name in a header. It is centered horizontally, but the code I have for centering it vertically isn't working. Ideas? I need specific code for this, please. Thanks!

--
Jim Williams
05-Oct-17 13:10
"but the code I have for centering it vertically isn't working"

Define 'not working' and provide the 'code'.

--
Chris.
So long, and thanks for all the fish.
http://webmaster-talk.eu/
06-Oct-17 21:12
I do NOT know how to vertically center a header in a space I had designed for it. I thought I had it with some code written by the instructor I am watching in YouTube. I applied his code from a similar exercise, but it did not do what i needed it to do. Here is the stylesheet code he used, and it worked, but not on my site. Again, this is CSS code, not html.

position:relative;
top:50%;
-webkit-transform: translate Y(-50%);
-ms transform: translate Y(-50%);
transform: translateY(-50%);

[Edited by newbie1022 on 06-Oct-17 20:21]

--
Jim Williams
08-Oct-17 17:13
And how have you set the CSS to apply those rules to an element??

--
Chris.
So long, and thanks for all the fish.
http://webmaster-talk.eu/
08-Oct-17 18:44
I simply copy/pasted them into the CSS where it applied to the space where I was trying to center the element. It did not work, and I really need to learn the why's and whats of what the code does. I want to get my head around vertical centering! Thanks! Jim

--
Jim Williams

 
New posts
Old posts

Follow Elated