Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 6 of 6
  1. #1
    Junior Member
    Join Date
    Dec 2007
    Posts
    2
    Member #
    16187
    I just recently converted my .PSD web file layout into HTML and CSS code using the slices and imageready. With 800x600 resolution the page showed up great on all browsers. However, when I moved my resolution up to 1024x768 I immediately noticed it was not centered. Ok now that goes on to my first question. How do I center my <div> when it is already in absolute positioning? I tried something like:
    body, html {
    margin:0 auto;
    text-align: center;
    }
    #wrapper {
    margin:0 auto;
    text-align:left;
    padding:0;
    }

    Then I proceeded to code my other divs. Still was not centering:angry: Any advice? I also have another question regarding CSS and rollover images/links. Is there anyway to input sound effects whenever a link is hovered? Or is that something relating more to javascripting?
    Finally I have one more question regarding background music. I used the <bgsound> tag in my body, plays fine on IE but doesn't play on Firefox. Whenever I used the <embed> tag it would prompt the ActiveX menu and keep it from autostart. I know there has to be an easy explanation for this. Thanks in advance

  2.  

  3. #2
    Senior Member hyperair's Avatar
    Join Date
    May 2005
    Posts
    452
    Member #
    9892
    Your other divs should be inside <div id="wrapper"></div>, in case you didn't already do that.

    The <bgsound> tag is proprietary. This means it only works in IE. Also, <bgsound> has no controls (you can't enable them either). This can get irritating. Personally I hate it when a site I go too has some music playing. Disturbs my own music.The first thing I do is to turn it off.

    Your best bet is to use <embed>. There should be a way around to avoid the ActiveX dialogue, but I don't know how.
    Hyperair

  4. #3
    Junior Member
    Join Date
    Dec 2007
    Posts
    2
    Member #
    16187
    Quote Originally Posted by hyperair
    Your other divs should be inside <div id="wrapper"></div>, in case you didn't already do that.

    The <bgsound> tag is proprietary. This means it only works in IE. Also, <bgsound> has no controls (you can't enable them either). This can get irritating. Personally I hate it when a site I go too has some music playing. Disturbs my own music.The first thing I do is to turn it off.

    Your best bet is to use <embed>. There should be a way around to avoid the ActiveX dialogue, but I don't know how.
    I'll have to go over all my code again, but I am pretty sure everything was contained in the <div id="wrapper"> Rest of content </div>.

    As for the background music, I usually don't consider the thought of including it on my sites. However, the site I am creating right now is ambient themed. I used the <embed> tag but it never autostarts even though in the tag I type autostart="true".
    I know these are newbie questiosn to most of you, but I'd greatly appreciate anyone who can help. Thanks.

  5. #4
    Senior Member hyperair's Avatar
    Join Date
    May 2005
    Posts
    452
    Member #
    9892
    Change the #wrapper section in your CSS code:
    Code:
    #wrapper
    {
    left: 50%;
    margin-left: -<that column's length divided by two>px;
    *other code*
    }
    I think that should work.

    Could you show us the page in action? Or at least post it here.
    Hyperair

  6. #5
    Senior Member Shani's Avatar
    Join Date
    Nov 2004
    Posts
    1,140
    Member #
    8171
    The absolute position might be the problem. Try using relative instead.

    As far as the sound is concerned, I would Google for a player that you can control the size. Though, I'm 100% with hyperair: ambient or not, I don't want to hear anything when I navigate a page. The only way I know to put sound effects on a button is to make the button a .swf. If there are other ways, let's hope someone else will respond to your post to enlighten both of us :-)
    Shani

    I have an eye for detail like you'd never believe.

  7. #6
    Senior Member hyperair's Avatar
    Join Date
    May 2005
    Posts
    452
    Member #
    9892
    Ah yes, absolute positioning. I totally didn't see that. Anyway my second method works for absolute positioning I should think. =)
    Hyperair


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 12:00 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com