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 5 of 5

Thread: quick question

  1. #1
    Senior Member
    Join Date
    Jan 2014
    Posts
    392
    Member #
    38172
    Liked
    4 times

    quick question

    so im making a test page. in the body i have a paragraph in a blockquote and below that an anchor. the anchor is below the blockquote like it should be but it wont center.

    i thought that if i specified in css that the body should have a width of 400 px, and text-align to center that the anchor should appear below the blockquote in the middle. right?

  2.  

  3. #2
    Senior Member
    Join Date
    Jan 2014
    Posts
    392
    Member #
    38172
    Liked
    4 times
    fixed. had positioning set in the blockquote...

  4. #3
    Senior Member
    Join Date
    Jan 2014
    Posts
    392
    Member #
    38172
    Liked
    4 times
    new problem, when i left itas just an anchor tag it aligned perfectly in the center below the blockquote. so i went about setting some css for it to be a button. i set the width the same as the blockquote, (320px) height to 25px display to block and background to white. as soon as i did this the button jumped about 40px to the left leaving it out of line with the blockquote.

    when i set the width of the button to the same as the body it re-centered itself.

    why would it align in the center as an anchor but move to the very left of the body once i change it to a button?????
    i know i can fix it by doing margin-left but it should be in the center right?
    Last edited by coleio; Jan 28th, 2014 at 03:38 AM.

  5. #4
    Senior Member DC Web Design's Avatar
    Join Date
    Jan 2014
    Location
    Washington, DC
    Posts
    128
    Member #
    38178
    Liked
    37 times
    Okay, you really need to start linking to the stuff you're working on. Or at least putting up sample code on something like JSFiddle. Would make it much easier to diagnose your problems.

    If you switched the "a" (display: inline; by default) tag to a "button" (display: inline-block; by default) tag, it's going to cause some issues with the box model.

    Something else to read: The CSS Box Model | CSS-Tricks

  6. #5
    Senior Member
    Join Date
    Jan 2014
    Posts
    392
    Member #
    38172
    Liked
    4 times
    sorry, page is here.....
    learning this ****

    another thing, i wanted to apply a hover to the buttons so i checked the w3 website and followed instructions. that was in css do this...

    a: hover { background-color: white or whatever;}
    but that didnt work, then tried to add it to the .button css and no luck again. whats up?


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 10:26 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2020 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com