| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
|
|
#1 (permalink) | |
|
Web Hoster
Join Date: Jan 2008
Posts: 113
|
connect html-css
I was wondering, how do you connect specific elements on a page to a specified css file. basically, the way to connect the html file to the css file without using the header. trying to connect this to a specified css file Quote:
|
|
|
|
|
|
|
#2 (permalink) |
|
trouble free and loverlee
Join Date: Mar 2003
Location: YooKay
Posts: 2,875
|
Why "without using the header"? You just link or @import the stylesheet to the document which contains that markup and the browser does the rest. If, for some reason, you can't use the header (by which I assume you meant the head section of the document markup), then you're only course of action is to use inline styles (see above link). (Well, actually, that's not entirely accurate. You can link or @import a stylesheet from within the body, and so long as it comes before the markup to which it refers, you should get no rendering issues. However, that's a less than optimal approach as many consider that calls to external stylesheets should be contained exclusively within the head section.) Incidentally, that's some really horrible code. Why all the b elements? Why the inappropriate nesting? Show us the page design and how you intend to use that code (I'm guessing header and footer graphics or 'rounded' corners), and I'm sure someone here can suggest a more semantically appropriate use of code to achieve the same outcome. |
|
|
|
#3 (permalink) |
|
Web Hoster
Join Date: Jan 2008
Posts: 113
|
I know there is away to connect specific elements to a specified style sheet because I've seen it before but I can't find it and that is why I can't take the code from it. Also, I got the code from this. Spiffy Corners - Purely CSS Rounded Corners |
|
|
|
#4 (permalink) |
|
Senior Member
Join Date: Jul 2007
Posts: 179
|
Having a site build your rounded corners is not good way to create them. I would suggest to look at tutorials and even the spiffy site and find out how to produce rounded corners your self. If you learn how to code the rounded corners your self then the code will most likely be easier to understand and fit better into your page. |
|
|
|
#6 (permalink) |
|
Web Hoster
Join Date: Jan 2008
Posts: 113
|
Howcome some servers may have like many stylesheets being in use for one page then? How do they do that? I have the web developer toolbar for firefox and some sites, it shows many different stylesheets. Like even this exact page for example has like 4. |
|
![]() |