-
- CommentAuthorRob
- CommentTimeJun 1st 2008
Hey up, i've got what i'm hoping is a rather simple problem to fix. Basically i've got the following code and I want the date to display on the same line as the h3 but aligned to the right rather than directly after it.
However it aligns it to the right and puts it on the line below rather than inline with the title. I've tried text-align on the span as well but that makes no difference.
The only fix I can come up with is a -15px margin from the top, but i've always thought there must be better ways of doing things than using minus pixel margins.
So yeah, any help would be fantastic :)<h3>
<a href="#">John Doe</a><span class="date">May 8, 2008</span>
</h3>
.date
color:#000000;
font-size:10px;
font-weight:normal;
float:right;
}
.h3 a
color:#454545;
font-size:14px;
font-weight:bold;
text-decoration:none;
} -
- CommentAuthorfernbap
- CommentTimeJun 1st 2008
.date {
and
h3 a { -
-
CommentAuthorChristopher
- CommentTimeJun 1st 2008
I wrote up something along the same lines (CSS Listings) for a thread on here a while back. -
-
- CommentAuthorRob
- CommentTimeJun 2nd 2008
Posted By: fernbap.date {
and
h3 a {
haha I know that, that was just a typo from deleting the line number after copy and pasting from firebug :)Posted By: ChristopherI wrote up something along the same lines ( CSS Listings ) for a thread on here a while back.
Thanks alot, looking at that it seems all I need to do is add a float: left; to the 'a' which makes sense really, I knew it'd be something simple :)
That's a very nice little design you've got by the way, kudos :) -
- CommentAuthorVertex
- CommentTimeJun 5th 2008 edited by Vertex on the 05th June 2008 at 00:50:20 EDT
Although this is solved, another solution is simply to place what you wish to float before what is not floated. I use this in forms...
<label>
<input type="text" value="test"/>
Test value
</label>
label input{
float:right;
}
1 to 5 of 5
