[personal profile] valiha posting in [community profile] style_system
Hello, I was hoping you'd be able to help me customize this layout further since the layout maker wasn't able to help. Once it's done, the layout will be changed significantly. I'm having trouble figuring some things out.

- There's a blank space to the right of the entries and I can't find out what's causing it. I changed the body background color so that it can be seen better.
Photobucket

- I originally thought I would need to change the width of the entries, and the maker suggested changing the following piece of code:

#content {
margin: 0 0;
position: relative;
width: 80%;
float: right;
padding-bottom: 20px;
}

from 80% to 100%, but that pushes the entries to the right and sidebar down. Entries are also narrower on the comment pages and I would like to at least reduce the size of the comments. I'm viewing this on my laptop and 1280x768 resolution, but would like the layout to work on a 1024x768 and 1289x1024 resolutions as well.

- The original css has even and odd entry and comment wrapper etc; are these necessary or redundant??

- I'd like to be able to style the multilevel tags which are not styled in the css, but was unable to find the proper ids/classes; it might be I just don't know where to search.

- Userpics don't look quite as intended in the original, which doesn't have Previous/Next links; since I do, they overlap and I had to lower them down. They really bother me, especially in the comments! I'd much rather have them inside the upper right corner.

- And I'd like to remove the underline for entry management links, as well as tags (both in entries and sidebar, but have a dotted underline for links in actual entries.

Original CSS:

Customized:

And you're probably thinking, Demanding, isn't she?

Date: 2010-05-28 06:56 pm (UTC)
tyger: An unidentified person-shape from Detective Conan.  Text: LURKER (Lurker)
From: [personal profile] tyger
I'm little more than a newbie myself, but here's what I know:

• the odd/even CSS is for if you want to have entries/comments in alternating colours. It's not necessary at all, but I think it's pretty awesome.

• You'll want a {text-decoration:none} to remove the underline, but I can't find dotted underlines on the W3, though I have seen them around. ^^;; Sorry.

Date: 2010-05-28 07:10 pm (UTC)
adalger: Earthrise as seen from the moon, captured on camera by the crew of Apollo 16 (Default)
From: [personal profile] adalger
Not just alternating colors; anything can be alternated. You could, for example, have userpics alternate between left-side and right-side.

Date: 2010-05-28 09:11 pm (UTC)
tyger: (KH!)Cid, smirking.  Text: ...well damn. (Cid - Well damn)
From: [personal profile] tyger
I hadn't thought about it like that, but that does make sense! :D Shiny!

Date: 2010-05-28 07:15 pm (UTC)
foxfirefey: A fox colored like flame over an ornately framed globe (Default)
From: [personal profile] foxfirefey
I think some people might use a dotted bottom border instead of underlining the text.

Date: 2010-05-28 09:13 pm (UTC)
tyger: FFVII!Yuffie, grinning.  Text: Yuffie (Yuffie - :D)
From: [personal profile] tyger
*nods*
95% of what I know comes from the W3 tute site; it's really a pretty handy resource! :D

I wondered if it might be that, but I didn't know, so~ ^^;

Date: 2010-05-28 08:10 pm (UTC)
owl: Stylized barn owl (Default)
From: [personal profile] owl
The dotted underline is actually a border. Something like border-bottom: 1px dotted #000000;

Date: 2010-05-29 04:33 am (UTC)
afuna: Cat under a blanket. Text: "Cats are just little people with Fur and Fangs" (Default)
From: [personal profile] afuna
entry width:

There's a width set on the .entry, if you just remove

    .entry {
    width: 690px;
}


then that should make it take up the full space.




multilevel tags:

You'll probably need to target something like:

.module-tags_multilevel > ul.module_list > li (top-level)
.module-tags_multilevel > ul.module_list > li > ul.module_list > li (second-level),
etc

Hmm, I'm not sure where the userpics are supposed to be, or have you fixed them already?

Date: 2010-06-06 09:26 am (UTC)
afuna: Cat under a blanket. Text: "Cats are just little people with Fur and Fangs" (Default)
From: [personal profile] afuna
Oops, my turn to apologize now. Got lost in my inbox.

Anyway, three lines of code for the currents:

.entry .metadata { background-color: #000; } /* for the currents */
.entry .footer .tag { background-color: #fff; } /* for the tag */
.entry .footer .inner { padding-top: 0;} /* to remove a leftover strip of blue in between the tag and the currents*/

Date: 2010-06-06 02:45 pm (UTC)
afuna: Cat under a blanket. Text: "Cats are just little people with Fur and Fangs" (Default)
From: [personal profile] afuna
Oops, I didn't really mean for that to be used as the CSS on the page *g* just put that out there as examples for which elements to be targetting with padding and margins.

Okay, if you're going to rearrange, then you will need to edit layers *g*

I can give you the code! But before we begin, do you know where to go to edit layers and such? Do you need instructions for that part, or can I just toss code at you and tell you to paste it into your user/theme layer?

Date: 2010-06-06 03:38 pm (UTC)
afuna: Cat under a blanket. Text: "Cats are just little people with Fur and Fangs" (Default)
From: [personal profile] afuna
Okay, that sounds cool then!

This is the code to reorder your currents/tags. It moves the tags text out of the entry footer, and to above the other metadata. (That means that the previous sample CSS I gave you will no longer work, btw *g*)

You'll need to make sure to create a new theme layer and add it to your style (if you use an existing wizard layer, the changes will be lost when you next use /customize/options). Just copy and paste it in:


## reorder metadata and tags in entry
function Page::print_entry(Entry e) 
"The meat of each new layout. Describes how each page will look. In nearly all cases, the logic and decision-making processes should come from pre-existing functions in core2, and should not get written here. If you limit the structure of the page to HTML, function calls, and attached CSS, then you will be able to pick up all of the enhancements  and accessibility requirements managed by core2."
{
    ## For most styles, this will be overridden by FriendsPage::print_entry and such.
    $e->print_wrapper_start();
    """<div class="header">\n""";
    $e->print_subject();
    $e->print_metatypes();
    $e->print_time();
    """</div>\n""";
    """<div>\n""";
    """<div class="contents">\n""";
    """<div class="inner">\n""";
    $e->print_userpic();
    $e->print_poster();
    if ($*entry_metadata_position == "top") { $e->print_tags(); $e->print_metadata(); }
    $e->print_text();
    if ($*entry_metadata_position == "bottom") { $e->print_tags(); $e->print_metadata(); }
    """</div>\n""";
    """</div>\n""";
    """</div>\n""";
    """<div class="footer">\n""";
    """<div class="inner">\n""";
    $e->print_management_links();
    if ($this isa EntryPage) {
        """<hr class="above-entry-interaction-links" />""";
        $e->print_interaction_links("topcomment");
        $this->print_reply_container({ "target" => "topcomment" });
        """<hr class="below-reply-container" />""";
    }
    else {
        $e->print_interaction_links();
    }
    "</div>\n</div>\n";
    $e->print_wrapper_end();

}

function Entry::print_metadata() {
    if (size $.metadata) {
        var string position = ($*entry_metadata_position == "top") ? " top-metadata" : " bottom-metadata";
        """<div class="metadata$position">\n<ul>\n""";
        foreach var string m (["music", "mood", "groups", "xpost", "location"]) {
            if ($.metadata{$m} == "") { continue; }

            var string metadata_name = lang_metadata_title($m);
            """<li><span class="metadata-label metadata-label-$m">$metadata_name: </span>""";
            if ($m == "mood") {
                " $.mood_icon ";
            }
            """<span class="metadata-item metadata-item-$m">$.metadata{$m}</span></li>\n""";
        }
        "</ul>\n</div>\n";
    }
}



To edit the text, go here:
http://www.dreamwidth.org/customize/options?group=text

Click on the "Entry" header; that will open up, and you'll see the "Current Music/Mood/Location"



To add some spacing, use this CSS (you can put it where you usually do *g*) (Note that this adds some space, even if there's no metadata on the entry)
.entry .footer { margin-top: 1em; }

To style the entry metadata and tags, for color and stuff, start with this code:

.entry .tags { /* stuff goes here */}
.entry .metadata { /* stuff goes here*/}

And let me know if you run into any other issues!

Date: 2010-06-06 04:24 pm (UTC)
afuna: Cat under a blanket. Text: "Cats are just little people with Fur and Fangs" (Default)
From: [personal profile] afuna
Yup, that's how to create a theme layer.

That won't remove the stuff in the CSS box (those are all saved in a wizard layer -- which you shouldn't ever need to touch )

Date: 2010-06-06 04:33 pm (UTC)
afuna: Cat under a blanket. Text: "Cats are just little people with Fur and Fangs" (Default)
From: [personal profile] afuna
Oh dear, hmmm. Oh *yeah* that's new code! Sorry about that, you just got a glimpse of the future >_>

Remove this line:
if ($*entry_metadata_position == "top") { $e->print_tags(); $e->print_metadata(); }


Change this line:
if ($*entry_metadata_position == "bottom") { $e->print_tags(); $e->print_metadata(); }

to:


$e->print_tags();
$e->print_metadata();

Date: 2010-06-06 04:40 pm (UTC)
afuna: Cat under a blanket. Text: "Cats are just little people with Fur and Fangs" (Default)
From: [personal profile] afuna
pesky variable!

Okay, I think this should catch it:

var string position = ($*entry_metadata_position == "top") ? " top-metadata" : " bottom-metadata";

Then look for somewhere where it says "metadata$position" and change that to just "metadata".

Date: 2010-06-06 05:15 pm (UTC)
afuna: Cat under a blanket. Text: "Cats are just little people with Fur and Fangs" (Default)
From: [personal profile] afuna
Nope! We'll be right here! Have fun, and you're welcome *g*

Profile

Dreamwidth style system discussion

April 2025

S M T W T F S
  12345
6 78910 1112
13 141516171819
2021 2223242526
27282930   

Style Credit

Expand Cut Tags

No cut tags
Page generated Jun. 5th, 2025 03:25 am
Powered by Dreamwidth Studios