SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    May 2002
    Location
    London, UK
    Posts
    96
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question fluid screen size / CSS question

    Hi all.

    I'm designing a site using css & % widths so that it'll (hopefully) be resolution independent. Distinct content areas are split into 'boxes' using floating <div>'s, & my question is this:

    If I want to surround the <div> boxes with graphic borders, is there any way to dynamically set the width (or height) of each border using a 1px-wide image which will be repeated for the length of the <div> box? I'm sure I saw a tutorial on the subject, but didn't bookmark it .

    Any help/advice/links appreciated.

  2. #2
    We like music. weirdbeardmt's Avatar
    Join Date
    May 2001
    Location
    Channel Islands Girth: Footlong
    Posts
    5,882
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What do you mean dynamically? Dynamic based on what?
    I swear to drunk I'm not God.
    Matt's debating is not a crime
    Hint: Don't buy a stupid dwarf Clicky

  3. #3
    SitePoint Enthusiast
    Join Date
    May 2002
    Location
    London, UK
    Posts
    96
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorry, I guess I didn't explain myself well. By dynamically, I mean for example if I set a <div> width to 30%, then the width would correspond to 30% of 640px, 800px, 1024px, etc. So I'd like to know if it's possible to get a border image to 'dynamically' shrink or grow to fit the <div>, as opposed to being a set pixel-width.

    Hope it makes more sense now

  4. #4
    SitePoint Member
    Join Date
    Jun 2002
    Location
    Baltimore, MD
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    use the
    Code:
    1.5em
    tag... not exactly how you want to do it, but I am pretty sure this is what you need to do, but I suck at explaining things. So I recommend just doing a search on google or such to explain it to you and see if that is more what you are looking for.


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
  •