Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Centering H1 tag with icon?
Old 12-21-2009, 04:37 AM Centering H1 tag with icon?
Experienced Talker

Posts: 43
Name: Jon
Trades: 0
I would like to center (move it up) my h1 title tags with the icon, and put more space between them. How can I do that?



Here's my current title code if it helps/matters:
Code:
h1{
    color:#165788;
    font-size:18px;
    font-weight: 400;
    margin: 0px 0px 5px 0px;
}
Code:
<h1><img src="images/seo-icon.png" />Search Engine Optimization</h1>
Foppa is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 12-21-2009, 04:40 AM Re: Centering H1 tag with icon?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,371
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
set it as the background to the element.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 12-21-2009, 04:45 AM Re: Centering H1 tag with icon?
Experienced Talker

Posts: 43
Name: Jon
Trades: 0
Thanks for the quick reply.

I'm not sure what you mean though. Can you give me an example or explain?
Also, what part is the element?
Foppa is offline
Reply With Quote
View Public Profile
 
Old 12-21-2009, 04:58 AM Re: Centering H1 tag with icon?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,371
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
http://www.w3schools.com/css/pr_background-image.asp

ALL HTML objects are elements http://www.webmaster-talk.com/seo-ta...nd-values.html
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 12-21-2009, 05:25 AM Re: Centering H1 tag with icon?
Experienced Talker

Posts: 43
Name: Jon
Trades: 0
I'm not sure I understand.

How is it possible to make text a background to an H1 tag?
Foppa is offline
Reply With Quote
View Public Profile
 
Old 12-21-2009, 05:27 AM Re: Centering H1 tag with icon?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,371
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Not the text, just the icon.

position it "center left"
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 12-21-2009, 05:31 AM Re: Centering H1 tag with icon?
Experienced Talker

Posts: 43
Name: Jon
Trades: 0
Can you show me what you mean with the CSS I posted? I didn't know there was a "center left" css tag.
Foppa is offline
Reply With Quote
View Public Profile
 
Old 12-21-2009, 05:41 AM Re: Centering H1 tag with icon?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,371
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Quote:
I didn't know there was a "center left" css tag.
That's because there is no such "tag"

CSS has PROPERTIES and RULES tags are for HTML.

I'd suggest reading the W3Schools linked page in post #4!
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 12-21-2009, 05:50 AM Re: Centering H1 tag with icon?
Experienced Talker

Posts: 43
Name: Jon
Trades: 0
I did, but W3schools usually confuses me more.

I got it working now though.

I ended up doing:

h1 img{margin-bottom: -10px}

And that seemed to have worked for what I wanted.
Foppa is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Centering H1 tag with icon?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.38015 seconds with 12 queries