Welcome, Guest. Please login or register.
July 20, 2025, 12:42:42 PM

Login with username, password and session length

Search:     Advanced search
we're back, baby
*
Home Help Search Login Register
f13.net  |  f13.net General Forums  |  General Discussion  |  Topic: CSS3 Border-image question. 0 Members and 1 Guest are viewing this topic.
Pages: [1] Go Down Print
Author Topic: CSS3 Border-image question.  (Read 3258 times)
Mrbloodworth
Terracotta Army
Posts: 15148


on: August 14, 2010, 05:08:21 PM

So, I have been revamping (Retrofit really) the Wurm Online website. I am currently using the border-image property to style some of the <div> elements. Works great in Firefox and safari. However in Opera the top navigation bar will not show its border images, while it does show them on the other elements (the lower boxes/sections).

I am stumped as to whats going on, any insight would be helpful.

Opera and border-image reference.

Today's How-To: Scrambling a Thread to the Point of Incoherence in Only One Post with MrBloodworth . - schild
www.mrbloodworthproductions.com  www.amuletsbymerlin.com
Tarami
Terracotta Army
Posts: 1980


Reply #1 on: August 15, 2010, 12:20:20 AM

I would suggest not using CSS3. The support is very iffy. Safari is like the only browser that actually properly supports it. FireFox is so-so. Opera only a little. IE not at all.

Yeah, I know, very helpful advice. :P

- I'm giving you this one for free.
- Nothing's free in the waterworld.
Salamok
Terracotta Army
Posts: 2803


Reply #2 on: August 15, 2010, 01:27:46 AM

lol I was going to post the same thing but it probably isn't what he wants to hear.
Mrbloodworth
Terracotta Army
Posts: 15148


Reply #3 on: August 15, 2010, 07:47:15 AM

Well, the thing is, I'm not sure why it works in opera on other elements, but not that top bar. Its all the same definitions.

Today's How-To: Scrambling a Thread to the Point of Incoherence in Only One Post with MrBloodworth . - schild
www.mrbloodworthproductions.com  www.amuletsbymerlin.com
Miasma
Terracotta Army
Posts: 5283

Stopgap Measure


Reply #4 on: August 15, 2010, 08:37:37 AM

Opera is much more strict about proper syntax etc.  Usually if it works in everything but Opera you probably missed a semicolon or closing bracket or some other small mistake that the other browsers would have fixed for you.  This is especially true if the same effect works elsewhere.
Miasma
Terracotta Army
Posts: 5283

Stopgap Measure


Reply #5 on: August 15, 2010, 08:44:42 AM

In #topmenu your font-size attribute has no ending semicolon.  Opera will typically stop processing after such an omission, try that.
Mrbloodworth
Terracotta Army
Posts: 15148


Reply #6 on: August 15, 2010, 08:59:47 AM

In #topmenu your font-size attribute has no ending semicolon.  Opera will typically stop processing after such an omission, try that.

I owe you one beer.  Oh ho ho ho. Reallllly?

That was it, thank you!

Today's How-To: Scrambling a Thread to the Point of Incoherence in Only One Post with MrBloodworth . - schild
www.mrbloodworthproductions.com  www.amuletsbymerlin.com
RhyssaFireheart
Terracotta Army
Posts: 3525


WWW
Reply #7 on: August 16, 2010, 05:35:36 PM

Can we make this a CSS question thread?  Otherwise, I'll just hijack it anyways...

Question for those who do write CSS - do you put everything for an element on one line or do you break things down by style on it's own line?  Does it really make any difference when the browser is parsing the file for the CSS definitions?

Here's an example of what I'm talking about:

Code:
/* =-=-=-=-= Menu =-=-=-=-= */
#access{margin-top:0}
.skip-link{display:none}
#menu{}
#menu ul{margin:0;list-style:none;clear:both}
#menu ul ul{display:none}
#menu li{}
#menu a{display:block;padding:0;line-height:24px;text-decoration:none}
#menu a:hover{}
#menu a:hover:after, #menu a:active:after, #menu a:focus:after{content: " ※"}
#menu .current_page_item a{cursor:default;color:#99AFAF}
#menu .current_page_item a:after{content: " ※"}
#menu a:focus{}

instead of

Code:
/* =-=-=-=-= Menu =-=-=-=-= */
#access {
margin-top:0;
}

.skip-link {
display:none;
}

#menu {
}

#menu ul {
margin:0;
list-style:none;
clear:both;
}

#menu ul ul {
display:none;
}

#menu li {
}

#menu a {
display:block;
padding:0;
line-height:24px;
text-decoration:none;
}

#menu a:hover {
}
#menu a:hover:after, #menu a:active:after, #menu a:focus:after {
content: " ※";
}

#menu .current_page_item a {
cursor:default;
color:#99AFAF;
}

#menu .current_page_item a:after {
content: " ※";
}

#menu a:focus {
}

The first certainly takes up much less vertical space, but I find it harder to read when I'm editing CSS or writing something out.  And I find it takes me longer if I'm looking to change one specific aspect of a definition when I'm tweaking things.  I'm not sure if I'm just being resistant to changing how my CSS files look for no good reason (aka I learned to write them the second way, so that's worked well so far!) or if there really is a better reason to use the first method.

Lantyssa
Terracotta Army
Posts: 20848


Reply #8 on: August 16, 2010, 07:05:29 PM

Multiple lines.  There is no difference in browser performance, so readability is more important to me.

Hahahaha!  I'm really good at this!
Tarami
Terracotta Army
Posts: 1980


Reply #9 on: August 16, 2010, 10:27:41 PM

It's just about preference. I mix, depending on how many attributes a definition has.

Although I don't "get to" do much CSS anymore, for which I'm eternally grateful. tongue

- I'm giving you this one for free.
- Nothing's free in the waterworld.
KallDrexx
Terracotta Army
Posts: 3510


Reply #10 on: August 17, 2010, 05:52:01 AM

Just write it anyway you want, and if you are concerned with bandwidth (the only real issue with having readable, formatting) you can always minify the CSS prior to deployment, which will essentially convert it to your first example.
Krakrok
Terracotta Army
Posts: 2190


Reply #11 on: August 17, 2010, 06:39:36 AM


Add some CSS3 to IE:

http://css3pie.com/


I tried the CSS3pie example on one of our sites though and it made it hugely slow in Firefox.
Mrbloodworth
Terracotta Army
Posts: 15148


Reply #12 on: August 17, 2010, 07:05:06 AM

I can't get that to work at all, its nifty though.

Today's How-To: Scrambling a Thread to the Point of Incoherence in Only One Post with MrBloodworth . - schild
www.mrbloodworthproductions.com  www.amuletsbymerlin.com
Trouble
Terracotta Army
Posts: 689


Reply #13 on: August 17, 2010, 12:17:47 PM

I recently switched to one-line CSS definitions with indentation sort of corresponding to the DOM structure of the page. Each line is somewhat less readable, but when you have a lot of CSS it makes it much more manageable to navigate. Having each property on a line makes the stylesheet really fucking long and difficult to navigate. A couple examples of recent stuff I did which gives you a feel for how it looks:

http://mauijim.sunglasshut.com/css/style.css
http://luisarana.com/socialsun/css/socialsun.css

After switching to this format I find it much easier to navigate within my CSS which offsets the somewhat higher difficulty of reading the properties.

Edit: I also use an editor that colors the shit out of my code so it's somewhat easier (for me at least) to parse it

Screenshot:
« Last Edit: August 17, 2010, 12:27:31 PM by Trouble »
HaemishM
Staff Emeritus
Posts: 42666

the Confederate flag underneath the stone in my class ring


WWW
Reply #14 on: August 17, 2010, 12:47:49 PM

Multiple lines.  There is no difference in browser performance, so readability is more important to me.

This. I hate it when I have to dissect code that's all on one line.

RhyssaFireheart
Terracotta Army
Posts: 3525


WWW
Reply #15 on: August 17, 2010, 03:49:52 PM

What editor is that, Trouble?  I mean, I'd go blind looking at that rainbow on a black background, but some color coding isn't a bad idea.  I currently use HTML Beauty which works for my needs.  Some color coding and I can tell if a trailing ; has been left out usually as well.

Lantyssa
Terracotta Army
Posts: 20848


Reply #16 on: August 18, 2010, 01:34:26 PM

You might give Notepad++ a try.

Hahahaha!  I'm really good at this!
Trouble
Terracotta Army
Posts: 689


Reply #17 on: August 18, 2010, 11:41:49 PM

It's e Text Editor (http://www.e-texteditor.com). It's basically a semi-port of the Mac program TextMate (http://macromates.com). I've used a lot of editors but it's my favorite currently.
Viin
Terracotta Army
Posts: 6159


Reply #18 on: August 19, 2010, 12:48:55 PM

It's e Text Editor (http://www.e-texteditor.com). It's basically a semi-port of the Mac program TextMate (http://macromates.com). I've used a lot of editors but it's my favorite currently.

The Cygwin integration sounds intriguing ... normally I use TextPad, which works well enough but nothing amazing (except block select, which *is* amazing).

- Viin
Pages: [1] Go Up Print 
f13.net  |  f13.net General Forums  |  General Discussion  |  Topic: CSS3 Border-image question.  
Jump to:  

Powered by SMF 1.1.10 | SMF © 2006-2009, Simple Machines LLC