Jump to content
Sign in to follow this  
Mark

Can`t centre a href link

Recommended Posts

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>

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...