Jump to content

CSS help


Recommended Posts

I'm working a webpage and I'm having some trouble with how i want the link set up.

 

the basic layout is here (this is an older page, but i'm using the same basic template): http://www.personal.psu.edu/mth170

 

now, look at the links row. basically, when someone hovers over a link i want bars on each side which reach from top to bottom. the:

display: block;

doesn't work as it wants to use the whole line. any ideas, thoughts?

Link to comment
Share on other sites

like this ?

 

I added:

border-right: solid red; 
 border-left: solid red;

(notice it is just "border-right"... no width) under the a:hover section and also put in ";" after the last line of each section. All the stylesheets I have worked on have the semi-colon after each line of each section.

 

PS: forum won't accept .css files had to add .txt

tymestyle.css.txt

Link to comment
Share on other sites

not what i'm looking for. i don't want it to be that thick, what i want is for it to touch both the top and bottom lines. even if i put a border around that table it doesn't touch the top and bottom lines of that table...

Link to comment
Share on other sites

nevermind, it was a cellspacing/cellpadding issue, not CSS. i figured it out. and i came up with a different design anyways, so it doesn't really matter :)

 

basically, i needed the following:

cellspacing="0" cellpadding="0"

in my <table> tag.

Link to comment
Share on other sites

Guest Adriano
Isn't it going against the entire idea of CSS if you're using a table?

 

No, it's not. It's just an intermediate. You can style a table perfectly well. Although I'd certainly not do that (I use tables only for data that displays better in a table, for a list of links, vertical or horizontal, I usually use a list) it's the best choice for some.

Link to comment
Share on other sites

Hello...

 

Well, this discussion has been around since the first implementations of CSS... is it better to use blocks or tables?

 

As a web designer who uses scripting langauges like perl/php/etc to "create" the HTML, CSS styling applied to tabled layout is a lot simpler - and more robust in terms of programming application level websites.

 

As a first time web designer, so much gets tried with floating divs, etc etc, but, inevetibly, once you need a functioning website across most platforms in *almost* all browsers, tables are virtually your first and last choice. What do you think?

 

Regards,

Armond

Link to comment
Share on other sites

I created some small css-site. if you want you can have a look ..if it can help you ...

The pictures aren't well-placed in konqueror, but they are fine in mozilla and explorer. I filed a bug about this on the konqueror bug-list, I hope it was a bug :).

This was my first site which uses a lot of css, so I still have to learn quite some about it. Sometimes it's just easier to use tables ... but I suppose it's more dynamical without tables .. not sure though.

 

The borders of the boxes are visible ..when you make the page small enough, you'll see, because the site had to be internet-explorer-compatible and internet explorer didn't support the css-stuff to make the borders dissappear well I think (I made the border invisible, but in internet explorer the border got width 0, ... this didn't happen in mozilla and I think also not in konqueror.. not sure though.)

 

I know the resizing isn't completely right, that's maybe something for the next site I make or so.

 

Only 2 pages are available, but you can have a look maybe ...

http://lumumba.luc.ac.be/~michel/marianne/

 

http://lumumba.luc.ac.be/~michel/marianne/mo-trap.html

Edited by Michel
Link to comment
Share on other sites

As a first time web designer, so much gets tried with floating divs, etc etc, but, inevetibly, once you need a functioning website across most platforms in *almost* all browsers, tables are virtually your first and last choice. What do you think?

 

I know I'm a bigot but I only design my sites to have compliant CSS/XHTML that works in mozilla, if IE can't handle the standards then I don't care about it - probably a good job I'm not a pro web-designer!!

 

I tend to only use tables when I want to present a table of data, if it was only being used for layout (or for putting a box round text) I prefer to use CSS boxes.

Link to comment
Share on other sites

Unfortunately, when designing and coding corporate websites for the masses, the point of entry for design (and coding) is IE. hopefully this will change in the next decade, but till then IE enjoys all the attention, followed by Netscape, Opera, Mozilla and then *lastly* browsers like Konqueror, Galleon, Epiphany, etc etc. One thing the linux community is geting right though is this: Basing *almost* all new browsers on Mozilla, which is coming along very very nicely.

 

Regards,

Armond

Link to comment
Share on other sites

I know I'm a bigot but I only design my sites to have compliant CSS/XHTML that works in mozilla, if IE can't handle the standards then I don't care about it - probably a good job I'm not a pro web-designer!!

The thing is, this website I'm designing is for my girlfriend, it's a website for her to place her graphic design work and resume to be viewed. So, the audience is going to be mostly IE users and I have to build it to be IE compliant.

 

Most web designers wish IE would either become compliant or go away, but for now neither is happening so tables are my best option.

Link to comment
Share on other sites

  • 3 weeks later...

CSS should not be viewed as a replacement for many HTML elements (like tables). You can style any HTML element using CSS, including tables.

 

I don't get why there's suddenly been this whole "thou shalt not use tables in your HTML" view. All website developers that want to structurally place content in collumns use tables instead of *floating* divs/spans. Don't believe me? View the source of this page (the one you're reading this from). See how much CSS is used? See how many tables are in place?

 

So don't think the one replaces the other, they compliment, and work hand in hand with each other

 

Regards,

Armond

Link to comment
Share on other sites

Just look at the csszengarden, you'll see why we want to use css for poisitioning. Speaking as a strict amateur, once I've learnt to do some positioning (in slightly crazy ways) with css, I don't see the need to use tables for simple positioning - for ME its easier to use css and I don't care if it breaks in IE!! :o

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...