These forums are currently read-only due to receiving more spam than actual discussion. Sorry.

It is currently Sat Dec 02, 2017 4:11 pm Advanced search

Can't style objects with html 5 tags

Here you can discuss things related to HTML and the Web in general that do not fit in to other categories.

Can't style objects with html 5 tags

Postby obiwan » Wed Aug 25, 2010 2:56 pm

Hey folks cant seem to target and style some html tags any tips and help would be greatly appreciated.

Code: Select all
<section class="gmoudle">
    <nav id="gmNav">
      <ul id="gmList">
        <li></li>
        <li></li>
      </ul>
    </nav>
</section>



Here is the basic css that I am using.
Code: Select all
#gmNav
{
   margin:10px 0 0 0;
   width:100%;
   height:auto;
   background:#F60;
}
[/code]
obiwan
<h6>
 
Posts: 1
Joined: Wed Aug 25, 2010 2:45 pm

Postby JAB Creations » Wed Aug 25, 2010 6:00 pm

http://caniuse.com/#feat=html5

If this is true (I wouldn't know since I use XHTML 1.1) then you've made the big mistake of testing your work with Internet Explorer first.

You should never test with IE first, you should always test with standards compliant browsers (Gecko (Firefox), Presto (Opera), and WebKit (Safari)) first and then use conditional comments to fix issues in Internet Explorer.

Also they are called elements, a tag is the first and second (if not a self-closing element) word in the element. In example, "the divisible element is not floating" or, "do I put the attributes on the first or second tag in the divisible element?" are how you would use the terminology correctly. :wink:
User avatar
JAB Creations
<aside>
 
Posts: 566
Joined: Tue Mar 13, 2007 4:48 am
Location: Sarasota Florida, USA

Postby zcorpan » Mon Aug 30, 2010 10:01 am

Maybe you need to specify nav { display:block } (browsers that don't know about the new elements will render them as inline).
zcorpan
<article>
 
Posts: 807
Joined: Tue Feb 06, 2007 8:29 pm
Location: Sweden

Postby freeztar » Thu Sep 09, 2010 9:43 pm

Neither IE 8 nor Firefox 3.6 currently render HTML5 properly. I recommend using Chrome as it seems to do the best with HTML5 at this point. If you view this page using Chrome, you should see your code styled properly. I did not change anything other than adding the "Test#" text.

http://atlcomputerrepair.com/sandbox/whatwg1.html

Btw, did not need display:block, at least in Chrome.
freeztar
<h6>
 
Posts: 2
Joined: Thu Sep 09, 2010 8:38 pm
Location: Atlanta

Postby freeztar » Thu Sep 09, 2010 9:51 pm

JAB Creations wrote:http://caniuse.com/#feat=html5

If this is true (I wouldn't know since I use XHTML 1.1) then you've made the big mistake of testing your work with Internet Explorer first.

That site is inaccurate. Firefox 3.6 does not support all features (not even most) of HTML5. Firefox 4 should fix this.

You should never test with IE first, you should always test with standards compliant browsers (Gecko (Firefox), Presto (Opera), and WebKit (Safari)) first and then use conditional comments to fix issues in Internet Explorer.


While that is good advice, there is no such thing as a standards compliant browser. There are certain browsers that are more standards compliant than others, but none are perfect.

http://www.webdevout.net/browser-support-html
freeztar
<h6>
 
Posts: 2
Joined: Thu Sep 09, 2010 8:38 pm
Location: Atlanta


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 2 guests