Jump to content

div ids & classes.


jege

Recommended Posts

Hello. Im quite new for the css styling so I would want some help with divs.

I dont really understand how to end them. like the tag is </div> but how do i know what tag i close then?

 

Lets say ive got this kind of page with divs. How would i end the 'nav' div? just add an </div> after it? this was my problem. i didnt know what of those divs it closes? wrapper, header, headerwrapper or the nav??

 

<div id="wrapper">	
<div id="header">
<div id="headerwrapper">
	<div id="nav">

 

Hopefully someone got time and could make some example how they end.

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/243157-div-ids-classes/
Share on other sites

That doesn't make sense by using //close whatever  this will display on the web page unless you are in php

 

for html

 

<div id="wrapper">

  <div id="nav">

 

</div><!-- end nav -->

</div><!-- end wrapper -->    <!-- space must be used after the (--) and then the (word) followed by space then (--)> to be compliant with w3c validator

 

You can also download PSPAD and when you click a div tag the opposing div tag will highlight

Link to comment
https://forums.phpfreaks.com/topic/243157-div-ids-classes/#findComment-1249653
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.