Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

css image problem

  • 26-04-2007 03:00PM
    #1
    Closed Accounts Posts: 2


    Hi all... I am new to xhtml and css.. but am noticing how much css makes xhtml.. but the main problem I am having is loading some of my graphics/photos into the site ..

    #buttonbar
    {
    width: 800px;
    height: 207px;
    margin: 0;
    background-image: url(images/buttonbar.gif);
    }


Comments

  • Closed Accounts Posts: 7,144 ✭✭✭DonkeyStyle \o/


    ...works for me, what's the problem, are they just not showing up? or are they misaligned?
    I'd try the images/buttonbar.gif bit with/without single quotes and/or try a leading forward-slash... think I had some picky server stuff happening with that before.
    eg: url('/images/buttonbar.gif')

    Also check whether you're using the right letter case in the path and filenames... eg. ButtonBar.GIF or whatever


  • Registered Users, Registered Users 2 Posts: 102 ✭✭sdssarah


    id try using

    #buttonbar
    {
    width: 800px;
    height: 207px;
    margin: 0;
    background-image: url(./images/buttonbar.gif);


  • Registered Users, Registered Users 2 Posts: 29 conordarcy


    maybe its because its an id (#buttonbar)
    you can only use these once on a page.
    change it to a class (.buttonbar) and change the html page where it says id="buttonbar" to class="buttonbar"

    .buttonbar
    {
    width: 800px;
    height: 207px;
    margin: 0;
    background-image: url(images/buttonbar.gif);
    }

    i'd need to see the html code and the full css file to be certain though.


Advertisement