Today's Posts Follow Us On Twitter! TFL Members on Twitter  
Forum search: Advanced Search  
Navigation
Marketplace
  Members Login:
Lost password?
  Forum Statistics:
Forum Members: 24,254
Total Threads: 80,792
Total Posts: 566,472
There are 1144 users currently browsing (tf).
 
  Our Partners:
 
  TalkFreelance     Design and Development     HTML/XHTML/DHTML/CSS :

Tips and Tricks

Thread title: Tips and Tricks
Closed Thread    
    Thread tools Search this thread Display Modes  
08-29-2006, 06:15 PM
#1
KarlP is offline KarlP
KarlP's Avatar
Status: I'm new around here
Join date: Apr 2006
Location:
Expertise:
Software:
 
Posts: 24
iTrader: 0 / 0%
 

KarlP is on a distinguished road

  Old  Tips and Tricks

I was fixing up some xhtml/css for someone earlier and noticed a few common mistakes that I've seen a number of developers make, so I thought I'd start a thread so we can all share our IE/FF/Cross-browser tips and tricks .

Here are two that I can think of:

1. If you are using floating elements, always set the containing element’s width and overflow property. Overflow = hidden is what I usually use. Note: IE requires the width and FF requires the overflow otherwise the containing element (usually a div for me) doesn't have a height unless u add non floating elements.

2. To centre align a block level element set its width according, then set its margin-left and margin-right to auto.

08-30-2006, 05:31 AM
#2
metamorphium is offline metamorphium
Status: I'm new around here
Join date: Aug 2006
Location:
Expertise:
Software:
 
Posts: 8
iTrader: 0 / 0%
 

metamorphium is on a distinguished road

  Old

Follow an alternate design process. If you code for IE in the first place, chances are it will work flawlessly in firefox in the first place. Then you dont have as many problems period.

08-30-2006, 01:57 PM
#3
KarlP is offline KarlP
KarlP's Avatar
Status: I'm new around here
Join date: Apr 2006
Location:
Expertise:
Software:
 
Posts: 24
iTrader: 0 / 0%
 

KarlP is on a distinguished road

  Old

Did you even read the tips? Point #1 requires a different solution in different browsers. If I worked towards ie, I know I need to specify a width, but that still wont fix my FF problem.

Try it and see.

<div style="border: 1px solid black;">
<div style="float: right;">Right</div>
</div>

that wont work in either browser, speicify a width and IE works, then specify overlow and FF works too. Unless you can tell me a better way to do that?

08-30-2006, 07:06 PM
#4
Garyrae is offline Garyrae
Status: Request a custom title
Join date: Dec 2005
Location: Colchester, UK
Expertise:
Software:
 
Posts: 4,625
iTrader: 16 / 100%
 

Garyrae is on a distinguished road

Send a message via MSN to Garyrae Send a message via Skype™ to Garyrae

  Old

Originally Posted by metamorphium
Follow an alternate design process. If you code for IE in the first place, chances are it will work flawlessly in firefox in the first place. Then you dont have as many problems period.
Genius idea! I'll try that. Thanks!

Closed Thread    


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

  Posting Rules  
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump:
 
  Contains New Posts Forum Contains New Posts   Contains No New Posts Forum Contains No New Posts   A Closed Forum Forum is Closed