HTML & CSS
i am very new to the website designing community and have been learning through a pdf from sitepoint itself but recently when they asked me to link an external css file i was unable to do so or else i couldn't see any effects.
Here is the Css code:-
here is the nark up for my page (ps its pretty much empty)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
<link href="style1.css" rel="stylesheet" type="text/css"/>
<h1> Robotryst @ Musaliar College</h1>
<p> Robotryst is Organized in association with <strong>TRYST</strong> and <strong>Robosapiens</strong>, Delhi</p>
<li><a href="about4.html">Main Attractions</a></li>
<li><a href="contacts.html">Contact Us</a></li>
</div> <!-- end of header -->
<h2> Win Prizes Worth <em> 1 Lakh </em> Rupees <h2>
<h3> Hunt For India's Super <em> Robo </em> Genius !!! </h3>
<p><img src="free kit.jpg" width="480" height="203"
alt="free robotics kits"/></p>
<h3> HURRY !! ONLY LIMITED SEATS AVAILABLE </h3>
</div><!-- end of taglines-->
please help me i have been stuck in this part of the tutorial for quite a time now
Hi Alen Thomas. Welcome to the forums.
What you have will work fine, as long as the path to your CSS file is correct. What you have at the moment:
<link <font color='"#FF0000"'>href="style1.css"</font> rel="stylesheet" type="text/css"/>
is telling the browser to look for the style1.css file in the same folder as the page itself. But if your CSS file is stored somewhere else, the path needs to be different. E.g. if the CSS file is in a folder called /styles/ in the root folder, the link would look something like this:
<link <font color='"#FF0000"'>href="styles/style1.css"</font> rel="stylesheet" type="text/css"/>
So the question is, where is the CSS file in relation to your page?
thanx a lot it was placed in a different folder
the new linking worked !!:)
Glad to hear it! Don't hesitate to come back if you have further questions.
This topic is now closed. New replies are no longer allowed.