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 10 of 10
  1. #1
    Junior Member
    Join Date
    Jun 2011
    Posts
    4
    Member #
    28097
    Hello i create an image to use as top bar... the problem is there is a space at the top, left, right of the screen... i want the image to full feet with the screen...

    the code:

    Code:
    <head>
    <style type="text/css">
    div {background-image:url('image.png');}
    </style>
    </head>
    then is use inside the html by calling with <div> </div>
    here a screen shot...
    http://i52.tinypic.com/vpby1i.png
    i want the blue bar to full feet with the top, left and right
    Thank you in advance.

  2.  

  3. #2
    Senior Member Ronald Roe's Avatar
    Join Date
    Mar 2011
    Location
    Oklahoma City
    Posts
    3,141
    Member #
    27197
    Liked
    959 times
    Add this as the first item in your CSS:

    *{margin:0;padding:0;}
    Ron Roe
    Web Developer
    "If every app were designed using the same design template, oh wait...Bootstrap."

  4. #3
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    I really hate when people use that line, Ronald. You're a smart cat and you know I have respect for you, but that line is flawed, and here's why:
    Code:
    <ol>
    <li>List Item 1</li>
    <li>List Item 2</li>
    </ol>
    If you used that CSS reset, the numbers wouldn't show up. If this were an unordered list and you needed the list item type to show up, it wouldn't, either. A lot of people don't realize what a hornet's nest that reset can become if they're not careful, though.

    The best way to do it is to apply the reset to certain tags:
    Code:
    body, html, div {margin: 0; padding: 0;}
    Since I use other default styles for tags (1em bottom margin for paragraphs and h tags, for example), they're not defined here. But you get the idea.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  5. #4
    Senior Member Ronald Roe's Avatar
    Join Date
    Mar 2011
    Location
    Oklahoma City
    Posts
    3,141
    Member #
    27197
    Liked
    959 times
    Ok, how about this?
    *:not(ul,ol){margin:0;padding:0;}

    And yes, now I'm just trying to show off...
    Ron Roe
    Web Developer
    "If every app were designed using the same design template, oh wait...Bootstrap."

  6. #5
    Junior Member
    Join Date
    Jun 2011
    Posts
    4
    Member #
    28097
    Thanks it works

  7. #6
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    Quote Originally Posted by Ronald Roe, post: 208266
    Ok, how about this?
    *:not(ul,ol){margin:0;padding:0;}

    And yes, now I'm just trying to show off...
    You sure are.

    IE doesn't support the :not selector as far as I know. Then again, I haven't done a thing with CSS3 yet (I figure I'll wait the 10 years before all of the browsers get it together).
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  8. #7
    Senior Member Ronald Roe's Avatar
    Join Date
    Mar 2011
    Location
    Oklahoma City
    Posts
    3,141
    Member #
    27197
    Liked
    959 times
    It doesn't support it.
    For the record, while I didn't know that about ul and ol, I haven't encountered the problem, because the full reset I use adds a 1.3em margin back in. Thanks for the schoolin'
    Ron Roe
    Web Developer
    "If every app were designed using the same design template, oh wait...Bootstrap."

  9. #8
    WDF Staff George Dolidze's Avatar
    Join Date
    Apr 2011
    Location
    Irvine, CA
    Posts
    2,487
    Member #
    27540
    Liked
    416 times
    I looked the :not() up, but I'm still confused as to what it is. Can you explain to me better than those websites that use big words
    My freelancer website: DolidzeDesign



    You only need a parachute if you plan on skydiving twice.

  10. #9
    Senior Member Ronald Roe's Avatar
    Join Date
    Mar 2011
    Location
    Oklahoma City
    Posts
    3,141
    Member #
    27197
    Liked
    959 times
    Basically, it selects everything that isn't in the parenthesis.
    Ron Roe
    Web Developer
    "If every app were designed using the same design template, oh wait...Bootstrap."

  11. #10
    WDF Staff George Dolidze's Avatar
    Join Date
    Apr 2011
    Location
    Irvine, CA
    Posts
    2,487
    Member #
    27540
    Liked
    416 times
    Oh That's pretty useful. Supported by all except IE. No surprise there
    My freelancer website: DolidzeDesign



    You only need a parachute if you plan on skydiving twice.


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