/    Sign up×
Community /Pin to ProfileBookmark

Two questions

I’m getting the basics of CSS down a little, but I have two questions that I cannot seem to find the answers to.

1.) I would like to make a horizontal menu across the top of the page, but I want it to stay at the top of the page (ie. even if you scroll down) is this possible with CSS or do I still have to have frames for this?

2.) I would like to be able to past text on top of an image, is there a way to make sure that regardless of what the screen resolution it always show around the same spot?

Thanks for you help
Dan

to post a comment
CSS

2 Comments(s)

Copy linkTweet thisAlerts:
@LJKDec 09.2005 — Hi -

Okay, my 2 cents would be:

1. If you have a paragraph with margin:0 auto; and width:100%; [and the body styles include text-align:center; margin:0; padding:0;] and it's the first tag after body and maybe a containing division, then it'll be at the top of the page...

  • 2. I like to set a background image for a div, then the paragraph within it would hold any text.


  • Good luck,

    El
    Copy linkTweet thisAlerts:
    @KravvitzDec 09.2005 — Both of those are possible with CSS.

    I would not recommend that someone without much experience try the first one. Due to IE6's limited support for CSS2 -- IE6 doesn't support [url=http://www.w3.org/TR/REC-CSS2/visuren.html#propdef-position]position:fixed[/url] -- you might need to use some JavaScript to make the menu stay at the top of the viewport.

    The second one is easy if you make the image a background image like LJK sugested.
    ×

    Success!

    Help @xinman 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.17,
    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: @AriseFacilitySolutions09,
    tipped: article
    amount: 1000 SATS,

    tipper: @Yussuf4331,
    tipped: article
    amount: 1000 SATS,

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