Go Back   Computer Forums > Web Design | Website Development > Web Programming
Click Here to Login
Join Computer forums Today


Reply
 
Thread Tools Search this Thread Display Modes
 
Old 05-31-2006, 03:47 PM   #11
BSOD
 
King of Kings's Avatar
 
Join Date: Mar 2006
Posts: 1,072
Default Re: link on a picture

ahh it was a old question about html that I solved myself, thanks anyways
__________________

King of Kings is offline   Reply With Quote
Old 05-31-2006, 03:50 PM   #12
Baseband Member
 
itturnstoashes's Avatar
 
Join Date: May 2006
Posts: 39
Send a message via MSN to itturnstoashes
Default Re: link on a picture

Good job kings.
But this thread MUST go on, so others found out what you solved.
So show us

Root, your code is flawed, in two places.
# should actually be a "." (period)
and id should be class.

Correct me if i'm wrong.
__________________

itturnstoashes is offline   Reply With Quote
Old 05-31-2006, 10:22 PM   #13
BSOD
 
King of Kings's Avatar
 
Join Date: Mar 2006
Posts: 1,072
Default Re: link on a picture

I figured it out using div tags to aligh links wherever u want, not sure if thats how they did it infact its probaly not but thats the best I could find, also for some reason on that site the source is blocked so I cant freaking look !!!! that angers me. I love sources
King of Kings is offline   Reply With Quote
Old 06-01-2006, 06:15 AM   #14
Site Team
 
root's Avatar
 
Join Date: Mar 2004
Posts: 8,006
Default Re: link on a picture

Quote:
Originally Posted by itturnstoashes
Good job kings.
But this thread MUST go on, so others found out what you solved.
So show us

Root, your code is flawed, in two places.
# should actually be a "." (period)
and id should be class.

Correct me if i'm wrong.
OK... I'll correct you. (but you're not wrong)

http://www.w3.org/TR/REC-CSS1
section 1.5 ID as a selector.

the standard is pretty much open to interperatation as to whether you use object classes to style page element or an ID assigned to the element.
neither is given any kind of preference.

So the code I gave was right, however you are also right in that #element can be replaces by .class and id=element can be replaced by class=class
__________________
I didn’t fight my way to the top of the food chain to be a vegetarian…
Im sick of people saying 'dont waste paper'. If trees wanted to live, they'd all carry guns.
"The inherent vice of capitalism is the unequal sharing of blessings; The inherent vice of socialism is the equal sharing of miseries."
root is offline   Reply With Quote
Old 06-01-2006, 11:31 AM   #15
Baseband Member
 
itturnstoashes's Avatar
 
Join Date: May 2006
Posts: 39
Send a message via MSN to itturnstoashes
Default Re: link on a picture

Good. I was hoping I wasn't 100% right. Always room to learn.
I've seen that before, but it's never worked for me. :S
Only my way did, even though i copied your code exaclty, and only changed the two agents i said needed chagning.
But why is css so versatile, it's kind of anoying. Is there REALLY any theory behind it, or do they just ilke to make it so, if they make a mistake, everything will work anyways :P (That was a joke(Because internet jokes are hard to catch))
itturnstoashes is offline   Reply With Quote
Old 06-01-2006, 04:41 PM   #16
Site Team
 
root's Avatar
 
Join Date: Mar 2004
Posts: 8,006
Default Re: link on a picture

no, it's to do with the way that the standard were made..

first there was HTML
it's a markup language based on the same principals that you would use if you were setting type face for plate printing,

everything that is H1 would use the large heading plates
H2 would use the smaller

etc... etc...

but then as IE nd netscape (the then big boys of the browser world) developed they added in more tags until with html 4.01 pretty much everything to do with the entier page and the layou was in pure html

eg
<font colour="red" size="12" align=left>test</font>

(the font tag was one of the ones introduced after the standard was made).

so to iron out the differences between content and layout the w3c people invented style sheets, in this way a style could be applied to an element usenig either classes (which had just been introduced in HTML4 or ids (again introduced in HTML4)

classes are (or should) be used to assign style (or layout) properties that are used again and again (eg, imag float to right of screen and wrap text around image box, or dotted borders around paragraphs etc...

id's are (or should be) unique, so the styles applied in an ID should only be applied to a single element.
(in the example ID was probably more accurate since there was only one text link div and in the larger document there would still only be one text link over the main logo - but in that simple and reduced example it's difficult to say for sure)...

so that's the theory behind it...

the code that I gave works either way, (either using IDs or classes)


the only time you'll ever really notice the difference between the two is when working with javascrit when you can have...
<div id="test" class="testnormal" onmousover="this.style='testmouseover';" onclick="function()">

so the on mouse over event can change the style and the onclick even could change perhaps the content of the div, but the div is identified using the ID (snice the ID should be unique...


-----

to answer a question from a different thread.
in older revisions of HTML not all tags had to be closed.
but in the xhtml standard all tags have to be closed

hence <br> is html compliant and fine, but since the tag never close it's not xhtml compliant.

hence <br />

also hence things like
<input name="test" > should be <input name="test" />

also tags should be closed in the same order they were opned.
<b><i>hello</b></i> is wrong and should be
<b><i>hello</i></b>

but that's all symantics... IMO if it works don't worry!
(hope that all made sense).
__________________
I didn’t fight my way to the top of the food chain to be a vegetarian…
Im sick of people saying 'dont waste paper'. If trees wanted to live, they'd all carry guns.
"The inherent vice of capitalism is the unequal sharing of blessings; The inherent vice of socialism is the equal sharing of miseries."
root is offline   Reply With Quote
Old 06-01-2006, 05:29 PM   #17
BSOD
 
King of Kings's Avatar
 
Join Date: Mar 2006
Posts: 1,072
Default Re: link on a picture

lol root you really know your stuff. your sig says middleaged mod, are you really middle aged? ahh that just means youv enjoyed more of life so far. also, how do you upload your own avatar? do you have to have a certain number of post? Anyways thanks for all the html help, iv ben asking alot of questions lately
King of Kings is offline   Reply With Quote
Old 06-02-2006, 07:44 AM   #18
Site Team
 
root's Avatar
 
Join Date: Mar 2004
Posts: 8,006
Default Re: link on a picture

asking questions is a great way to learn, so keep asking...

midle aged, well I'm not really middle aged, (like 40 or wahtever), but I am old enough to have done with school colledge and uni and have a real job house car etc...

uploading avatars, it's a moderator only privellage I'm afraid, so sorry I can't really help you there. you could go start a thread on it in the suggestions section, (or resurect any of the many threads on avatars), but i really don't see the point being as the admins view on personalised avatars isn't going to change.
__________________

__________________
I didn’t fight my way to the top of the food chain to be a vegetarian…
Im sick of people saying 'dont waste paper'. If trees wanted to live, they'd all carry guns.
"The inherent vice of capitalism is the unequal sharing of blessings; The inherent vice of socialism is the equal sharing of miseries."
root is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



All times are GMT -5. The time now is 09:24 PM.


Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0