Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS twentytwelve theme css mess

  • This topic is empty.
Viewing 15 posts - 1 through 15 (of 22 total)
  • Author
    Posts
  • #43318
    jknetdesign
    Participant

    [Your text to link here…](http://www.proto.annethullfineartdesigns.com/anne-thull-fine-art-designs/http://www.proto.annethullfineartdesigns.com/anne-thull-fine-art-designs/”)

    This header is what it needs to look like but I know it’s not proper. I can’t select the H2 tagline text and it’s all over the place on the iPhone. Should I avoid absolute positioning? Should I put new divs above the hgroup or inside?

    #127843
    Paulie_D
    Member

    >Should I avoid absolute positioning?

    Like the plague.

    #127848
    Paulie_D
    Member

    To expand further.

    Generally, we read left to right and from top to bottom (excepting, of course, those that don’t) but that generality is fundamental to, say, websites in English.

    As such, we should try to structure our HTML in the same way. If your logo/hgroup is top-left it should come before anything else in your HTML…and so on.

    That way there is little need to move things about with absolute &/or relative positioning.

    #127885

    Hey jk,
    I noticed a couple of things that are causing your issue

    1. You are using clear:both; on the search form and on all h1 tags.
    2. But then you are overwriting the clear:both using positioning attributes
    3. This will be a never ending battle when building a responsive site and a lot of unnecessary CSS

    I would recommend that you

    1. Remove position attributes from all elements in your header
    2. Look at using clear:right on search from instead of clear:both
    3. Remove the clear:both from h1 and h2 tags
    4. Re-position elements using margin and padding

    * Side note I would look at removing the clear:both from your h1, h2,h3, h4, h5, h6 elements and create a class that you call only when you need to use the clear:both attribute.

    If this does not work for you try putting the code in Codepen an leaving us a link here.

    #127905
    Paulie_D
    Member

    To be honest, I would consider re-structuring the whole header; putting things in the right order and using padding/margins to settle things in place rather than ANY positioning.

    That’s not to say that positioning doesn’t have it’s place but overuse can lead to problems later.

    I’m also confused why your logo h1 is ALL an image but your h2 isn’t. Wouldn’t it make sense to just use one image &/or actual text in the h1/h2 with the appropriate font-family. Granted the AT logo probably needs to be an image…but the rest of it…nah.

    As for the navigation, I’m unsure why the background image has been applied to the ‘body’ instead of just the navigation ‘ul’.

    #127912
    Paulie_D
    Member

    >Appropriate font styling is easier said than done when it comes to the designer.

    Does that mean you don’t have access to the font used for the h1 text (excluding the AT ‘logo’)?

    #127913
    Paulie_D
    Member

    For the nav bg image, I’m not sure how much flexibility there is in the 2012 theme. Does everything have to be inside a single wrapper with the ‘site’ class?

    #127930
    Paulie_D
    Member

    You can’t put PHP in Codepen.

    You have to give us the HTML output

    #127972

    jk take a look at [http://codepen.io/doublea79/pen/ItJFj](http://codepen.io/doublea79/pen/ItJFj “Code PEN link”)

    I commented on some of your HTML and made some suggestions

    #128004
    Paulie_D
    Member

    No CSS?

    #128311

    jk ,

    line 138 on your style.css



    .site-content {
    width:725px;
    }

    This should be removed or converted to %;

    #128305
    Paulie_D
    Member

    The h2 will, unfortunately, need to be moved padding-left & negative margin..(I think that’s the best way).

    Try this:

    .site-header h2 {
    color: #000000;
    font-family: “jbt-annabelle”, sans-serif;
    font-size: 20px;

    padding-left: 75px <--
    margin-top: -25px; <---
    }

    #128308
    Paulie_D
    Member

    On your searchform

    #searchform {
    float: right;
    clear: right;
    top: 55px; <-- this is doing nothing...you can remove it
    }

    #128323
    Paulie_D
    Member

    On the menu, I do think you should remove the ‘red’ bg image from the [body] and apply it to the .main-menu-container element.

    We can work on the full width after it’s in the right place.

    Let me work on something…

    EDIT: Here we go…http://codepen.io/anon/pen/EvcCg

    Preserves your current wrapper system…

    #128392
    Paulie_D
    Member
Viewing 15 posts - 1 through 15 (of 22 total)
  • The forum ‘CSS’ is closed to new topics and replies.