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



Closed Thread
Quick css help needed for H1 tag
Old 10-14-2010, 05:45 PM Quick css help needed for H1 tag
Experienced Talker

Posts: 33
Trades: 0
On my site I have the site name in an H1 tag but I want the domain extension displayed outside the H1.

E.g. <h1>Site</h1>.com

How do I do that so it lines up?

Do I put the .com in a <p> or a <span> or something else?

At the moment the .com is on the next line.

thanks.

Last edited by fadetoblack; 10-14-2010 at 06:03 PM..
fadetoblack is offline
View Public Profile
 
 
Register now for full access!
Old 10-14-2010, 05:59 PM Re: Quick css help needed for H1 tag
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,376
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Set display: inline; and float: left; on the h1 and set clear: right on the h2
__________________
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 online now
View Public Profile Visit chrishirst's homepage!
 
Old 10-14-2010, 06:04 PM Re: Quick css help needed for H1 tag
Experienced Talker

Posts: 33
Trades: 0
Quote:
Originally Posted by chrishirst View Post
Set display: inline; and float: left; on the h1 and set clear: right on the h2
sorry I put h2 in there by accident. what should i put around the .com part if it's not h2?
fadetoblack is offline
View Public Profile
 
Old 10-14-2010, 06:14 PM Re: Quick css help needed for H1 tag
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,376
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Why does it need to be "outside"?

HTML Code:
<h1>hostname<span>.com</span></h1>
then style the span to suit.

Code:
h1 span {
     font-size: 0.5em;
}
the rule above will set the text in the span to be half the size of the heading.
__________________
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 online now
View Public Profile Visit chrishirst's homepage!
 
Old 10-15-2010, 04:46 AM Re: Quick css help needed for H1 tag
Experienced Talker

Posts: 33
Trades: 0
Quote:
Originally Posted by chrishirst View Post
Why does it need to be "outside"?

HTML Code:
<h1>hostname<span>.com</span></h1>
then style the span to suit.

Code:
h1 span {
     font-size: 0.5em;
}
the rule above will set the text in the span to be half the size of the heading.
It doesn't need to be outside, but I want it a different size and colour. It's also probably better for the just the keyword to be in the h1 tag.


This is what I have done.

#headBanner h1 {font-size: 102px;
font-family: Arial, Helvetica, sans-serif;
color: #056FFF;
font-weight: bold;
}

#headBanner h1 span {font-size: 80px; color: #cccccc;}


<h1>Title<span></h1>.com</span>


I get this as a result.

Title
.com

The span doesn't seem to be working.
fadetoblack is offline
View Public Profile
 
Old 10-15-2010, 09:52 AM Re: Quick css help needed for H1 tag
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
Quote:
<h1>Title<span></h1>.com</span>
Your code is improperly nested, the CORRECT code would be:
<h1>Title.<span>com</span></h1>
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
View Public Profile
 
Old 10-18-2010, 06:13 AM Re: Quick css help needed for H1 tag
Experienced Talker

Posts: 33
Trades: 0
Quote:
Originally Posted by LadynRed View Post
Your code is improperly nested, the CORRECT code would be:
<h1>Title.<span>com</span></h1>
Ooops! thanks, I missed that!
fadetoblack is offline
View Public Profile
 
Closed Thread     « Reply to Quick css help needed for H1 tag
 

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.28127 seconds with 12 queries