Skip to content

Instantly share code, notes, and snippets.

@texxs
Last active February 17, 2023 03:13
Show Gist options
  • Save texxs/10898cca8949fc5eb3a6479c86848568 to your computer and use it in GitHub Desktop.
Save texxs/10898cca8949fc5eb3a6479c86848568 to your computer and use it in GitHub Desktop.
CSS - Logo And Text H1 Tag
h1 {
text-indent:-9999px;
margin:0 auto;
width:400px;
height:100px;
background:transparent url("images/logo.jpg") no-repeat scroll;
}
In the HTML doc you put the keyphrase you want to pimp inside the h1 html tag where you want the logo displayed (be sure the h1 tag is inside a container that positions it or it won't be visible) and only the logo will display, not the text (it will be off screen to the left about 9999 pixels.
@texxs
Copy link
Author

texxs commented Jul 1, 2019

It feels like cheating for SEO but . . . I didn't make the rules . . .

@texxs
Copy link
Author

texxs commented Feb 17, 2023

It feels like cheating because I left out a step here. in the HTML doc you put the keyphrase you want to pimp inside the h1 html tag where you want the logo displayed (be sure the h1 tag is inside a container that positions it or it won't be visible) and only the logo will display, not the text (it will be off screen to the left about 9999 pixels.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment