Results 1 to 5 of 5

 

Thread: CSS Question

  1. #1
    Registered User

    Status
    Offline
    Join Date
    Jul 2007
    Location
    @home
    Posts
    1,372
    Thanks
    40
    Thanked 54 Times in 51 Posts


    I am in the process of doing a redesign and everything is completely f****d up which makes this vey difficult.

    So, I was wondering, for future reference, is it possible to have a template of your basic page in the CSS file?

    I use a basic table layout and I know I can set all the fundamentals of formatting in the style sheet but can I say, for example, that a certain cell contains the logo image and another certain cell contains a link bar, etc?

    I kind of understand the concept of Identifying specific tags but not sure how that would be written in css for a template page?

  2. #2
    tbp
    Registered User

    Status
    Offline
    Join Date
    Dec 2006
    Posts
    1,998
    Thanks
    0
    Thanked 22 Times in 22 Posts
    Well if you give your logo cell an id, then you can get the stylesheet to put an image in that element.

    However, the whole point of CSS is that the content and styling is kept separate.

    You would make the template in HTML, and the styling in the CSS stylesheet. By changing the CSS you can make very different looking pages.

    Its difficult to explain, but have a look at the link below to get the idea:

    css Zen Garden: The Beauty in CSS Design

    Its the same content, just the stylesheet changes each time

  3. #3
    boo!

    Status
    Offline
    Join Date
    May 2006
    Location
    Berkshire
    Posts
    795
    Thanks
    1
    Thanked 5 Times in 3 Posts
    Quote Originally Posted by fizzbird View Post
    ...can I say, for example, that a certain cell contains the logo image and another certain cell contains a link bar, etc?
    No. CSS is only used to define element styles. It can't be used dynamically like you are asking. However, if you were to define 2 link bar styles in your CSS (i.e. linkBarA & linkBarB), set the background images, fonts etc etc and couple your template up with a scripting language (ASP, PHP, C# etc etc) then you could dynamically select the appropriate style.

    Hope this helps.

  4. #4
    Registered User

    Status
    Offline
    Join Date
    Nov 2003
    Location
    London
    Posts
    680
    Thanks
    3
    Thanked 19 Times in 19 Posts
    You can use css with pseudo elements to add text.

    When you start doing too many 'non-standard' things in css you are relying on all browsers displaying the css the same. With some browsers being (almost) css1 compliant and others a mix of css2 and css3 compliant, you really take your chances with anything that is central to the overall layout.
    Even something as simple as a background image can be placed differently by different browsers.

    The method is to create your page using simple html and text. Then look at it and create css elements which give the visual appearance the bells and whistles.

  5. #5
    Registered User

    Status
    Offline
    Join Date
    Jul 2007
    Location
    @home
    Posts
    1,372
    Thanks
    40
    Thanked 54 Times in 51 Posts
    Thanks guys



Thread Information

Users Browsing this Thread

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

Similar Threads

  1. blogging/backlink question
    By mrjibbles in forum Affiliate Marketing Lounge
    Replies: 1
    Last Post: 14-10-07, 05:06 PM
  2. CSS inline horizontal lists
    By gadget in forum Programming
    Replies: 7
    Last Post: 09-08-07, 09:31 AM
  3. Questions on CSS page layouts
    By accelerator in forum Programming
    Replies: 4
    Last Post: 14-11-06, 02:34 PM
  4. IE7 - CSS Problems - Check your site!
    By kevquinlan in forum Programming
    Replies: 5
    Last Post: 10-11-06, 11:27 PM
  5. CSS new starter
    By renamecor in forum Programming
    Replies: 15
    Last Post: 11-09-06, 10:35 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
To Top

Content Relevant URLs by vBSEO 3.5.0 RC2