Help - Search - Members - Calendar
Full Version: Date And Title - On The Same Line
Movable Type Community Forum > Using Movable Type > Entries and Archives
CBP
Hello,

I'm trying to put my entry dates on the same line as my entry titles. Does anyone know how to do this? I think the <div> tags prevent the titles and dates from sharing the same line. I'm not sure how to handle this.

Thanks!
imabug
just put the MTEntryDate and MTEntryTitle tags next to each other
CBP
QUOTE (imabug @ Oct 26 2006, 05:34 AM) *
just put the MTEntryDate and MTEntryTitle tags next to each other



Thank you, but it doesn't work. There's something else that needs to be done, because the entry title and entry date are in separate <div> tags, which always seems to create an automatic line break for some reason. Anything I'm overlooking? My site: HERE. Simply closing the gap between the entry title's </div> tag and the entry date's <div> tag doesn't do anything. So I placed the entry date thing inside of the entry title's div tags, and then removed the div tags for the entry date. This put the date on the same line as the title. But I want a different font color and alignment for the date. How do I do this with clean HTML and CSS? The font attribute is slowly falling by the wayside.

Cheers!
CBP
I've researched this and know that others have wanted to do the same thing. One person suggested getting rid of the <div> tags and instead using <h2> header tags. But that automatically inserts a line break. It also doesn't recognize my formatting for the title and date. I noticed a <span> tag in some coding, but I'm not sure what it's for. CSS/HTML wizards say the <font> attribute is toast and advice me against using anything but pure CSS, so while I might get the desired effect if I were to use HTML, I'd like this to work in all browers and be nice and pretty.

Any suggestions? A search on this forum didn't pull up anything useful.

Thanks.
imabug
CODE
<h2><span style="whatever CSS you want"><MTEntryTitle></span> - <span style="whatever CSS you want"><MTEntryDate></span></h2>

Replace the H2 tags with whatever you want.

you can use id attributes instead of the style attribute in the SPAN tags and specify the styling in a style sheet. Bookmark the HTML 4.01 and XHTML specs for easy reference.
CBP
I'm so sorry, but I'm not understanding how to approach this. I had a feeling the solution involved <span> tags, but I really don't know how to do this. Span tags keep things "inline," according to the W3 link you gave me, but how do I assign one span tag for the title and one for the date? Do I use "id," like you mentioned? Or "class?" I don't know what the difference is, and I don't know how to address this in my stylesheet. Anything I've managed to find on the net leaves me feeling even more clueless. Thank you!
imabug
CSS

A couple of books you might consider adding to your library:
HTML & XHTML: The Definitive Guide, Sixth Edition
CSS: The Definitive Guide, Third Edition
CBP
I'm moving overseas in a week to teach English. Unfortunately it's not in my budget (or airline weight limit) to purchase books right now, but I've jotted them down for future reference. Well, that's okay. I'll just move the date back to where it was. I don't need to get fancy on the blog I'm designing. It's for my friends and family to read about my teaching experiences overseas.

Thanks anyway!

tongue.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.