WordPress.org

Ready to get started?Download WordPress

Forums

to the right! (9 posts)

  1. mystical
    Member
    Posted 8 years ago #

    How do you align calendars? I've been trying several ways, but I can't get it to align to the right... unless it's on Internet Explorer, but I would like it to look decent in other browsers too.

    My calendar's in my sidebar, and I have it like this: <div id="calendar"> <h3><?php _e('Calendar'); ?></h3> <?php get_calendar(); ?></div> and the closest combination in my stylesheet is like this: #calendar {float:right'} Of course, my calendar would be aligned to the right, but I don't want things that were supposed to be below it (categories, archives, etc) to float around it (on the calendar's left and under the calendar's right).

    My sidebar is inside a div tag "nav," and the properties for nav is #nav {position:absolute; left:11px; top:735px; width:248px; padding:2px; z-index:1; background-color:transparent; overflow:visible; text-align:right;} Everything else but the calendar aligns to the right, including the heading "Calendar".

    I also surrounded the <?php get_calendar(); ?> with a div tag and had the text align to the right in my stylesheet, but that didn't work... and did the same with a paragraph tag...

  2. Lorelle
    Member
    Posted 8 years ago #

    The calendar is in a table and I'm not sure if you want to set the calendar to the right or the text that is in the calendar.

    To move your table calendar around, find the styles in the style sheet that reference the calendar. These may be different from the classic WordPress Theme, but they are #wp-calendar. You can position the main table inside there.

    If we had a link to your site, we could get more specific.

    To align the text within the calendar itself, you need to also work in the #wp-calendar section of your style sheet.

  3. mystical
    Member
    Posted 8 years ago #

    I want to set the calendar itself to the right... however, since the boxes are so small, it doesn't make much of a difference (I've tried).

    http://mysticalillusions.5gigs.com/journal/

  4. vkaryl
    Member
    Posted 8 years ago #

    Try float:right in the #calendar {} element.

  5. mystical
    Member
    Posted 8 years ago #

    I've tried it. While that would fix the alignment problem (sort of), it makes the categories and the archives go to the left of the calendar and then below the calendar.

  6. vkaryl
    Member
    Posted 8 years ago #

    Did you also clear:right there too?

  7. Lorelle
    Member
    Posted 8 years ago #

    I checked your site for validation errors, and lucky you, only one, related to the calendar:

    <p id="cal-right"><table id="wp-calendar">

    A table sits in it's own thing, so you can put a DIV around it but not a paragraph.

    Okay, this isn't perfect but it gives you a starting point. First, if you are not using Firefox, install it and get the Web Developer Tools Add on NOW. Using CSS Edit, you can tweak things around until you get it "right". Then test it out in MSIE and other browsers. Here is what I ended up with. I'm not happy about it, but it works:

    /* CALENDAR */
    #calendar {}
    #calendar table {position:relative; left:120px}
    #wp-calendar {text-align:right;}
    caption {font-family:ariel, times, trebuchet, sans-serif; font-weight:bold; color:#8A2BE2; font-size:16px; text-align:center;}
    th {font-family:ariel, times, trebuchet, sans-serif; font-weight:bold; color:#DDA0DD; font-size:14px; text-align:center;}
    td {font-family:ariel, times, trebuchet, sans-serif; color:#FFFFFF; font-size: 12px; text-align:center;}

  8. vkaryl
    Member
    Posted 8 years ago #

    Nope that doesn't work either (referring to my earlier post, not Lorelle's). I'd have to grab it all and load it at home to really look at it; your css is pretty hard to read the way you have it....

  9. mystical
    Member
    Posted 8 years ago #

    Thanks Lorelle! That plug-in helps! (I had Firefox, but I don't really use it...)

    vkaryl: Blah, personal preference. I don't like doing it one property/attribute per line. I find it's easier for me to have it all out, like reading a book.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags