WordPress.org

Ready to get started?Download WordPress

Forums

contents of index.php head tags breaks css layout? (6 posts)

  1. rae
    Member
    Posted 9 years ago #

    hi folks.
    first thing, i've been lurking around these forums for a while now, trying to absorb enough information to get my own wp install up and running, and i must admit this is one of the most useful resources out there. :)
    now on to my query. i've been working on my own basic two column layout (loosely based on the human condition style from the style comp) and whenever i apply the .css file to my very slightly hacked index.php it breaks the alignment of the 'rap' div.
    through trial and error i narrowed it down to the point where i know that the problem is being caused by code located between the start of the index.php file and the body tag, but what exactly i have no idea. it's literally a cut and paste from the default index.php.
    for example...
    http://digitalsprawl.cx/example.htm works
    http://digitalsprawl.cx/example.php does not
    exactly the same file, just the extension has been changed to enable the parsing of the php code.
    so my query is this. is there a known issue with the default index.php which causes css to break this way (i couldn't find anything when searching, but admittedly i may just not have phrased my search terms correctly) and if so, how do i work around the problem?
    if anyone wants to check out the original layout, it's located at http://digitalsprawl.cx/test.htm and my hacked index.php (currently named test.php to prevent breaking my site) page is at http://digitalsprawl.cx/test.php.
    if anyone's able to help me figure this one out i'd appreciate it.
    thanks muchly,
    rae.

  2. DianeV
    Member
    Posted 9 years ago #

    I'm not sure what you mean by "this way", so I'm going to have to guess. (The example.htm page is not helpful because it's just a plain page.)
    If you're talking about the way the image at the top is slightly misaligned, I doubt that that has anything to do with what's in the <head> tags. You'll have to play with the placement in the CSS file to correct it.
    If this is not the problem, could you identify what precisely *is* the problem?

  3. Mark (podz)
    Support Maven
    Posted 9 years ago #

    I've had a look, and I'm a bit stumped too.
    The content shouldn't need to float left, but the rap looks fine.
    I think there is a width issue somewhere, but no playing around with the css can get the content into where you want it. Very odd..

  4. Anonymous
    Unregistered
    Posted 9 years ago #

    apologies DianneV, i guess i wrote that post when i was a little tired (full day at work and then uni, and 2-3 hours trying to fixed the darn code on top of that!). you and podz have it though - i meant how the contents of the page (the two header images and the post) have been bumped towards the left somehow, and the menu has shifted right.
    i've done everything i can to play with the css to fix the alignment yet nothing seems to work. the css works fine on the example file when it's being parsed as html yet not when it's being parsed as php, and the only php in my example pages is in the header tags! (bzuh?)
    i think (and i should have tried this last night but it only occured to me this morning) that i'll try the .css file on the default index. i didn't actually do any major layout hacks, so it should still work. if i still have the problem it's the css, if i don't then i must have broken something when i hacked the index page.
    thanks for your help so far, and i'll see how i go with this today.
    rae

  5. DianeV
    Member
    Posted 9 years ago #

    Okay, looking at your CSS; I'm no Eric Meyer, but I'll give it a shot:
    #header {float:center}
    To my knowledge, there is only float:left and float:right, so float:center won't float anything ... which may be why it's not aligning properly.
    Well ::cough:: I tried to look at images/header.jpg to ensure that I'm looking at the right CSS code, but was presented with a message that I'm trying to steal your bandwidth. I assure you, I'm not. LOL But can't help you much further there.

  6. Root
    Member
    Posted 9 years ago #

    I would not have thought that float: center is part of the W3C recommendation for CSS 2.1 at all :) Sadly I can not access the blog or CSS at the moment to look.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.