basic html, can somebody teach me about html.... |
![]() ![]() |
basic html, can somebody teach me about html.... |
Mar 24 2006, 06:45 AM
Post
#1
|
|
![]() ][»hottiebheibi«][ ![]() ![]() ![]() Group: Member Posts: 44 Joined: Aug 2005 Member No: 220,763 |
first and foremost, im a med student not a computer student, so please bear with me
if the code is <div id="bheibi"> it will be #bheibi *right? and <div class="sweet" it will be .sweet right? but, what if the codes are: <img id="pic"> <img class="pic2"> <p id="yes"> <table id="pink"> <a class="blue"> <ul id="black"> and <div id="xanga"> <h2> XANGA BLOG </h2> <div class="buttons"> <ul> <li> <table id="red"> <tr> <td> <ul id="purple"> <li class="violet"> <img class="color"> how do i edit this things??? |
|
|
|
Mar 24 2006, 09:51 AM
Post
#2
|
|
![]() You'll find me in your dreams. ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Official Member Posts: 8,536 Joined: Mar 2005 Member No: 114,010 |
Same way. Doesn't matter if it's a table, image, list or paragraph. All id's must be unique. Meaning you don't have a <img id="blue" scr="" alt=""> and a <div id="blue"> in the same page. Class, however, can be applied to multiple things. You can have a <img class="blue" scr="" alt=""> and a <div class="blue"> in the same page... Not that you would want to.
But, to simplify coding, your class/id should reflect what it contains or does. |
|
|
|
Mar 26 2006, 09:19 AM
Post
#3
|
|
![]() ][»hottiebheibi«][ ![]() ![]() ![]() Group: Member Posts: 44 Joined: Aug 2005 Member No: 220,763 |
but how am i going to edit the <ul> in the div? or img under the div?
|
|
|
|
Mar 26 2006, 09:56 AM
Post
#4
|
|
![]() ;) ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Staff Alumni Posts: 9,573 Joined: Feb 2005 Member No: 99,124 |
Just add ul or img to css like below.
CODE <style type="text/css">
ul{ color: #000000; background-color: #FFFFFF; font family: Arial; font-size: 12pt; } img{ color: #000000; background-color: #FFFFFF; font family: Tahoma; font-size: 8pt; } </style> |
|
|
|
Mar 26 2006, 11:21 AM
Post
#5
|
|
![]() You'll find me in your dreams. ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Official Member Posts: 8,536 Joined: Mar 2005 Member No: 114,010 |
Er... A list/img within a div? Let's say it looked as follows:
CODE <div id="boo"> Then you could do your css like follows:<ul><li>This is a list item in an unordered list.</li></ul> <img src="URL" alt="Image with boo."> </div> CODE <style type="text/css"> Which would make all ul tags in the div "boo" display @ 12pt Arial in black with a circle for a bullet point. Learn more about style-types here. Then, all the images in the "boo" div would display as 200px wide with no border. You can do that for p-tags and so forth too. But p-tags are better to use "class" on. For further CSS (and mountains of other stuff) reference, visit w3schools.com.
#boo ul{font: 12pt Arial #000000; list-style-type: circle;} #boo img{ width: 200px; border: 0px solid #000000;} </style> |
|
|
|
Mar 27 2006, 04:17 AM
Post
#6
|
|
![]() ][»hottiebheibi«][ ![]() ![]() ![]() Group: Member Posts: 44 Joined: Aug 2005 Member No: 220,763 |
tnx... now i know better... :)
|
|
|
|
![]() ![]() |