Safari ways

CSS hack for Safari

, on June 08, 2008 2 comments

Generally Safari browser print a website layout the way i want. Some times thou, it won't do it as Firefox do.

This is an example hack for Safari. The css class inside @media screen and (-webkit-min-device-pixel-ratio:0){} will be read only by Safari. So, in Firefox the object that user this class will have a padding-left of 10px and in Safari i canceled the 10px padding by defining a new value (padding-left: 0px;)

Read more »

tables

Hide table border in Firefox

on March 14, 2008 8 comments

I have made abuse of tables on one recent project and the problem that toke me some time to figure it out was how to hide the top table border that still appeared in Firefox even that the table had border="0" attribute or border: 0; in CSS.

Anyway, to solve this problem i added this line in the css file:

table {
border-collapse: separate;
}

This is a reminder to myself.. so i won't waste time next time searching for clues on how to handle table borders in Firefox.

Read more »

nicer

Style a search form with CSS

, on March 07, 2008 Add new comment

Ok, so i have to add some more focus on the search form on a Simple Machine Forum search form. The users seems not to take into account this option, so as a result a lot of duplicate topics appear daily.

This is how the search form looks right now (it's the default theme with some colors changed).

I want it to be wider as the forum is and with some style applied on it.

First, i will remove the lines (from 298 to 302) regarding the news field, which i will not use from the Themes/default/index.template.php :

	if (!empty($settings['enable_news']))
		echo '
				<td width="90%" class="titlebg2">
					<span class="smalltext"><b>', $txt[102], '</b>: ', $context['random_news_line'], '</span>
				</td>';

than add to the first td line which include the search form a colspan="2" attribute so it will become

Read more »