Search Results

Search found 3 results on 1 pages for 'ethyreal'.

Page 1/1 | 1 

  • CSS sliding door background image problem.

    - by ethyreal
    I noticed I am not the first to ask about CSS sliding doors. However this seems (at least to me) to be a rather odd problem which I have not seen an answer for. Trying to create a simple rounded corner link button: html: <a href="#" class="link_button"><span>Add A New Somthing</span></a> css: .link_button { background: transparent url('img/backgrounds/bg-buttonRight.png') no-repeat scroll top right; color: #444; display: block; float: left; font: normal 12px arial; height: 41px; margin-right: 6px; padding-right: 14px; text-decoration: none; } .link_button span { background: transparent url('img/backgrounds/bg-buttonLeft.png') no-repeat top left; display: block; line-height: 31px; padding: 5px 0 5px 14px; } .link_button:active { background-position: bottom right; color: #000; outline: none; } .link_button:active span { background-position: bottom left; padding: 6px 0 4px 18px; } results: The two images are overlapping, which is what I want, but why the discoloration? Why would one be darker? I tried using png jpg, gif, with and without transparency. I posted the code here, along with another attempt using only one jpg instead of two, but still the same results. Did I miss something? Thanks in advance.

    Read the article

  • Active Record two belongs_to calls or single table inheritance

    - by ethyreal
    In linking a sports event to two teams, at first this seemed to make sense: events - id:integer - integer:home_team_id - integer:away_team_id teams - integer:id - string:name However I am troubled by how I would link that up in the active record model: class Event belongs_to :home_team, :class_name => 'Team', :foreign_key => "home_team_id" belongs_to :away_team, :class_name => 'Team', :foreign_key => "away_team_id" end Is that the best solution? In an answer to a similar question I was pointed to single table inheritance, and then later found polymorphic associations. Neither of which seemed to fit this association. Perhaps I am looking at this wrong, but I see no need to subclass a team into home and away teams since the distinction is only in where the game is played. If I did go with single table inheritance I wouldn't want each team to belong_to an event so would this work? # app/models/event.rb class Event < ActiveRecord::Base belongs_to :home_team belongs_to :away_team end # app/models/team.rb class Team < ActiveRecord::Base has_many :teams end # app/models/home_team.rb class HomeTeam < Team end # app/models/away_team.rb class AwayTeam < Team end I thought also about a has_many through association but that seems two much as I will only ever need two teams, but those two teams don't belong to any one event. event_teams - integer:event_id - integer:team_id - boolean:is_home Is there a cleaner more semantic way for making these associations in active record? or is one of these solutions the best choice? Thanks

    Read the article

  • Active Record two belongs_to calls to the same model

    - by ethyreal
    In linking a sports event to two teams, at first this seemed to make since: events - id:integer - integer:home_team_id - integer:away_team_id teams - integer:id - string:name However I am troubled by how I would link that up in the active record model: class Event belongs_to :home_team, :class_name => 'Team', :foreign_key => "home_team_id" belongs_to :away_team, :class_name => 'Team', :foreign_key => "away_team_id" end Is that the best solution? In an answer to a similar question I was pointed to single table inheritance, and then later found polymorphic associations. Neither of which seemed to fit this association. Perhaps I am looking at this wrong, but I see no need to subclass a team into home and away teams since the distinction is only in where the game is played. I thought also about a has_many through association but that seems two much as I will only ever need two teams, but those two teams don't belong to any one event. event_teams - integer:event_id - integer:team_id - boolean:is_home Is there a cleaner more semantic way for making these associations in active record? Thanks

    Read the article

1