I'm trying to teach myself CSS. Would appreciate comments on the mess of stuff I have on this web page. I'm not really trying to do anything fancy, just control text size, color, positioning mostly. Seems to me I've got some pretty repetitive stuff.
For example:
<div id="head">
<!-- Your top banner -->
</div>
<div id="contents">
<!-- You contents -->
</div>
<div id="leftbox">
<!-- Left Links -->
</div>
<div id="rightbox">
<!-- Right links -->
</div>
Code:
Then use CSS to specify layout:
div#contents {margin-left: 160px;
width: 444px; /* 700-160-96 = 444px */
padding: 2px; /* no need of <td width="2"> for this */}
div#leftbox {position: absolute; left: 0px; top 120px;
width: 160px}
div#rightbox{position: absolute; left: 604px; /* 160+444 */
top 120px; width: 96px}
The errors are with javascript, I'm fixing that. Just wanted to see if my css thus far would embarrass me if it gets out in public.
I'll consider using CSS rather than tables, but not just yet. I sometimes have trouble with Netscape 7 on a PC on certain sites... and I'm guessing it is from CSS not loading properly. Text and images jumbled or off to the side. I want to wait until I understand it better.
This is not the way to go, if you want to build in the spirit of the DOM. serious, making all the h-elements the same font-size is not advisable, just leave them and use them for structuring titles, subtitles, paragraphs, headers, whatever..
Here we have the a-tag declarations. Most of the time the font is declared in the p-tag, and the hyperlinks are of the same font-family. You could get jumpy links if you do this. And you missed the a:hover pseudo class. The order should be LVHA, so this comes before the a:active line.
Good luck with the tableless-cold-turkey, and have phun!
Wisbin
» In the land of plenty, miss pixelperfect is a *****
Originally posted by prairiegirl I sometimes have trouble with Netscape 7 on a PC on certain sites... and I'm guessing it is from CSS not loading properly.
Id bet with 100:1 odds that the problem in those cases are NOT with NS 7, but that the webapges are badly coded (ie broken)
Here is a page that messes up for me in Netscape 7. I always use Netscape, but when I have problems, I load a page in IE to check. This site sometimes does okay, most of the time not. Is it CSS?
Wow, that's terrible in NN7, isn't it... I don't really want to look through all the code on that page, but like I said earlier, if the css was coded correctly (ie. to w3c standards) I'd bet it would work just great in NN7. It's possible that they used some IE specific css to do it, and that would explain a lot...
Oh, man. I was hoping you'd ... well, I don't know what I was hoping you'd do.
I suppose I should send them one of my standard "This doesn't work in Netscape...blahblahblah." I used Netscape 4ish for the longest time. Just recently went to 7, and STILL I find the evil empire perkolating all over the place. I'll copy and paste what you said. Yeah! Me smart.
Bookmarks