Mark Posted April 24, 2014 Share Posted April 24, 2014 I have the below code in a page of my website. All appears to work fine, except the centering of the hfer link in the last heading. The centralization of the other headers works fine. Does this mean that because I have a href link that i have to change code. Have tried a number of options but nothing seems to work? Any advise appreciated. <%@ Language="VBScript" %> <!DOCTYPE html> <html lang="en"> <head> <link href="Site.css" rel="stylesheet"> <title>Welcome</title> </head> <body> <br> <br> <br> <br> <br> <br> <h1 style ="text-align:center;font-size: 400%;color: #808080;background-size: auto; background-color: #000;background-position: center"> Welcome to SimpleSheet 101</h1> <br> <br> <br> <h2 style ="text-align:center;font-size: 300%;color: #000;"> The No:1 Home Budget Management Tool</h2> <br> <br> <br> <h3<b><a href="Default.cshtml" style ="text-align:center;font-size: 200%;color: #000;text-align: right"> Please Click here to enter site</a></b></h3> </body> </html> Link to comment Share on other sites More sharing options...
justsomeguy Posted April 24, 2014 Share Posted April 24, 2014 The anchor tag is an inline element, meaning that it is only as large as the content inside it, and it can be on the same line as other inline elements. Trying to center content inside an inline element with automatic width doesn't do anything, because the element is only as wide as its content. The h3 tag is a block level element though, so you can apply the centering to that one and the anchor tag will be centered inside the h3. You're missing a bracket on the opening h3 tag. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now