473,463 Members | 1,552 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

HTML inline styles for 3 column tabless

Niheel
2,460 Expert Mod 2GB
To speed up developing i am using a lot of inline code vs stylesheets.

Mainly using the style= attribute in divs, spans, and p.

Is this the best way to do 3 column inline? or is there an easier way. I nested the divs.
Expand|Select|Wrap|Line Numbers
  1. <!-- container -->
  2. <div style="width: 800px; border: 1px solid #ccc;">
  3.     <div style="background-color:#009999; float: left; width:550px;">
  4.         column 1
  5.     </div>
  6.     <div style="background-color: #CCCCCC; width: 250px; float: right;">
  7.         <div style="float: left; width: 100px;">
  8.         column 2
  9.         </div>
  10.         <div style="background-color:#66FFCC; width: 150px; float:right;">
  11.         column 3
  12.         </div>
  13.     </div>
  14. </div>
  15. <!-- containter end -->
Nov 1 '08 #1
2 6360
drhowarddrfine
7,435 Expert 4TB
There are a lot of ideas floating around on how to do it. I don't know if you cooked that one up on your own but I can get you some links to samples or look up some of my own (since I can't remember how I do my own stuff the day after). Yours looks good, though.
Nov 2 '08 #2
David Laakso
397 Expert 256MB
Best is a matter of opinion. What you have will work as intended in compliant browsers. If you also want it to work in non-compliant browsers -- any version of Internet Explorer -- you'll need a doctype. Either way:
Expand|Select|Wrap|Line Numbers
  1. Add overflow:hidden to enclose the floats.
  2. <div style="width: 800px; border: 1px solid #ccc;overflow:hidden">
  3.  
  4.  
Nov 2 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

50
by: Christopher Benson-Manica | last post by:
(if this isn't the place for XHTML, I'd appreciate a redirect) According to the w3's web site, some non-HTML 4 browsers won't properly interpret non-minimized boolean attributes, i.e. <option...
14
by: James Ballard | last post by:
The file in question may be found at http://jimballard.home.att.net/oldindex.html I have checked the file against the W3C, WDG and several other validators and checkers. They show it to be...
7
by: David Filmer | last post by:
Greetings. I want to localize a style definition to a portion of an HTML document, but use an external stylesheet. It seems that I can only do <style><!-- @import...
7
by: Steven (remove wax and invalid for reply) | last post by:
I'm moving an old page to a new host, and trying to modernize it at the same time. There are two little problems that are driving me nuts. 1. Validation of www.marzolian.com/index.html says: ...
15
by: Matthias Hullin | last post by:
Hi, I'm programming some PHP discussion board that is supposed to appear inside the content area of a proprietary CMS. As I need some more styles than the standard stylesheet provides, I just...
4
by: Arthur Dent | last post by:
Hello all, ive been programming with ASP.NET since it came out, but am just getting my feet with now with v.2. Ive noticed something strange in the way my HTML tables get rendered with 2. I use...
59
by: phil-news-nospam | last post by:
In followups by Brian O'Connor (ironcorona) to other posts, he repeats the idea that using tables in CSS is not something that should be done because IE doesn't support it. Of course I'm not happy...
4
by: FayeC | last post by:
I am building a table with style samples from 3 CSS files. We currently have 3 CSSs (NS4, IE and SUN) as our audience is diverse (banking industry - old systems and old browsers for about 50% of...
6
by: Christopher Glenn | last post by:
I have very basic html skills. My friend who has a wide screen monitor and is using IE7 sent me a jpg screen shot of my home page. I have attached this jpg, but I recall a while back that...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.