/    Sign up×
Community /Pin to ProfileBookmark

the magic line

I’m baffled by this:

Page 1 – Lines appear: [url]http://www.imperfectsamples.com/website/samples/index.php[/url]

Page 2 – Lines vanish: [url]http://www.imperfectsamples.com/website/samples/braunschweig/braunschweiguprightpiano.php[/url]

The code is identical in both pages- the only difference is the content table. If I make the lines 2pixels high in page 2, it suddenly re-appears, but I can’t work out why. The lines should appear in both pages.

I’ve been trying to fix this for some time, so any help much appreciated.

to post a comment
PHP

9 Comments(s)

Copy linkTweet thisAlerts:
@stephan_gerlachOct 08.2008 — The problem is the src of the image you use.

instead of

[CODE]

src="../images/line.jpg"

[/CODE]


use


[CODE]

src="http://www.imperfectsamples.com/website/images/line.jpg"

[/CODE]



that should fix it.
Copy linkTweet thisAlerts:
@matt9bauthorOct 08.2008 — D'oh!Thanks

  • - very strange that the 2px fix worked!!


  • I have now changed the link in line.html to a root-relative link and it now works. Thanks
    Copy linkTweet thisAlerts:
    @ZnupiOct 08.2008 — Please note the [url=http://www.w3schools.com/TAGS/tag_base.asp]<base> tag[/url]. It's very helpful in such situations. Actually, I can't remember a project I didn't use it in.
    Copy linkTweet thisAlerts:
    @ariellOct 09.2008 — However, as soon as you start to put your stuff in re-usable classes, this tag hardly won't help you anywhere. It's probably safer to define common (session) wars or object return methods that keep watch on the "file system", thus pathes and roots...

    Best from the south.
    Copy linkTweet thisAlerts:
    @ZnupiOct 09.2008 — However, as soon as you start to put your stuff in re-usable classes, this tag hardly won't help you anywhere. It's probably safer to define common (session) wars or object return methods that keep watch on the "file system", thus pathes and roots...

    Best from the south.[/QUOTE]

    What does the <base> tag have to do with re-usable classes?
    Copy linkTweet thisAlerts:
    @ariellOct 09.2008 — ...this is a serious question.

    If you use frameworks, that, for instance, handle files thru abstract classes methods, then what is your base? Hardcoding it every time you change the domain you are programming for? Both absolute and relative pathes are HUNDRED percent server dependent, there's no rule how to setup a file system on a physical machine, not even under Windows(!)

    However, to keep classes re-usable you'll have to find dynamic ways to "obtain" a base, not that static (20y old?) approach of TAGS.

    Best from the south.
    Copy linkTweet thisAlerts:
    @ZnupiOct 09.2008 — ...this is a serious question.[/QUOTE]
    Your sarcasm doesn't impress me.
    Hardcoding it every time you change the domain you are programming for?[/QUOTE]
    Yes. It's not like you're going to program for hundreds of domains at once.
    Both absolute and relative pathes are HUNDRED percent server dependent[/QUOTE]
    No, they're not. They're HUNDRED percent dependent on the code you're writing. If you code your application well, it will be HUNDRED percent server INdependent.
    there's no rule how to setup a file system on a physical machine, not even under Windows(!)[/QUOTE]
    No, but you can make one for yourself and use that throughout your project.
    However, to keep classes re-usable you'll have to find dynamic ways to "obtain" a base, not that static (20y old?) approach of TAGS.[/QUOTE]
    I don't think you actually understand what a <base> tag does. A <base> tag tells [b]the client[/b] where to base its requests to. It doesn't influence the server (or php) with anything. The <base> tag is very useful in projects that use friendly URLs, like http://example.com/profile/user/ , when the profile and user directories don't actually exist. By setting a <base> tag to http://example.com/ , you won't have to specify absolute paths in every <img>, <script>, <style> tags you'll use. This way, the <base> tag actually HELPS with moving an application from a server to another, because all you have to change is your <base> tag, not all your <img>s etc.
    Copy linkTweet thisAlerts:
    @ariellOct 09.2008 — First of all, there was no sarcasm at all, but a fear you might be serious, which is confirmed now.

    Beside the fact that you may feel assured that I have a common understanding of TAGS, "not-even-basis-stuff" as the CLIENT side is, you clearly have no clue what I was talking about in my post - given the fact that your response was serious, too. You tackle a completely different topic, which makes it impossible to go ahead here. While this isn't any relevant and neither bad nor something else, it at least saves the time to further subscribe to this thread.

    Best from the south.

    P.S. Maybe Griffin can help...
    Copy linkTweet thisAlerts:
    @ariellOct 09.2008 — as an (honest) helpful hint I strongly suggest to have a look at "distributed applications" (which among professional components is the main stream of larger to huge web applications), where the programmer doesn't even KNOW which machine (simultaneously) is running on. Good source to learn about the term "independence" from a cs point of view.
    ×

    Success!

    Help @matt9b spread the word by sharing this article on Twitter...

    Tweet This
    Sign in
    Forgot password?
    Sign in with TwitchSign in with GithubCreate Account
    about: ({
    version: 0.1.9 BETA 5.6,
    whats_new: community page,
    up_next: more Davinci•003 tasks,
    coming_soon: events calendar,
    social: @webDeveloperHQ
    });

    legal: ({
    terms: of use,
    privacy: policy
    });
    changelog: (
    version: 0.1.9,
    notes: added community page

    version: 0.1.8,
    notes: added Davinci•003

    version: 0.1.7,
    notes: upvote answers to bounties

    version: 0.1.6,
    notes: article editor refresh
    )...
    recent_tips: (
    tipper: @Yussuf4331,
    tipped: article
    amount: 1000 SATS,

    tipper: @darkwebsites540,
    tipped: article
    amount: 10 SATS,

    tipper: @Samric24,
    tipped: article
    amount: 1000 SATS,
    )...