height in css

Discussion in 'HTML' started by Lenny_la9, Oct 30, 2003.

  1. Lenny_la9

    Lenny_la9 Guest

    Hi,

    I'm trying to display a thin bar (5px in height) with a background image.
    The bar div layer seems to be ignoring the height attribute I set in the css
    file and drawing the layer at about 20 pixels, making the graphic tile
    vertically.

    The problem page is located at: http://www.bwgarage.co.uk/css_test

    Can anyone offer any help?

    Thanks.
     
    Lenny_la9, Oct 30, 2003
    #1
    1. Advertising

  2. Lenny_la9

    Richard Guest

    Lenny_la9 wrote:

    > Hi,


    > I'm trying to display a thin bar (5px in height) with a background
    > image.
    > The bar div layer seems to be ignoring the height attribute I set in
    > the css
    > file and drawing the layer at about 20 pixels, making the graphic tile
    > vertically.


    > The problem page is located at: http://www.bwgarage.co.uk/css_test


    > Can anyone offer any help?


    > Thanks.




    If the coding is being ignored, check your syntax. It could be as simple as
    : and ; and }.
    Is the image 5 or 4 pixels high? Could make a big difference.
    But why use an image within it? Why not make the entire line an image? Then
    all you need to do is place the image.
     
    Richard, Oct 31, 2003
    #2
    1. Advertising

  3. Lenny_la9

    informant Guest

    "Richard" <anom@anom> wrote in message news:...
    > Lenny_la9 wrote:
    >
    > > Hi,

    >
    > > I'm trying to display a thin bar (5px in height) with a background
    > > image.
    > > The bar div layer seems to be ignoring the height attribute I set in
    > > the css
    > > file and drawing the layer at about 20 pixels, making the graphic tile
    > > vertically.

    >
    > > The problem page is located at: http://www.bwgarage.co.uk/css_test

    >
    > > Can anyone offer any help?

    >
    > > Thanks.

    >
    >
    >
    > If the coding is being ignored, check your syntax. It could be as simple

    as
    > : and ; and }.
    > Is the image 5 or 4 pixels high? Could make a big difference.
    > But why use an image within it? Why not make the entire line an image?

    Then
    > all you need to do is place the image.


    Did you actually look at the page in question, Mr. Bullis?
     
    informant, Oct 31, 2003
    #3
  4. Lenny_la9

    Brett Guest

    Use background-repeat: repeat-x; inside your #bar in your new.css file. Like
    the following:

    #bar
    {
    position: absolute;
    top: 0px;
    left: 0px;
    width: 100%;
    height: 5px;
    margin: 0px;
    padding: 0px;
    background-image: url(bar.jpg);
    background-repeat: repeat-x;
    z-index: 1;
    }

    --
    Brett
    Provision Tech
    http://www.provisiontech.net

    "Lenny_la9" <> wrote in message
    news:bns20g$bs9$...
    > Hi,
    >
    > I'm trying to display a thin bar (5px in height) with a background image.
    > The bar div layer seems to be ignoring the height attribute I set in the

    css
    > file and drawing the layer at about 20 pixels, making the graphic tile
    > vertically.
    >
    > The problem page is located at: http://www.bwgarage.co.uk/css_test
    >
    > Can anyone offer any help?
    >
    > Thanks.
    >
    >
     
    Brett, Oct 31, 2003
    #4
  5. Lenny_la9

    Richard Guest

    Brett wrote:

    > Use background-repeat: repeat-x; inside your #bar in your new.css
    > file. Like
    > the following:


    > #bar
    > {
    > position: absolute;

    top:: 0px;
    > left: 0px;
    > width: 100%;
    > height: 5px;
    > margin: 0px;
    > padding: 0px;
    > background-image: url(bar.jpg);
    > background-repeat: repeat-x;
    > z-index: 1;
    > }


    Got to ask, why a z-index with a minor image?






    > --
    > Brett
    > Provision Tech
    > http://www.provisiontech.net


    > "Lenny_la9" <> wrote in message
    > news:bns20g$bs9$...
    >> Hi,


    >> I'm trying to display a thin bar (5px in height) with a background
    >> image.
    >> The bar div layer seems to be ignoring the height attribute I set in
    >> the

    > css
    >> file and drawing the layer at about 20 pixels, making the graphic tile
    >> vertically.


    >> The problem page is located at: http://www.bwgarage.co.uk/css_test


    >> Can anyone offer any help?


    >> Thanks.
     
    Richard, Oct 31, 2003
    #5
  6. Lenny_la9

    Lenny_la9 Guest

    Thank you,this works fine.

    I'm using z-order because this will go up to make a more complicated page in
    the end.

    Thanks

    "Richard" <anom@anom> wrote in message
    news:...
    > Brett wrote:
    >
    > > Use background-repeat: repeat-x; inside your #bar in your new.css
    > > file. Like
    > > the following:

    >
    > > #bar
    > > {
    > > position: absolute;

    > top:: 0px;
    > > left: 0px;
    > > width: 100%;
    > > height: 5px;
    > > margin: 0px;
    > > padding: 0px;
    > > background-image: url(bar.jpg);
    > > background-repeat: repeat-x;
    > > z-index: 1;
    > > }

    >
    > Got to ask, why a z-index with a minor image?
    >
    >
    >
    >
    >
    >
    > > --
    > > Brett
    > > Provision Tech
    > > http://www.provisiontech.net

    >
    > > "Lenny_la9" <> wrote in message
    > > news:bns20g$bs9$...
    > >> Hi,

    >
    > >> I'm trying to display a thin bar (5px in height) with a background
    > >> image.
    > >> The bar div layer seems to be ignoring the height attribute I set in
    > >> the

    > > css
    > >> file and drawing the layer at about 20 pixels, making the graphic tile
    > >> vertically.

    >
    > >> The problem page is located at: http://www.bwgarage.co.uk/css_test

    >
    > >> Can anyone offer any help?

    >
    > >> Thanks.

    >
    >
    >
    >
    >
     
    Lenny_la9, Oct 31, 2003
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    581
  2. Wotney
    Replies:
    1
    Views:
    549
    Flinky Wisty Pomm
    Oct 25, 2006
  3. tshad
    Replies:
    1
    Views:
    1,733
    bruce barker
    Mar 8, 2007
  4. Bernd Meier
    Replies:
    6
    Views:
    546
    GTalbot
    Jan 14, 2008
  5. samer
    Replies:
    3
    Views:
    460
    Gregory A. Beamer
    Sep 28, 2009
Loading...

Share This Page