Results 1 to 10 of 10

Thread: Header width 1280

  1. #1
    Join Date
    Feb 2008
    Posts
    18
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Header width 1280

    I've banner in my header set to the width of 1280px. It sits perfect in Firefox but it doesnt sit flush in IE. I think this because of the scrolling bar down the side which I will need.

    Is there anyway to work around this or do I just need to cut my banners a bit shorter and apply a background style to my banner for firefox.

    any help would be great, here is a sample of the site

    http://www.dan-cepromotions.co.uk/te...strainmain.htm

  2. #2
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default

    1280 wide monitors are far from being standard, so I would suggest you use that as a background image so the user doesn't receive the horizontal scroll bar if he/she doesn't have their resolution set to that

  3. #3
    Join Date
    Feb 2008
    Posts
    18
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    I have it running through some javascript at the moment so its a new picture on refresh.
    Are you saying it would be better set up as a style in the css as a background-image?

  4. #4
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default

    Are you saying it would be better set up as a style in the css as a background-image?
    yes

    Code:
    div#banner {
         background: #hexadecimal_color_code url('/path/to/banner/image') no-repeat top left;
    }
    the color code is a backup incase for some reason the image doesnt load, your page will not look entirely off.

  5. #5
    Join Date
    Feb 2008
    Posts
    18
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    So I'll have to set up a different style for each banner picture I have?

  6. #6
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default

    if you are showcasing them in a gallery then I would leave them the same, however it appears like you are just using javascript to load a new image every time... You could modify the javascript to apply the background image to the element rather then parse it into the top.

  7. #7
    Join Date
    Feb 2008
    Posts
    18
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    not 100% sure how to change the js

    would that be adding in something like:

    Code:
    .style.backgroundImage = "url('filename.jpg')";

  8. #8
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default

    Code:
    element.style="background: #hex url('url/file.ext') no-repeat top left";
    however I am not sure if that is supported in all javascript versions you may have to do similar to how you declared it

    Code:
    element.style.background-color="#hex_color_code";
    element.style.background-image="url('url/file.ext')";
    element.style.background-repeat="no-repeat";
    element.style.background-position="top left";

  9. #9
    Join Date
    Feb 2008
    Posts
    18
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    brillant, i'll try that out tomorrow!

  10. #10
    Join Date
    Feb 2008
    Posts
    18
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    I can't seem to get this to work, I think trimming down the graphics might be the easiest way to work around this.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •