Results 1 to 5 of 5

Thread: sylesheet newbie help

  1. #1
    Join Date
    Feb 2013

    sylesheet newbie help

    Hello, my first post on this forum and a novice at web design.

    This may be a real basic (stupid) question but I'm confused.

    I thought stylesheet.css was typically written in HTML?

    I have my page up and running and in the process of tweaking bits. I use mozillla firebug to view and test edit the html source code. I copy the changes into s text document.

    I open the sylesheet.css ecpecting to see the same html as the source. The CSS looks nothing like the source code / not in html. Is this normal?

    Should I expect css to be a different language to html?


  2. #2
    Join Date
    Sep 2006
    new york

    both HTML and CSS files are text

    HTML and CSS both have their own different/specific syntax, but you can create them in a plain text file (on PCs people use Notepad).

    There are helpful applications, such as Dreamweaver, that can be used to create your HTML and CSS text files.

    I didn't quite follow your query. It's always best if you post the code
    -- inside
    which will set the code apart and make it easier to follow. Most helpful would be to provide a link to an online page.

    P.S.-- HTML <tags> form the structure of page content. CSS style rules can be applied to these HTML <tags> to affect the appearance of the page content. Sounds like you need to do some homework to better understand how CSS works with HTML markup.

    See for instance http://www.html.net/tutorials/css/lesson2.php,
    Last edited by auntnini; 02-02-2013 at 10:17 PM.

  3. #3
    Join Date
    Aug 2012
    CSS an HTML are not one in the same - HTML is what formats your content as a web page and CSS is what is used to position and style that content. What may confuse you is if you have seen bad coding where people are still using 'inline styling' within their HTML, for example
    <p style="font-size: 12px; color: #FFFFFF;">Paragraph Text</p>

    Therefore if you want to change the style of something in your HTML then you change it in your stylesheet and it will be applied (as long as you are linking to your stylesheet from the head of your HTML).

  4. #4
    Join Date
    Feb 2013
    Thanks guys, I'll get my head in the books now. I do need to learn CSS pronto.

    I've solved my problem thanks to you guys and hope this explanation may help other newbies with the same problem as me.

    IT literate (I work in IT as a SW Admin) so the tools required are not a problem (FTP, Notepad2/notepad++ used daily, dreamweaver, photoshop etc all installed on my PC but haven't used dreamweaver). Shell scripting in other languages a daily task so also used to what code looks like but no experience of web design or CSS.

    With no experience of CSS, I built my site with an e-commerce template, it took me some days to work out the structure of the site navigating the back end.

    My site is up and running (I'm selling items) but there are small changes I wanted to make to perfect the look of the page. I thought only the stylesheet.css controlled the look of the page but needed to find the code I wanted to edit - didn't know where to start. An area very close to that I wanted to edit I had already edited on the stylesheet CSS so I did not know why I could not find this perticular code?

    I opened my page on a web browser (I prefer mozilla with the firebug extension added). By pressing F12, I could see code inside an HTML format and with firebug it allows you to edit the page (any page, doesn't have to be your own - it's only editing it in your browser). This started leading me to thinking CSS was written in HTML.

    I found the area I wanted to edit and edited it to my preference - it looked great!

    It was now time to make the same changes to the actual site.

    I opened my stylesheet.css expecting to see the same code but it was nowhere to be found - I was confused.
    I thought either this e-commerce template converts what is normally HTML into another language and I had to somehow decode the stylesheet back into HTML or CSS is it's own language but the headings are totally different - so trial and error I'd need to change every possible items (buttons etc) to see which is the correct? Nothing looked like the one I wanted - the other buttons I could see were for another part of the page. This is obviously through lack of knowledge in web design but figured no way should it be this diffiicult to find the correct code.

    That's when I joined this forum - I just didn't get why the area I wanted to edit wasn't there and started thinking maybe this should be in HTML? I assumed you had to re-translate the code in a different language.

    I hit youtube again after my two replies on here, a few videos on CSS confirmed what I was trying to do was correct I.E. the stylesheet looked normal and the parts I needed to edit "should" be there - so even more puzzled?
    I then watched more videos on firebug - what a pleb.
    I wasn't using firebug properly and did not know enough about CSS to know there may be more than one CSS file referenced to a page - it's an extension I've been trying to edit.
    A couple of tutorial videos on Youtube (on using firebug), I realised you can view the references to where the code is held.

    I then realised the code I wanted to edit was not in stylesheet.css, it had it's own CSS file. I opened the correct file in a text editor and there it was - the code I've been looking for - for days. I've made the changes to my site now and a very happy monkey

    To everyone on here, I know the above is probably entry level day 1 type stuff but it had me stumped for ages - so hopefully help others too.


  5. #5
    Join Date
    Sep 2006
    new york
    HTML and CSS syntax sticky points can trip up beginners. One point that non-programmers have a problem with is the lesser-than < and greater-than > brackets surrounding each HTML <tag>. Every <tag> needs to be complete with both a start < and end > bracket. Then try to describe that most <tags> come is pairs with an opening and closing counterpoint </tag> (the opening tag element precede by a slash / ) which describe content between the <tag> pair </tag>

    The opening <tag> can contain attribute="value" pairs to further define content that follows; the closing </tag> only has the element preceded by a slash.

    "Empty" <tag>s -- such as <img> image (which is a placeholder), <br> line break, <hr> horizontal rule -- do not haw a counterpart closing because they do not define content in-between. XHTML doc-type follows XML self-closing rule <br /> for empty tags.

    Once brackets for <tags> is digested, it is usually clear sailing,

    Inside the <tags> are HTML elements (a for <a> link anchor, p for <p> paragraph, ol for <ol> ordered lists, li for <li> list item, and so forth). The "bare" elements (without their <tag> brackets) can be used as "selectors" styled with CSS. Users can also create their own independent .CLASS (preceded by . period) and #ID (one unique to a page) style rule- selectors that can be applied to any <tag> -- using <DIV class="CLASSname" id="IDname"> inside the opening tag </DIV>.

    CSS style rules can be in linked external text files (with .css MIME-type extension). or embedded in page within HTML <STYLE> tags </STYLE>. or applied inline to an HTML tag as an attribute <p STYLE="property:value; property2:value2;"> in an opening tag</p>

    Remember CSS="Cascading Style Sheet" means that the specitivity and order in which style rules appear determine which rule applies and which are overridden. As an inline attribute, the style rule is more specific (and physically closer) than embedded <STYLE>rules</STYLE> so it takes precedence However, inline styles are least efficient and can be as bad as the deprecated <FONT> tags. Likewise the embedded <STYLE>rules</STYLE> overide rules in a linked external .CSS text file. While less specific, the rules in an external .CSS text file are the most efficient way of applying styles to a web site.
    Last edited by auntnini; 02-03-2013 at 05:53 PM. Reason: selector

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center



X vBulletin 4.2.2 Debug Information

  • Page Generation 0.09530 seconds
  • Memory Usage 2,892KB
  • Queries Executed 15 (?)
More Information
Template Usage (33):
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_global_above_footer
  • (1)ad_global_below_navbar
  • (1)ad_global_header1
  • (1)ad_global_header2
  • (1)ad_navbar_below
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)ad_thread_first_post_content
  • (1)ad_thread_last_post_content
  • (2)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)headinclude_bottom
  • (5)memberaction_dropdown
  • (1)navbar
  • (4)navbar_link
  • (1)navbar_moderation
  • (1)navbar_noticebit
  • (1)navbar_tabs
  • (2)option
  • (5)postbit
  • (5)postbit_onlinestatus
  • (5)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available (6):
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files (26):
  • ./showthread.php
  • ./global.php
  • ./includes/class_bootstrap.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/functions_navigation.php
  • ./includes/class_friendly_url.php
  • ./includes/class_hook.php
  • ./includes/class_bootstrap_framework.php
  • ./vb/vb.php
  • ./vb/phrase.php
  • ./includes/functions_facebook.php
  • ./includes/functions_calendar.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_notice.php
  • ./packages/vbattach/attach.php
  • ./vb/types.php
  • ./vb/cache.php
  • ./vb/cache/db.php
  • ./vb/cache/observer/db.php
  • ./vb/cache/observer.php 

Hooks Called (72):
  • init_startup
  • friendlyurl_resolve_class
  • init_startup_session_setup_start
  • database_pre_fetch_array
  • database_post_fetch_array
  • init_startup_session_setup_complete
  • global_bootstrap_init_start
  • global_bootstrap_init_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • load_show_variables
  • load_forum_show_variables
  • global_state_check
  • global_bootstrap_complete
  • global_start
  • style_fetch
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • strip_bbcode
  • friendlyurl_clean_fragment
  • friendlyurl_geturl
  • forumjump
  • cache_templates
  • cache_templates_process
  • template_register_var
  • template_render_output
  • fetch_template_start
  • fetch_template_complete
  • parse_templates
  • fetch_musername
  • notices_check_start
  • notices_noticebit
  • process_templates_complete
  • friendlyurl_redirect_canonical
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • memberaction_dropdown
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • build_navigation_data
  • build_navigation_array
  • check_navigation_permission
  • process_navigation_links_start
  • process_navigation_links_complete
  • set_navigation_menu_element
  • build_navigation_menudata
  • build_navigation_listdata
  • build_navigation_list
  • set_navigation_tab_main
  • set_navigation_tab_fallback
  • navigation_tab_complete
  • fb_like_button
  • showthread_complete
  • page_templates