473,385 Members | 1,707 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Make <a> fill whole table cell of not specified size

Hello,

How can I make an <a> element (containing text only, styled to be a box with
a border) as big as the table cell in which it resides, *without* having
specified any width/height (neither fixed nor percentage) for this table
cell?

Sizing the element to 100% width and height does not work, as the parent
element's width and height are not specified. And yet, in this case at
least, the width and height of the table cell are very well defined by the
link text it contains. However, if another cell happens to have more
contents and thus forces my link cell to be bigger than necessary to
accomodate my link text, the "box-styled" <a> element will not automatically
stretch out to fill the whole table cell.

Is there a way to achieve what I want, or would I *have* to set a fix or
percentage width/height for the table cell?

Thomas
Jul 20 '05 #1
3 10853
Thomas Mlynarczyk wrote:

How can I make an <a> element (containing text only, styled to be a box with
a border) as big as the table cell in which it resides, *without* having
specified any width/height (neither fixed nor percentage) for this table
cell?


I think you're looking for display: block.

td a {
display: block;
}

--
Brian
follow the directions in my address to email me

Jul 20 '05 #2
Also sprach Brian:
How can I make an <a> element (containing text only, styled to be a
box with a border) as big as the table cell in which it resides,
*without* having specified any width/height (neither fixed nor
percentage) for this table cell?
I think you're looking for display: block.

td a {
display: block;
}


I am already using that:

a {
display:block;
width:100%;
height:100%;
border-top:2px solid #FFFFCC;
border-right:2px solid #999900;
border-bottom:2px solid #999900;
border-left:2px solid #FFFFCC;
margin:0px;
padding:3px;
}

The above works as intended with IE5, but Mozilla screws it up - because of
the width/height "100%". But without that, the <a> element will not always
completely fill the table cell in which it resides, namely not if other
cells' contents forces the cell with the link to be bigger than necessary to
accomodate my link.

Jul 20 '05 #3
Thomas Mlynarczyk wrote:
Also sprach Brian:
How can I make an <a> element (containing text only, styled to be a
box with a border) as big as the table cell in which it resides,

I think you're looking for display: block.

td a {
display: block;
}


I am already using that

works as intended with IE5, but Mozilla screws it up - because of
the width/height "100%".


url?

--
Brian
follow the directions in my address to email me

Jul 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Gianfranco | last post by:
Hi I got a problem with 2 tables. I have a table, say A, with x records, coming from a make table query and a table, say B, with y records, coming from another make table query. I need to join...
2
by: Derek Davlut | last post by:
I have a make table query that I make a table from. I want the rows to continue increasing but it overwrites the data each time. I am gathering data from a linked source and to collect statistical...
2
by: Kathy Krizl | last post by:
I'm probably doing something stupid, but I have a make table query. One of the tables I reference has some check box fields in it. Their Data Type is Yes/No, their field property format is Yes/No,...
0
by: LesM | last post by:
This is a change of behaviour between Access 2000 SP3 and Access 2002 SP3. I have Progress table that is linked via ODBC into Access using OpenLink Lite for Progress 9.0b. For over a year, using...
0
by: LoopyNZ | last post by:
Hi all, (Access 97) I'm trying to use a number of make-table queries to create some Yes/No fields, but I'm not having much luck. Has anyone found a trick to get a make-table query to make a...
4
by: ken | last post by:
Hi, I use this command to run a make table query without opening it... CurrentDb.Execute "make table query name" Access tells me that it can't execute a select query...? Its a make table query...
3
by: Robertf987 | last post by:
Hi, I'm a bit stuck with an access database. I'm using access 2000 if that's any help. Right, it's 3:40am right now and I'm rather tired, but I *hope* this makes sense. I have a table which...
3
by: ajay2552 | last post by:
Hi, I have a query. All html tags start with < and end with >. Suppose i want to display either '<' or '>' or say some text like '<Company>' in html how do i do it? One method is to use &lt,...
5
by: vegak18 | last post by:
Dear Experts, I was was wondering if there was some way to specify output properties of a make table query. Specifically, I am haivng a problem with numbers being specified as text. while I...
9
by: Mourad | last post by:
Hi All, Is it possible to create a Make Table query in access (2.0 and 2003) that creates the table into a SQL Server database? Following the steps: 1- Create New Query 2- Set Query Type as...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.