WordPress.org

Forums

Help me with a few quirks (7 posts)

  1. ccheaton
    Member
    Posted 10 years ago #

    On my personal blog:
    http://www.publichealthcenter.com/blogs/clay/index.php
    there are a few funky things happening with the title at the top. First of all, what I want is to position the blog name near the bottom-left of the image up top. If I try to put any more padding-top on the #header, then the image starts to repeat. It's currently at 30px.
    The second funny thing is that the #header background-image is actually 120px tall, but starts to repeat if I set the height of the #header to anything more than 88px. Why can't I set the height to 120px?
    I really don't know enough about CSS to figure out what I'm doing wrong here. Any help would be appreciated.
    Thanks!

  2. Mark (podz)
    Support Maven
    Posted 10 years ago #

    #header {
    margin-top: 0;
    margin-bottom: 0;
    background-image: url(wp-images/banners/rotate.php);
    width:760px;
    height: 120px;
    background-repeat: no-repeat;
    font: italic normal 36px 'Times New Roman', Times, serif;
    text-align: left;
    letter-spacing: 0.2em;
    padding: 70px 10px 0px 15px;
    }
    This seems to work using the FF devbar. I think though that one of your images was only 117px - one of the dog ones ?

  3. ccheaton
    Member
    Posted 10 years ago #

    Ok... now for more ignorance. What is the FF devbar, does it make this stuff easier, and where can I get it? =)

  4. Mark (podz)
    Support Maven
    Posted 10 years ago #

  5. Root
    Member
    Posted 10 years ago #

    It is important for the wider readership to recall that in the default index the *title* is marked up as <h1 id="header">. This is deceptively simple and clearly causes a lot of users difficulty when they want to develop the head section. We need to remember what we have here is simply an h1 tag. It is important to bear in mind, therefore; that regardless of what we put in the #header that the h1 is still h1. It has default (browser dependent) characteristics of its own including huge margins top and bottom built in.
    It is a block level element and will be full width also by default.
    In this case I can't locate any h1 styling in the CSS at all. Furthermore in the CSS in #header I notice voluminous amounts of padding both horizontal and vertical. The difficulty is that the header is set as fixed width and height. The vertical padding is causing the content push down. Heck knows what is going on in other browsers because the two main browser families are calculating the height and width in completely different ways.
    I hope you do not mind if enunciate Root's first rule of (Simple) CSS positioning which is :
    Unless you feel comfortable and qualified to deal with all the issues which are going to follow and know the necessary hacks and workarounds it is always best to avoid a fixed width or height with any kind of padding at all
    In a tight header a one px border is also quite enough to bork your layout and should also be avoided if possible. If not then you need to add twice the border width to the container (#rap) for the border. HTH.

  6. ccheaton
    Member
    Posted 10 years ago #

    Hmm.. Ok. Since h1 is quirky, I tried just adding another div, called TopTitle, and getting rid of the fixed height and width, but retaining the padding. That visually accomplishes what I was trying to achieve, but leaves me with a feeling that I did something wrong. Heh. It looks almost the same in FF and IE on my computer.
    Is there any easy way or automated way to scan your CSS file to see what you're not using, to help make it easier to clean up?

  7. Root
    Member
    Posted 10 years ago #

    There is a CSS tidying tool somewhere on the net. try MaxTs blog. I have temporarily mispaced all my bookmarks Thank you Firefox. You did nothing wrong at all in adding to the index. Its your file and we have all hacked it about. There is a case for not adding too many extra divs etc, but a few extra hooks are IMHO essential. Glad you are rocking now.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.