2 replies [Last post]
johnyboy
Offline
Enthusiast
Last seen: 13 years 29 weeks ago
Joined: 2006-03-16
Posts: 80
Points: 0

i'd like to get two short pieces of text, one in a h1 and the other a p, on opposite sides of the page and lined up on the same baseline.

h1 {
	color: #000;
	font-size: large;
	font-family: "arial black", sans-serif;
	word-spacing: -0.1em;
	letter-spacing: -1pt;
	display:inline;
}
p {
	font-family: sans-serif;
	font-size: 10px;
	color: #000;
	display:inline;
	text-align:right;
}

<h1>Heading</h1>
<p>Bit of text</p>

so i'd like Heading on the left, and Bit of text on the right, both on the same baseline. i guess inline isn't the way to do it because you've got conflicting ranging going on then but inline does get them reliably on the same baseline.

any ideas?

thanks.

thepineapplehead
thepineapplehead's picture
Offline
Guru
Last seen: 36 weeks 1 day ago
Joined: 2004-06-30
Posts: 9668
Points: 801

2 pieces of text on same baselin on opposite sides of page?

Have you tried floats?

Verschwindende wrote:
  • CSS doesn't make pies

johnyboy
Offline
Enthusiast
Last seen: 13 years 29 weeks ago
Joined: 2006-03-16
Posts: 80
Points: 0

2 pieces of text on same baselin on opposite sides of page?

i have. i could get the h1 on the left of the page and the p on the right of the page that way, but i couldn't get the baselines to line up at all.