• amboycharlie

    (@amboycharlie)


    I’m trying to line up two images in my header one that has my logo on it and one that repeats. I tried this in the script: <div id=”hdrimg”><div id=hdrdiv> with this
    in the CSS file #hdrimg {background: url(“images/hdrimg.png”); background-repeat: no repeat;} and #hdrdiv {background: url(“images/hdrdiv.png”); background-repeat: repeat-x;} and got nothing. This is how I hve seen it done before but there maybe something I haven’t seen in the php code. It’s totally intuitive in tables using Dreamweaver but this ain’t Dreamweaver. Can anybody help?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Doodlebee

    (@doodlebee)

    So, let me se eif I understand your question: you want to have two images in one div. One is just the image, while the other would be the div’s background?

    Why don’t you just to do this:

    <div id="hrdiv">
    <img src="images/hdrimg.png" width="" alt="" height="" />
    </div>

    CSS:

    #hrdiv {
    background_image:url(“images/hdrdiv.png”);
    background-repeat:repeat-x;}

    If you need to adjust the position of your background, just stick that in there, too. But there’s no reason (and honestly, no way) you can set two background images in one div container. I’m guessing the way you have it set up, the background for “hdrdiv” was showing up, and your logo was not? That’s because you have one div nested inside th e other, and the second one is overriding the first (if you commented out the hrdiv ion your HTML, I bet the logo background would show up – it’s there, it’s just being overlaid by the next div container)

    spencerp

    (@spencerp)

    I think ya mean this rather doodlebee.. =P

    #hrdiv {
    background:url("images/hdrdiv.png");
    background-repeat:repeat-x;}

    Well, that’s what I use anyway… =D Or maybe I’m missing something here.. =/ It’s possible though, could be that I’m not quite awake yet or something LoL!

    spencerp

    moshu

    (@moshu)

    Seemingly not awake yet ?? What doodlebee suggested is
    1. one bg image for the div (the repeat one)
    2. one “normal” image called into the same div, not as bg but simple img

    spencerp

    (@spencerp)

    Hahaha, yeah..must not be awake lol! I guess when I first seen it, the underscore between the words: background and image, threw me off a little bit. =P [slaps self] to wake up, wake up spencerp! wake up! LoL

    Me sorry about that doodlebee.. =(

    spencerp

    Doodlebee

    (@doodlebee)

    sorry ’bout that – should be “background-image:url();” – I get shift happy sometimes ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Using no repeat and repeat-x images in one div’ is closed to new replies.