1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

css wild card selector or manual typing

Discussion in 'CSS' started by leadinmarketing, Sep 19, 2014.

  1. #1
    Hey. So in the past with all of my xhtml sites, I downloaded a popular reset-css for and used that in the beginning of all of my css stylesheets. The wild card selector had little support back then. Finally moving over to html5 now

    Should I continue to manually have all of the tags in there or should I be able to get away with just the asterisk wild card selector?

    BTW, I am referring to setting the basic stuff like margin, padding, text decision, etc..

    And I believe I have to set the aside, section, footer, header, nav to display block...
     
    leadinmarketing, Sep 19, 2014 IP
  2. COBOLdinosaur

    COBOLdinosaur Active Member

    Messages:
    515
    Likes Received:
    123
    Best Answers:
    11
    Trophy Points:
    95
    #2
    Mostly wasted effort in my opinion. Other than setting elements to site defaults where those defaults are different than standard browser defaults it is just adding bloat with no benefit.

    All modern HTML5 compliant browsers set the default for aside, header, footer, and section to block. only nav is not block. for older browsers you should be using a shim to define the complete properties of these elements, not just that they should be block. Just defining them as block is technically not corect, as the detailed specification for block-element in HTML5 is derived differently than that used for HTML4 and XHTML.

    This reference might help: https://developer.mozilla.org/en-US/docs/Web/HTML/Block-level_elements
     
    COBOLdinosaur, Sep 20, 2014 IP
  3. leadinmarketing

    leadinmarketing Greenhorn

    Messages:
    56
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    6
    #3
    Cool. Definitely a good reference. I see I need to spend some time on the mozilla site and official documentation. But the official documentation is usually horrible at explaining things. Like that link you posted in the other thread (CSSOM). I just checked it out and started to get a headache. LoL. J/k. But it's 2:30 over here and I'm exhausted. I will have to read that when I get up......... But what are some of the basic things that you start your css off with?
     
    leadinmarketing, Sep 20, 2014 IP
  4. leadinmarketing

    leadinmarketing Greenhorn

    Messages:
    56
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    6
    #4
    Also. Is there a reference that shows all the browser defaults ??
     
    leadinmarketing, Sep 20, 2014 IP
  5. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #5
    For Firefox/Iceweasel, you can type resource://gre-resources/ into the address block. There you will find the internal default stylesheets.

    Browser are now mostly in agreeance on defaults now. IE and Opera used to use one set of rules while Mozilla and Safari used another. Now, all have pretty much settled on the Moz/Safari set. The biggest diffs were not in value, but in application. E.g., IE put 8px padding on html while Moz uses 8px margin on body. Similarly IE used 40px margin to indent lists, while Moz uses 40px padding to indent.

    I speculate these issues triggered the whole global reset silliness; instead of figuring out why, for example, changing list indentions gave different results among browsers, lazy developers just nuked the values and went from there.

    //edit: The primary files of interest are html.css and forms.css ~gt

    cheers,

    gary
     
    Last edited: Sep 21, 2014
    kk5st, Sep 21, 2014 IP
  6. COBOLdinosaur

    COBOLdinosaur Active Member

    Messages:
    515
    Likes Received:
    123
    Best Answers:
    11
    Trophy Points:
    95
    #6
    CSSDOM like all technical specification is very precise, and not something to commit to memory, but without that very technical description of what is required the browser manufacturers would just be going in many different direction trying to lock market share by creating incompatible extensions as we saw in the late 20th century and well into the first decade of the 21st. The manufacturers still try to play game with pretend compliance using hyphen hacks, but even that has been sort of standardized with the W3C designation of experimental implementations. That defeats the manufacturers advantage in creating incompatibilities, because developers are aware that what they support is a hack and we can use fallbacks to protect the integrity of our work.
     
    COBOLdinosaur, Sep 21, 2014 IP