-
March 21st, 2011, 08:56 AM
#1
CSS code affecting my whole web page
I am learning HTML and CSS. My website is a template that I have collapsed and putting in my own code. I have constructed a sidebar with hyperlinks and it works great; however, this sidebar has the potential to ffect the entire web page. I changed my weather channel banner to the standard look -- instead of seasonal -- because with the CSS sidebar, the text and formatting inflatted in the weather code. This morning I went to install an AdSense ad and the formatting for that was affected as well. I think I need to apply a table or an identifier to my sidebar code, but I don't know how to do it. Any help would be appreciated. --Kemis
-
March 21st, 2011, 09:56 AM
#2
Re: CSS code affecting my whole web page
The kind of code you posted looks like spam or advertising, so the HTML code was removed. Please post smaller pieces and if possible without links that will determine us to remove them.
-
March 21st, 2011, 10:09 AM
#3
Re: CSS code affecting my whole web page
Okay, sorry about that. Here is the top and bottom of my sidebar code. I have only taken out the hyperlinks.
Code:
<HTML>
<table><table id="teemenu">
<table border="0" bordercolor="0" width="240" bgcolor="f4f7f8"><tr><td>
<style type="text/css">
a {font-family:arial;font-size:10pt;cursor: auto}
a:link {color:#0174DF;text-decoration: none}
a:visited {color: #4B088A;}
a:hover {text-decoration: none; color: #FF0000; font-weight:regular;}
a:active {color: #ff0000;text-decoration: none}
</style>
<!--LOCAL NEWS-->
<style>.text { border-bottom: solid #d8d8d8 1px; }
</style><span style="font-size: 11pt"><strong><font face="arial"><font color=#6E6E6E><span class="text">Top Stories </strong></span>
<!--THIS IS WHERE I LIST MY HYPERLINKS-->
</td></tr></table>
</HTML>
Last edited by PeejAvery; April 18th, 2011 at 01:27 PM.
Reason: Added code tags
-
April 15th, 2011, 01:32 AM
#4
Re: CSS code affecting my whole web page
Of course there will be errors in your code and you should check this through the compatibility software of browsers then you can get all of the errors.
-
April 15th, 2011, 05:46 AM
#5
Re: CSS code affecting my whole web page
I can't see the problem from your markup but one approach I tend to use it that of classes. So for example:
Code:
<div class="generaltext">mytext</div>
In my CSS is can simply refer to:
Code:
div.generaltext { ... }
This strict method of keeping track of the HTML elements I'm using and how I've styled them helps me avoid accidentally modifying the styling for something inadvertently.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|